Search Purchases
Changed onEndpoint to find Purchases using filtering parameters.
Request
- Base URLhttps://api.soldo.com
- AuthOAuth 2Client credentialsToken URLhttps://api.soldo.com/oauth/authorizeScopespurchase_read
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
The beginning of the period of the search fromDate included (i.e. greater than or equal to) (Formats: yyyy-MM-dd, yyyy-MM-ddThh:mm:ss, yyyy-MM-ddThh:mm:ssZ).
The end of the period of the search toDate included (i.e. less than) (Formats: yyyy-MM-dd, yyyy-MM-ddThh:mm:ss, yyyy-MM-ddThh:mm:ssZ).
It determines the date to be considered for fromDate and toDate parameters.
The status of the Purchase.
A simple text to search in the Purchase data (title, description, assignees).
It indicates the specific page to display (the counter starts from zero).
It indicates the number of items per page.
It indicates how the pages are ordered.
It indicates the sorting direction applied to the above parameters. To apply a sorting on multiple parameters, set as many times the props parameter in the request.
[ "creationTime" ]
Response
The result is an array containing Purchases.
Example response
{
"total": 168,
"pages": 7,
"page_size": 25,
"results_size": 25,
"results": [
{
"id": "7bf79328-a7ae-4222-aa54-091ff7f429a7",
"title": "Tech book",
"description": "A purchase to approve",
"amount": 10.25,
"wallet_id": "2d65bd5e-3fdf-4002-b166-bde7fb8863fa",
"wallet_name": "John Doe",
"has_attachments": true,
"notes": "Notes about the purchase request",
"assignee_id": "XMPL1234-000003",
"assignee_custom_reference_id": "123456-user-1",
"author_id": "XMPL1234-000001",
"author_custom_reference_id": "123456-user-2",
"expiration_date": "2017-06-01T12:48:40Z",
"card_id": "2d65bd5e-3fdf-4002-b166-bde7fb8863fa",
"transactions": [
{
"id": "c861cc24-6663-410f-8c78-73f886fff4ef",
"amount": 10.25,
"completed_time": "2017-06-01T12:48:40Z"
}
],
"max_tx_number": 3,
"creation_time": "2017-06-01T12:48:40Z",
"last_update_time": "2017-06-01T12:48:40Z"
}
]
}Changes
- info
for the
queryrequest parameterfromDate, the type was generalized from no type tostring, and format from no format todate-time - info
for the
queryrequest parametertoDate, the type was generalized from no type tostring, and format from no format todate-time - info
added the optional property
//to the response with the status
- info