POST public-api/transactions/asset/history
Method with paging used to return the transaction history of an asset with optional start and end date parameters Requires the Allow Asset Transaction permission, enforces Role Site and Asset Type security
Request Information
URI Parameters
None.
Body Parameters
AssetTransactionSearchName | Description | Type | Additional information |
---|---|---|---|
PageNumber |
Optional: The zero based page number of data you would like retrieved, default 0 |
integer |
None. |
PageSize |
Optional: The amount of rows of data returned on each page, default 20 |
integer |
None. |
AssetTag |
Required: The asset tag for the asset you would like the history of. A blank asset tag will return no data. |
string |
None. |
StartDate |
Optional: Used to filter out older transactions. A null value will start the transaction history at the beginning of the asset's life |
date |
None. |
EndDate |
Optional: Used to filter out newer transactions. A null value will end the transaction history with the most recent transaction |
date |
None. |
Request Formats
application/json
{ "PageNumber": 0, "PageSize": 5, "AssetTag": "1001-975D39FFE2044DFF9BDF551153AF512F" }
Response Information
Resource Description
WaspResultOfListOfAssetTransactionModelName | Description | Type | Additional information |
---|---|---|---|
Data |
Type specific result that always depends on the function called. |
Collection of AssetTransactionModel |
None. |
Messages |
List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. |
Collection of WtResult |
None. |
BatchNumber |
This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. |
integer |
None. |
HasError |
True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. |
boolean |
None. |
HasHttpError |
True if an API function call could not be fully posted to the server or the results could not be fully returned. |
boolean |
None. |
HasMessage |
True if any message is available. |
boolean |
None. |
HasSuccessWithMoreDataRemaining |
True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. |
boolean |
None. |
TotalRecordsLongCount |
This is the total number of records available in the database based on the query and filer conditions provided. It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. This is used, for example, to set relative scroll bar sizes. When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation. To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster. |
integer |
None. |
Response Formats
application/json
{ "Data": [ { "AssetTag": "1001-975D39FFE2044DFF9BDF551153AF512F", "AssetDescription": "Desc.For.1001-975D39FFE2044DFF9BDF551153AF512F", "SiteName": "Tertiary-Building-975d39ffe2044dff9bdf551153af512f", "LocationCode": "B1.Floor1.Room3.975d39ffe2044dff9bdf551153af512f", "Quantity": 1.0, "TransTypeDescription": "Add", "TransactionDate": "2021-10-15T15:01:41.27Z" } ], "Messages": [], "HasSuccessWithMoreDataRemaining": false, "HasError": false, "HasMessage": false, "HasHttpError": false }