Orders (Customer Managed)

Manage customer orders. Authentication: Standard is customer token (Bearer). Alternatively, use access token (client credentials) together with the saas-token header.

Retrieving a list of orders

get

Retrieves a list of orders for a customer. To be used by customers on the storefront.

Authentication: Standard is customer token. Alternatively, use access token (client credentials) with saas-token header. Scope order.history_view applies when using client credentials.

Authorizations
AuthorizationstringRequired

Customer access token.

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=mixins.mixinName:exists where the specific mixin named mixinName exists in the database.
  • 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-tokenstringOptional

Required only when using access token (client credentials). Not used with customer token. Token used to identify the logged-in user; has an expiry and is signed with a passphrase.

Responses
get
/order-v2/{tenant}/orders

Retrieving order details

get

Retrieves details of an order. To be used by customers on the storefront.

Authentication: Standard is customer token. Alternatively, use access token (client credentials) with saas-token header. Scope order.history_view applies when using client credentials.

Authorizations
AuthorizationstringRequired

Customer access token.

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-tokenstringOptional

Required only when using access token (client credentials). Not used with customer token. Token used to identify the logged-in user; has an expiry and is signed with a passphrase.

Responses
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.

Authentication: Standard is customer token. Alternatively, use access token (client credentials) with saas-token header. Scope order.order_updateascustomer applies when using client credentials.

Authorizations
AuthorizationstringRequired

Customer access token.

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-tokenstringOptional

Required only when using access token (client credentials). Not used with customer token. Token used to identify the logged-in user; has an expiry and is signed with a passphrase.

Responses
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.

Authentication: Standard is customer token. Alternatively, use access token (client credentials) with saas-token header. Scope order.order_updateascustomer applies when using client credentials.

Authorizations
AuthorizationstringRequired

Customer access token.

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-tokenstringOptional

Required only when using access token (client credentials). Not used with customer token. Token used to identify the logged-in user; has an expiry 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
post
/order-v2/{tenant}/orders/{orderId}/transitions

No content

get

Retrieves a list of orders related to a particular legal entity for a customer. To be used by B2B customers on the storefront.

Authentication: Standard is customer token. Alternatively, use access token (client credentials) with saas-token header. Scope order.order_read_le applies when using client credentials.

Authorizations
AuthorizationstringRequired

Customer access token.

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=mixins.mixinName:exists where the specific mixin named mixinName exists in the database.
  • 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-tokenstringOptional

Required only when using access token (client credentials). Not used with customer token. Token used to identify the logged-in user; has an expiry and is signed with a passphrase.

Responses
get
/order-v2/{tenant}/legal-entity-orders/{legalEntityId}
get

Retrieves an order related to a particular legal entity for a customer. To be used by B2B customers on the storefront.

Authentication: Standard is customer token. Alternatively, use access token (client credentials) with saas-token header. Scope order.order_read_le applies when using client credentials.

Authorizations
AuthorizationstringRequired

Customer access token.

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.

orderIdstringRequired

Unique identifier of an order.

Header parameters
saas-tokenstringOptional

Required only when using access token (client credentials). Not used with customer token. Token used to identify the logged-in user; has an expiry and is signed with a passphrase.

Responses
get
/order-v2/{tenant}/legal-entity-orders/{legalEntityId}/{orderId}

Last updated

Was this helpful?