Retrieves the number of orders for the specified query and siteCode. To be used by tenant's employees.
Required scopes
order.order_read
Authorizations
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
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
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.
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
500
Some server side error occurred.
application/json
head
HEAD /order-v2/{tenant}/salesorders HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Retrieving a specific order by ID
get
Retrieves a specific order by order ID. To be used by tenant's employees.
Required scopes
order.order_read
Authorizations
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]+$
Responses
200
The request was successful. Given order details are returned.
application/json
Responseall of
and
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
GET /order-v2/{tenant}/salesorders/{orderId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
Retrieves tenant's orders for administrative purposes. To be used by tenant's employees.
Required scopes
order.order_read
Authorizations
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.
Responses
200
The request was successful. List of orders with details are returned.
application/json
400
Request was syntactically incorrect. Any details will be provided within the response payload.
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
500
Some server side error occurred.
application/json
get
GET /order-v2/{tenant}/salesorders HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
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
Authorizations
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]+$
Query parameters
recalculatebooleanOptional
Flag that enforces order recalculation. If set to true, the whole order, including the coupon discounts, will be recalculated.
Default: false
Body
all ofOptional
and
Responses
204
Successful order update
400
Request syntactically incorrect. Any details will be provided within 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
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.
Updates partially 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
Authorizations
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]+$
Query parameters
recalculatebooleanOptional
Flag that enforces order recalculation. If set to true, the whole order, including the coupon discounts, will be recalculated.
Default: false
Body
all ofOptional
and
Responses
204
Successful order update
400
Request syntactically incorrect. Any details will be provided within 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
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.
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
Authorizations
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]+$
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 request was successful. Order was successfully updated.
400
Request syntactically incorrect. Any details will be provided within the response payload.
application/json
403
Access forbidden. The caller is not allowed to access this resource.
Updates the entries in the specific order and recalculates it. If provided entry is already assigned to the order then quantity of this entry is updated. If you want to remove entry from order then set quantity to 0.
Required scopes
order.order_update
Authorizations
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]+$
Query parameters
storebooleanOptional
This endpoint adds entries to the order and recalculates it. The result is returned. This flag can control whether the result should be stored in the database or not. By setting this flag to false, your order won't be updated.
Default: false
Body
Responses
200
The request was successful. Recalculated order is returned.
application/json
Responseall of
and
400
Bad Request
403
Access forbidden. The caller is not allowed to access this resource.