Retrieves a list of orders for a customer. To be used by customers on the storefront. The order.history_view scope is for logged in customers only.
Required scopes
This endpoint requires the following scopes:
: Needed to view order when logged as a customer.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
Pattern: ^[a-z][a-z0-9]+$
Query parameters
sortstringOptional
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.
pageNumberinteger · min: 1Optional
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.
Default: 1
pageSizeinteger · min: 1Optional
The number of documents being retrieved on the page.
Default: 16
qstringOptional
A 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 number-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.
Example: currency:USD
fieldsstringOptional
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.
Header parameters
saas-tokenstringRequired
Token used to identify logged-in users. This token has an expiry date and is signed with a passphrase.
Responses
200
Some server side error occurred.
application/json
400
Request was syntactically incorrect. Details of the error are included in the response payload.
application/json
403
Given authorization scopes are not sufficient and do not match required scopes.
application/json
500
Some server side error occurred.
application/json
get
/order-v2/{tenant}/orders
Retrieving order details
get
Retrieves details of an order. To be used by customers on the storefront. The order.history_view scope is for logged in customers only.
Required scopes
This endpoint requires the following scopes:
: Needed to view order when logged as a customer.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
orderIdstringRequired
Unique identifier of an order.
tenantstring · min: 3 · max: 16Required
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
Pattern: ^[a-z][a-z0-9]+$
Header parameters
saas-tokenstringRequired
Token used to identify logged-in users. This token has an expiry date and is signed with a passphrase.
Responses
200
The request was successful. Order details are returned.
application/json
403
Given authorization scopes are not sufficient and do not match required scopes.
application/json
404
Order does not exist
application/json
500
Some server side error occurred.
application/json
get
/order-v2/{tenant}/orders/{orderId}
Retrieving status transitions for a specific order
get
Retrieves possible status transitions for a specific order. To be used by customers on the storefront.
Required scopes
This endpoint requires the following scopes:
: Needed to update an order as a customer.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
orderIdstringRequired
Unique identifier of an order.
tenantstring · min: 3 · max: 16Required
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
Pattern: ^[a-z][a-z0-9]+$
Header parameters
saas-tokenstringRequired
Token used to identify logged-in users. This token has an expiry date and is signed with a passphrase.
Responses
200
The request was successful. Status transition for given order returned.
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
404
Order does not exist
application/json
500
Some server side error occurred.
application/json
get
/order-v2/{tenant}/orders/{orderId}/transitions
Updating order status
post
Updates the status of a specific order. To be used by customers on the storefront. Note: Customers can only change the order status from CREATED to DECLINED.
Required scopes
This endpoint requires the following scopes:
: Needed to update an order as a customer.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
orderIdstringRequired
Unique identifier of an order.
tenantstring · min: 3 · max: 16Required
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
Pattern: ^[a-z][a-z0-9]+$
Header parameters
saas-tokenstringRequired
Token used to identify logged-in users. This token has an expiry date and is signed with a passphrase.
Body
Order status transition.
statusstring · enumOptional
Status of the order. Supported order statuses are IN_CHECKOUT, CREATED, CONFIRMED, DECLINED, SHIPPED, COMPLETED'. Customers can only change the order status from CREATED to DECLINED.
Possible values:
Responses
204
The transition was successful.
400
Request syntactically incorrect. Details of the error are included in the response payload.
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
404
Order does not exist
application/json
500
Some server side error occurred.
application/json
post
/order-v2/{tenant}/orders/{orderId}/transitions
No content
Retrieving legal entity orders
get
Retrieves a list of orders related to a particular legal entity for a customer. To be used by B2B customers on the storefront.
Required scopes
This endpoint requires the following scopes:
: Needed to read legal entity orders.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
Pattern: ^[a-z][a-z0-9]+$
legalEntityIdstringRequired
Identifier of the legal entity within which the operations are carried out.
Query parameters
sortstringOptional
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.
pageNumberinteger · min: 1Optional
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.
Default: 1
pageSizeinteger · min: 1Optional
The number of documents being retrieved on the page.
Default: 16
qstringOptional
A 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 number-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.
Example: currency:USD
fieldsstringOptional
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.
Header parameters
saas-tokenstringRequired
Token used to identify logged-in users. This token has an expiry date and is signed with a passphrase.
Responses
200
The request was successful. List of legal entity orders with details are returned.
application/json
400
Request was syntactically incorrect. Details of the error are included in the response payload.
application/json
403
Given authorization scopes are not sufficient and do not match required scopes.