Order Service

Download OpenAPI specification:Download

Create an order from cart.


Key Features:

  • Create orders with products that have indicative prices (e.g. price is only known after an item has been weighed)
  • Create and retrieve own orders, and update order statuses by customers (on the storefront)
  • Create, retrieve, delete, and update orders by tenant's employees (through Emporix Management Dashboard or by using a third-party application)
  • Show order history
  • Convert historic orders into current order

Key Benefits:

  • Built for high volume / throughput
  • Never let a customer not place an order
  • Make it easy for your customers to order from last order
  • Make order queues, virtual waiting queues a thing of the past
  • Benefit from automatic / elastic scaling to cope easily with peak order volume

Orders (tenant-managed)

Retrieving orders

Retrieves tenant's orders for administrative purposes. To be used by tenant's employees.

Required scopes

  • order.order_read
SecurityOAuth2
Request
path Parameters
tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

query Parameters
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
integer >= 1
Default: 1

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
integer >= 1
Default: 16

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 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.
Example: q=currency:USD
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.

Responses
200

The request was successful. List of orders with details are returned.

400

Request was syntactically incorrect. Any details will be provided within the response payload.

403

Access forbidden. The caller is not allowed to access this resource.

500

Some server side error occurred.

get/{tenant}/salesorders
Request samples
Response samples
application/json
[
  • {
    },
  • {}
]

Creating a new order

Creates an order by the tenant's employee, on behalf of a customer.

Note: The entries.originalAmount is DEPRECATED. Use the entries.originalPrice field instead.

Required scopes

  • order.order_create
SecurityOAuth2
Request
path Parameters
tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

Request Body schema: application/json
status
string (orderStatus)

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.

Enum: "IN_CHECKOUT" "CREATED" "CONFIRMED" "DECLINED" "SHIPPED" "COMPLETED"
Array of objects (Order entry)

Ordered item list.

Array of objects (Discount)

Discount list.

object (Customer)

Customer data.

siteCode
string

Site’s unique identifier. A site is a specific shop.

countryCode
string

Two-letter country code, compliant with the ISO 3166 standard.

object (Adress)

Customer's address.

object (Adress)

Customer's address.

Array of objects (Payment)

Payment list.

object (Shipping)

Shipping details.

object (Tax)

Tax details.

subTotalPrice
number

Order sub total price.

totalPrice
number

Order total price.

totalAuthorizedAmount
number

The authorized amount.

currency
string

Three-letter currency code, compliant with the ISO 4217 standard.

orderCycle
string

Order cycle date.

NOTE This attribute is DEPRECATED, please use the deliveryWindow.deliveryCycle attribute

deliveryWindowId
string

Delivery window's unique identifier.

NOTE This attribute is DEPRECATED, please use the deliveryWindow.id attribute

object (Delivery Window)
object (Metadata DTO)
mixins
object
object (Channel)
quoteId
string

Identifier of the quote from which the order has been created

Responses
201

The collection resource has been successfully created.

400

Request syntactically incorrect. Any details will be provided within the response payload.

403

Given authorization scopes are not sufficient and do not match required scopes.

409

Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.

500

Some server side error occurred.

post/{tenant}/salesorders
Request samples
application/json
{
  • "entries": [
    ],
  • "discounts": [ ],
  • "customer": {},
  • "siteCode": "main",
  • "countryCode": "DE",
  • "billingAddress": {
    },
  • "shippingAddress": {
    },
  • "payments": [
    ],
  • "shipping": {
    },
  • "tax": {
    },
  • "subTotalPrice": 104.7,
  • "totalPrice": 124.7,
  • "totalAuthorizedAmount": 124.7,
  • "currency": "EUR",
  • "mixins": {
    },
  • "orderCycle": "2021-12-09T12:00:00.000Z",
  • "deliveryWindowId": "5b5572a7f19a51001ad55509",
  • "deliveryWindow": {
    },
  • "quoteId": "Q10000160",
  • "channel": { }
}
Response samples
application/json
{
  • "id": "1234546"
}

Retrieving the number of orders

Retrieves the number of orders for the specified query and siteCode. To be used by tenant's employees.

Required scopes

  • order.order_read
SecurityOAuth2
Request
path Parameters
tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

query Parameters
q
string

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 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.
Example: q=currency:USD
Responses
200

The request was successful. Number of orders returned in header.

400

Request syntactically incorrect. Any details will be provided within the response payload.

403

Access forbidden. The caller is not allowed to access this resource.

500

Some server side error occurred.

head/{tenant}/salesorders
Request samples
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}

Retrieving a specific order by ID

Retrieves a specific order by order ID. To be used by tenant's employees.

Required scopes

  • order.order_read
SecurityOAuth2
Request
path Parameters
orderId
required
string

Unique identifier of an order.

tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

Responses
200

The request was successful. Given order details are returned.

403

Access forbidden. The caller is not allowed to access this resource.

404

Order does not exist

500

Some server side error occurred.

get/{tenant}/salesorders/{orderId}
Request samples
Response samples
application/json
{
  • "id": "orderId123456",
  • "mixins": {
    },
  • "created": "2014-03-31T10:18:21.134Z",
  • "completed": "2014-04-15T10:18:21.134Z",
  • "status": "COMPLETED",
  • "siteCode": "Germany",
  • "countryCode": "DE",
  • "deliveryWindowId": "5d230f973f05e303d5c30dba",
  • "channel": {},
  • "entries": [],
  • "discounts": [],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "shippingAddress": {
    },
  • "subTotalPrice": 1881,
  • "totalPrice": 2041,
  • "totalAuthorizedAmount": 2041,
  • "currency": "USD",
  • "payments": [
    ],
  • "tax": {
    },
  • "shipping": {
    },
  • "shipments": [
    ],
  • "quoteId": "Q10000160"
}

Updating an order

Updates an order with the specified order ID. To be used by tenant's employees.

Required scopes

  • order.order_update
  • order.order_update_completed - for updating orders with a completed status
SecurityOAuth2
Request
path Parameters
orderId
required
string

Unique identifier of an order.

tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

query Parameters
recalculate
boolean
Default: false

Flag that enforces order recalculation. If set to true, the whole order, including the coupon discounts, will be recalculated.

Request Body schema: application/json
status
string (orderStatus)

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.

Enum: "IN_CHECKOUT" "CREATED" "CONFIRMED" "DECLINED" "SHIPPED" "COMPLETED"
Array of objects (Order entry)

Ordered item list.

Array of objects (Discount)

Discount list.

object (Customer)

Customer data.

siteCode
string

Site’s unique identifier. A site is a specific shop.

countryCode
string

Two-letter country code, compliant with the ISO 3166 standard.

object (Adress)

Customer's address.

object (Adress)

Customer's address.

Array of objects (Payment)

Payment list.

object (Shipping)

Shipping details.

object (Tax)

Tax details.

subTotalPrice
number

Order sub total price.

totalPrice
number

Order total price.

totalAuthorizedAmount
number

The authorized amount.

currency
string

Three-letter currency code, compliant with the ISO 4217 standard.

orderCycle
string

Order cycle date.

NOTE This attribute is DEPRECATED, please use the deliveryWindow.deliveryCycle attribute

deliveryWindowId
string

Delivery window's unique identifier.

NOTE This attribute is DEPRECATED, please use the deliveryWindow.id attribute

object (Delivery Window)
object (Metadata DTO)
mixins
object
object (Channel)
created
string

Order's creation date.

completed
string

Order's completion date.

lastStatusChange
string

Order last status change date.

Array of objects (Shipment)

Shipment list.

Responses
204

Successful order update

400

Request syntactically incorrect. Any details will be provided within the response payload.

403

Access forbidden. The caller is not allowed to access this resource.

404

Order does not exist

409

Optimistic locking failed. User sends metadata/version attribute which is outdated (someone else updated order in the time user was performing his changes). User should retrieve the latest order data and retry the request.

500

Some server side error occurred.

put/{tenant}/salesorders/{orderId}
Request samples
application/json
{
  • "entries": [
    ],
  • "discounts": [ ],
  • "customer": {},
  • "siteCode": "main",
  • "countryCode": "DE",
  • "billingAddress": {
    },
  • "shippingAddress": {
    },
  • "payments": [
    ],
  • "shipping": {
    },
  • "tax": {
    },
  • "subTotalPrice": 104.7,
  • "totalPrice": 124.7,
  • "totalAuthorizedAmount": 124.7,
  • "currency": "EUR",
  • "mixins": {
    },
  • "orderCycle": "2021-12-09T12:00:00.000Z",
  • "deliveryWindowId": "5b5572a7f19a51001ad55509",
  • "channel": { },
  • "deliveryWindow": {
    }
}
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}

Partially updating an order

Updates partally an order with the specified order ID. To be used by tenant's employees.

Required scopes

  • order.order_update
  • order.order_update_completed - for updating orders with a completed status
SecurityOAuth2
Request
path Parameters
orderId
required
string

Unique identifier of an order.

tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

query Parameters
recalculate
boolean
Default: false

Flag that enforces order recalculation. If set to true, the whole order, including the coupon discounts, will be recalculated.

Request Body schema: application/json
status
string (orderStatus)

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.

Enum: "IN_CHECKOUT" "CREATED" "CONFIRMED" "DECLINED" "SHIPPED" "COMPLETED"
Array of objects (Order entry)

Ordered item list.

Array of objects (Discount)

Discount list.

object (Customer)

Customer data.

siteCode
string

Site’s unique identifier. A site is a specific shop.

countryCode
string

Two-letter country code, compliant with the ISO 3166 standard.

object (Adress)

Customer's address.

object (Adress)

Customer's address.

Array of objects (Payment)

Payment list.

object (Shipping)

Shipping details.

object (Tax)

Tax details.

subTotalPrice
number

Order sub total price.

totalPrice
number

Order total price.

totalAuthorizedAmount
number

The authorized amount.

currency
string

Three-letter currency code, compliant with the ISO 4217 standard.

orderCycle
string

Order cycle date.

NOTE This attribute is DEPRECATED, please use the deliveryWindow.deliveryCycle attribute

deliveryWindowId
string

Delivery window's unique identifier.

NOTE This attribute is DEPRECATED, please use the deliveryWindow.id attribute

object (Delivery Window)
object (Metadata DTO)
mixins
object
object (Channel)
created
string

Order's creation date.

completed
string

Order's completion date.

lastStatusChange
string

Order last status change date.

Array of objects (Shipment)

Shipment list.

Responses
204

Successful order update

400

Request syntactically incorrect. Any details will be provided within the response payload.

403

Access forbidden. The caller is not allowed to access this resource.

404

Order does not exist

409

Optimistic locking failed. User sends metadata/version attribute which is outdated (someone else updated order in the time user was performing his changes). User should retrieve the latest order data and retry the request.

500

Some server side error occurred.

patch/{tenant}/salesorders/{orderId}
Request samples
application/json
{
  • "entries": [
    ],
  • "discounts": [ ],
  • "customer": {},
  • "siteCode": "main",
  • "countryCode": "DE",
  • "billingAddress": {
    },
  • "shippingAddress": {
    },
  • "payments": [
    ],
  • "shipping": {
    },
  • "tax": {
    },
  • "subTotalPrice": 104.7,
  • "totalPrice": 124.7,
  • "totalAuthorizedAmount": 124.7,
  • "currency": "EUR",
  • "mixins": {
    },
  • "orderCycle": "2021-12-09T12:00:00.000Z",
  • "deliveryWindowId": "5b5572a7f19a51001ad55509",
  • "channel": { },
  • "deliveryWindow": {
    }
}
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}

Deleting an order

Deletes order with the specified ID. To be used by tenant's employees.

Required scopes

  • order.order_delete
SecurityOAuth2
Request
path Parameters
orderId
required
string

Unique identifier of an order.

tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

Responses
204

Successful deletion

400

Request syntactically incorrect. Any details will be provided within the response payload.

403

Access forbidden. The caller is not allowed to access this resource.

404

Order does not exist

500

Some server side error occurred.

delete/{tenant}/salesorders/{orderId}
Request samples
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}

Retrieving status transitions for an order

Retrieves all possible status transitions for a specific order. To be used by tenant's employees.

Required scopes

  • order.order_read
  • order.order_update
  • order.order_update_completed - for orders with a completed status
SecurityOAuth2
Request
path Parameters
orderId
required
string

Unique identifier of an order.

tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

Responses
200

The request was successful. Status transitions for specific order returned.

400

Request syntactically incorrect. Any details will be provided within the response payload.

403

Access forbidden. The caller is not allowed to access this resource.

404

Order does not exist

500

Some server side error occurred.

get/{tenant}/salesorders/{orderId}/transitions
Request samples
Response samples
application/json
[
  • {
    }
]

Updating order status

Updates the status of a specific order. To be used by tenant's employees.

Required scopes

  • order.order_update
  • order.order_update_completed - for updating orders with a completed status
SecurityOAuth2
Request
path Parameters
orderId
required
string

Unique identifier of an order.

tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

Request Body schema: application/json
status
string (orderStatus)

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.

Enum: "IN_CHECKOUT" "CREATED" "CONFIRMED" "DECLINED" "SHIPPED" "COMPLETED"
Responses
204

The request was successful. Order was succesfully updated.

400

Request syntactically incorrect. Any details will be provided within the response payload.

403

Access forbidden. The caller is not allowed to access this resource.

404

Order does not exist

500

Some server side error occurred.

post/{tenant}/salesorders/{orderId}/transitions
Request samples
application/json
{
  • "status": "DECLINED"
}
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}

Recalculating number of entries

Updates the number of entries in the specific order and recalculates it. To be used by tenant's employees.

Required scopes

  • order.order_update
  • order.order_update_completed - for updating orders with a completed status
SecurityOAuth2
Request
path Parameters
orderId
required
string

Unique identifier of an order.

tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

Request Body schema: application/json
Array of objects (Order Calculation DTO)

Order recalculation DTO contains a list of entries, where each entry contains entry ID and delivered amount of items.

Responses
200

Order recalculated successfully

400

Bad Request

403

Access forbidden. The caller is not allowed to access this resource.

404

Order does not exist

500

Some server side error occurred.

post/{tenant}/salesorders/{orderId}/calculations
Request samples
application/json
{
  • "entries": [
    ]
}
Response samples
application/json
{
  • "status": 403,
  • "message": "Not allowed to access this resource",
  • "type": "insufficient_permissions"
}

Orders (customer-managed)

Retrieving a list of orders

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

Required scopes

  • order.history_view for logged in customers only.
SecurityOAuth2
Request
path Parameters
tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

query Parameters
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
integer >= 1
Default: 1

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
integer >= 1
Default: 16

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 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.
Example: q=currency:USD
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.

header Parameters
saas-token
required
string

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.

400

Request was syntactically incorrect. Any details will be provided within the response payload.

403

Given authorization scopes are not sufficient and do not match required scopes.

500

Some server side error occurred.

get/{tenant}/orders
Request samples
Response samples
application/json
[
  • {
    },
  • {
    }
]

Creating a new order

Creates an order. To be used by customers on the storefront.

Required scopes

  • order.order_post
SecurityOAuth2
Request
path Parameters
tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

header Parameters
saas-token
required
string

Token used to identify logged-in users. This token has an expiry date and is signed with a passphrase.

Request Body schema: application/json
status
string (orderStatus)

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.

Enum: "IN_CHECKOUT" "CREATED" "CONFIRMED" "DECLINED" "SHIPPED" "COMPLETED"
Array of objects (Order entry)

Ordered item list.

Array of objects (Discount)

Discount list.

object (Customer)

Customer data.

siteCode
string

Site’s unique identifier. A site is a specific shop.

countryCode
string

Two-letter country code, compliant with the ISO 3166 standard.

object (Adress)

Customer's address.

object (Adress)

Customer's address.

Array of objects (Payment)

Payment list.

object (Shipping)

Shipping details.

object (Tax)

Tax details.

subTotalPrice
number

Order sub total price.

totalPrice
number

Order total price.

totalAuthorizedAmount
number

The authorized amount.

currency
string

Three-letter currency code, compliant with the ISO 4217 standard.

orderCycle
string

Order cycle date.

NOTE This attribute is DEPRECATED, please use the deliveryWindow.deliveryCycle attribute

deliveryWindowId
string

Delivery window's unique identifier.

NOTE This attribute is DEPRECATED, please use the deliveryWindow.id attribute

object (Delivery Window)
object (Metadata DTO)
mixins
object
object (Channel)
Responses
201

The collection resource has been successfully created.

400

Request syntactically incorrect. Any details will be provided within the response payload.

403

Given authorization scopes are not sufficient and do not match required scopes.

409

Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.

500

Some server side error occurred.

post/{tenant}/orders
Request samples
application/json
{
  • "entries": [
    ],
  • "discounts": [ ],
  • "customer": {},
  • "siteCode": "main",
  • "countryCode": "DE",
  • "billingAddress": {
    },
  • "shippingAddress": {
    },
  • "payments": [
    ],
  • "shipping": {
    },
  • "tax": {
    },
  • "subTotalPrice": 104.7,
  • "totalPrice": 124.7,
  • "totalAuthorizedAmount": 124.7,
  • "currency": "EUR",
  • "mixins": {
    },
  • "orderCycle": "2021-12-09T12:00:00.000Z",
  • "deliveryWindowId": "5b5572a7f19a51001ad55509",
  • "channel": { }
}
Response samples
application/json
{
  • "id": "1234546"
}

Retrieving order details

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

Required scopes

  • order.history_view for logged in customers only.
SecurityOAuth2
Request
path Parameters
orderId
required
string

Unique identifier of an order.

tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

header Parameters
saas-token
required
string

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.

403

Given authorization scopes are not sufficient and do not match required scopes.

404

Order does not exist

500

Some server side error occurred.

get/{tenant}/orders/{orderId}
Request samples
Response samples
application/json
{