POST public-api/transactions/grid-query/transaction-history-v2

New transaction history api. This api returns a model that takes out the internal id fields, but works just like the previous one. You can use the gridRequest parameter to specify the page number, page size, filter, and sort criteria. Requires the Allow Asset Transaction permission, enforces Role Site and Asset Type security



Request Information

URI Parameters

None.

Body Parameters

GridRequestModel
NameDescriptionTypeAdditional information
TotalCountFromPriorFetch

This field helps to skip the page count recalculation that goes into calculating the TotalRecordsLongCount. For example - When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is a time-consuming operation. To avoid that extra calculation, and help prevent throttling, TotalRecordsLongCount is assigned to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page through the records faster. By default, this value is a null value, meaning the api should peform a record count of the data prior to fetching the records.

integer

None.

AdditionalSkipCount

This is the additional number of records to skip, in addition to page size and page #. This is useful for quick filter (more) mode of operation. This field is not implemented.

integer

None.

PageSize

Due to the large number of records this API may return, this is a paging API. Set this value to specify the number of records you wish to process per API call. (Recommended 100-500). Note: some grid query api will ignore or cap this value if the requested page size is too large. A large page size (several thousands) could overflow or degrade the serialization of return data.

integer

None.

PageNumber

Due to the large number of records this API may return, this is a paging API. Set this value to specify the page number or record set you wish to process. Generally you would want to keep the PageSize constant (Recommended 100-500) and loop thru the results incrementing this PageNumber until the number of records returned is less than the value you specified for PageSize.

integer

None.

Sort

This is an expression tree. Set this to specify all the columns you wish to sort the data by. Default None.

Collection of Object

None.

Filter

This is an expression tree. Set this to specify all the columns, values and operators you wish to filter the data by. Default None.

TopLevelFilterType

None.

ClientUtcOffset

If you provide a valid expression tree for the Filter parameter and the filter expression you provide performs one or more comparisons of DateTime values with constants then set this to specify which time zone your DateTime constants represent. Common ClientUtcOffset string values include: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Marquesas Standard Time, Alaskan Standard Time, Pacific Standard Time, Mountain Standard Time, Central Standard Time, Eastern Standard Time, Venezuela Standard Time, Atlantic Standard Time, Newfoundland Standard Time, Greenland Standard Time, UTC-02, Cape Verde Standard Time, GMT Standard Time, W. Europe Standard Time, GTB Standard Time, Russian Standard Time, Arabian Standard Time, Afghanistan Standard Time, Pakistan Standard Time, India Standard Time, China Standard Time, Tokyo Standard Time, AUS Central Standard Time, West Pacific Standard Time, Central Pacific Standard Time, Fiji Standard Time, Samoa Standard Time.

TimeZoneInfoId

None.

FilterBehavior

Internal - specific filter behaviors

FilterBehaviorFlags

None.

WorkingSiteIdCsvList

Use this comma separated list for values to efficiently filter results to one or more sites.

string

None.

Request Formats

application/json

Sample:
{
  "_sortCriteria": [],
  "TotalCountFromPriorFetch": 1,
  "AdditionalSkipCount": 1,
  "PageSize": 2,
  "PageNumber": 3,
  "Filter": {
    "$id": "1",
    "field": "sample string 1",
    "operator": "sample string 2",
    "value": {},
    "logic": "sample string 4",
    "filters": []
  },
  "ClientUtcOffset": null,
  "FilterBehavior": 0,
  "WorkingSiteIdCsvList": "4"
}



Response Information

Resource Description

WaspResultOfListOfAssetTransactionHistoryModel
NameDescriptionTypeAdditional information
Data

Type specific result that always depends on the function called.

Collection of AssetTransactionHistoryModel

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

Sample:
{
  "Data": [
    {
      "AssetDefaultCost": 1.0,
      "AssetDescription": "sample string 1",
      "AssetModel": "sample string 2",
      "AssetSerialNumber": "sample string 3",
      "AssetTag": "sample string 4",
      "AssetTransCost": 1.0,
      "TransactionQuantity": 1.0,
      "RecordSource": "sample string 5",
      "AssetTypeDescription": "sample string 6",
      "AssetTypeModelNumber": "sample string 7",
      "AssetTypeNumber": "sample string 8",
      "Assignee": "sample string 9",
      "Category": "sample string 10",
      "GroupTag": "sample string 11",
      "CustomerCompanyName": "sample string 12",
      "CustomerContactEmail": "sample string 13",
      "CustomerContactFirstName": "sample string 14",
      "CustomerContactLastName": "sample string 15",
      "CustomerFirstName": "sample string 16",
      "CustomerLastName": "sample string 17",
      "CustomerNumber": "sample string 18",
      "DepartmentCode": "sample string 19",
      "EmployeeEmail": "sample string 20",
      "EmployeeFirstName": "sample string 21",
      "EmployeeLastName": "sample string 22",
      "EmployeeNumber": "sample string 23",
      "Latitude": 1.0,
      "LocationCode": "sample string 24",
      "LocationDescription": "sample string 25",
      "Longitude": 1.0,
      "Altitude": 1.0,
      "Accuracy": 1.0,
      "ManufacturerName": "sample string 26",
      "OtherLocationCode": "sample string 27",
      "OtherSiteName": "sample string 28",
      "ReasonCode": "sample string 29",
      "SiteDescription": "sample string 30",
      "SiteName": "sample string 31",
      "VendorContactEmail": "sample string 32",
      "VendorContactName": "sample string 33",
      "VendorEmail": "sample string 34",
      "VendorName": "sample string 35",
      "VendorNumber": "sample string 36",
      "VendorWebsite": "sample string 37",
      "TransactionCost": 1.0,
      "DueDate": "2024-04-27T13:43:11.4285919+00:00",
      "TransactionDate": "2024-04-27T13:43:11.4285919+00:00",
      "TransactionType": "sample string 39",
      "UserEmail": "sample string 40",
      "UserFirstName": "sample string 41",
      "UserLastName": "sample string 42",
      "UserLogon": "sample string 43",
      "UserTitle": "sample string 44",
      "Lot": "sample string 45",
      "DateCode": "sample string 46",
      "SerialNumber": "sample string 47",
      "OrderNumber": "sample string 48"
    },
    {
      "AssetDefaultCost": 1.0,
      "AssetDescription": "sample string 1",
      "AssetModel": "sample string 2",
      "AssetSerialNumber": "sample string 3",
      "AssetTag": "sample string 4",
      "AssetTransCost": 1.0,
      "TransactionQuantity": 1.0,
      "RecordSource": "sample string 5",
      "AssetTypeDescription": "sample string 6",
      "AssetTypeModelNumber": "sample string 7",
      "AssetTypeNumber": "sample string 8",
      "Assignee": "sample string 9",
      "Category": "sample string 10",
      "GroupTag": "sample string 11",
      "CustomerCompanyName": "sample string 12",
      "CustomerContactEmail": "sample string 13",
      "CustomerContactFirstName": "sample string 14",
      "CustomerContactLastName": "sample string 15",
      "CustomerFirstName": "sample string 16",
      "CustomerLastName": "sample string 17",
      "CustomerNumber": "sample string 18",
      "DepartmentCode": "sample string 19",
      "EmployeeEmail": "sample string 20",
      "EmployeeFirstName": "sample string 21",
      "EmployeeLastName": "sample string 22",
      "EmployeeNumber": "sample string 23",
      "Latitude": 1.0,
      "LocationCode": "sample string 24",
      "LocationDescription": "sample string 25",
      "Longitude": 1.0,
      "Altitude": 1.0,
      "Accuracy": 1.0,
      "ManufacturerName": "sample string 26",
      "OtherLocationCode": "sample string 27",
      "OtherSiteName": "sample string 28",
      "ReasonCode": "sample string 29",
      "SiteDescription": "sample string 30",
      "SiteName": "sample string 31",
      "VendorContactEmail": "sample string 32",
      "VendorContactName": "sample string 33",
      "VendorEmail": "sample string 34",
      "VendorName": "sample string 35",
      "VendorNumber": "sample string 36",
      "VendorWebsite": "sample string 37",
      "TransactionCost": 1.0,
      "DueDate": "2024-04-27T13:43:11.4285919+00:00",
      "TransactionDate": "2024-04-27T13:43:11.4285919+00:00",
      "TransactionType": "sample string 39",
      "UserEmail": "sample string 40",
      "UserFirstName": "sample string 41",
      "UserLastName": "sample string 42",
      "UserLogon": "sample string 43",
      "UserTitle": "sample string 44",
      "Lot": "sample string 45",
      "DateCode": "sample string 46",
      "SerialNumber": "sample string 47",
      "OrderNumber": "sample string 48"
    }
  ],
  "Messages": [
    {
      "ResultCode": 0,
      "Message": "sample string 1",
      "HttpStatusCode": 200,
      "FieldName": "sample string 2"
    },
    {
      "ResultCode": 0,
      "Message": "sample string 1",
      "HttpStatusCode": 200,
      "FieldName": "sample string 2"
    }
  ],
  "BatchNumber": 1,
  "HasError": false,
  "HasHttpError": false,
  "HasMessage": true,
  "HasSuccessWithMoreDataRemaining": false,
  "TotalRecordsLongCount": 1
}