Retrieving a list of orders (for customer)
GET {{api-url}}/order-v2/{{tenant}}/orders
Retrieves a list of orders (by a customer).
Required scopes
-
order.history_view
for logged in customers only.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
sort | string | The list of comma-separated properties used to sort the results. | |
By default, the column values are sorted in ascending order. | |||
Can either be in the form of fieldName or fieldName:asc,fieldName:desc. | |||
If you want to sort by localized attributes, you must use the following form: | |||
fieldName.language or fieldName.language:asc,fieldName.language:desc. | |||
pageNumber | number | The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. | |
The number of the first page is 1. | |||
pageSize | number | The number of documents being retrieved on the page. | |
q | string | A standard query parameter is used to search for specific values. |
- Searching for an item by string property:
q=currency:USD
wherecurrency
is the name of string field andUSD
is its required value. - Searching for items by number-based property:
- Searching for items with specific value:
q=tax.total.amount:20
- Searching for items with value greater than:
q=tax.total.amount:>20
- Searching for items with value lower than:
q=tax.total.amount:<20
- Searching for items with value greater or equal than:
q=tax.total.amount:>=20
- Searching for items with value lower or equal than:
q=tax.total.amount:<=20
- Searching for items with within a range of values:
q=tax.total.amount:(>=10 AND <=20)
wheretax.total.amount
is name of number-based field and20
is it's querying value.
- Searching for items with specific value:
- Searching for items by date property. All numer-based property queries are valid also for dates. In that case the date should be placed within double quotes:
q=created:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z")
- Searching for items by boolean value:
q=customer.mixins.generalAttributes.invoiceNotDeliveryAddress:true
wherecustomer.mixins.generalAttributes.invoiceNotDeliveryAddress
is a name of boolean field and 'true' is it`s required value. - Searching for items with non existing or empty property:
q=billingAddress.contactPhone:null
wherebillingAddress.contactPhone
is a name of fields that has valuenull
. - Searching for items with existing property:
q=mixin:exists
wheremixin
is a name of field that hasnon null
value. - Searching for items by multiple specific values:
q=id:(order_id1,order_id2)
whereid
is name of field and strings within a bracket are it's required value. - Searching for items by multiple fields:
q=id:order_id1 status:COMPLETED
whereid
andstatus
are the names of fields. All documents that contain given values of these fields are returned. Multiple fields separated by space can be specified. Multiple values for each field can be also specified in a format presented above. | |fields
| string | | A list of comma-separated fields names of the Order. If the field is empty then full order is returned. Otherwise, only the indicated fields will be populated in a response. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
saas-token | string | (Required) Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase. | |
Accept | string |