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

KeyDatatypeRequiredDescription
sortstringThe 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.
pageNumbernumberThe 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.
pageSizenumberThe number of documents being retrieved on the page.
qstringA standard query parameter is used to search for specific values.
  • Searching for an item by string property: q=currency:USD where currency is the name of string field and USD 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)
      where tax.total.amount is name of number-based field and 20 is it's querying 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 where customer.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 where billingAddress.contactPhone is a name of fields that has value null.
  • Searching for items with existing property: q=mixin:exists where mixin is a name of field that has non null value.
  • Searching for items by multiple specific values: q=id:(order_id1,order_id2) where id 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 where id and status 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

KeyDatatypeRequiredDescription
saas-tokenstring(Required) Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.
Acceptstring