Orders
Get Submitted Orders
Method: GET
URL: https://{url}/orders/submitted
Returns all submitted orders for current day.
Frequency:
Order data request frequency is controlled by ERP (for example, every 5 min).
Expected data:
Created order(-s) submitted by DSOrder system today.
Response Body
Order object:
| Name | Type | Required | Description |
|---|---|---|---|
| order_id | string | Yes | Unique order identifier in DSOrder system |
| supplier_id | string | Yes | Unique supplier identifier in external system |
| store_id | string | Yes | Unique store identifier in external system |
| order_date | number | Yes | Date of order as Unix timestamp in milliseconds |
| delivery_date | number | Yes | Delivery date as Unix timestamp in milliseconds |
| xdock_delivery_date | number | No | Cross-dock delivery date as Unix timestamp in milliseconds |
| supplier_schedule_title | string | No | Supplier schedule title in DSOrder system |
| details | array | Yes | Array of order detail objects |
Order detail object (inside details array):
| Name | Type | Required | Description |
|---|---|---|---|
| line_number | number | Yes | Detail line number |
| article_id | string | Yes | Unique article identifier in external system |
| quantity | number | Yes | Ordered quantity in base units |
| min_purchase_shelf_life | number | No | Minimal purchase shelf life as Unix timestamp in milliseconds |
Response
200: OK
{
"success": true,
"message": null,
"data": [
{
"order_id": "100034",
"supplier_id": "SU-000002",
"store_id": "ST-0000001",
"order_date": 12647891624,
"delivery_date": 12647891624,
"xdock_delivery_date": null,
"supplier_schedule_title": "JIT 1-3+3-5+5-1 3x",
"details": [
{
"line_number": 1000,
"article_id": "ART-000003",
"quantity": 100,
"min_purchase_shelf_life": 1264789162
},
{
"line_number": 2000,
"article_id": "ART-000004",
"quantity": 100.50,
"min_purchase_shelf_life": 1264789162
}
]
}
],
"warnings": []
}
Report Order Fulfillment
Method: POST
URL: https://{url}/orders/{order_id}/fulfill
Report order fulfilment on line level. Fulfilment can be reported multiple times until the order is closed.
Frequency:
Order fulfillment is required to be sent in near real-time.
Expected data:
Order line fulfillment.
Technical:
If an order does not exist in DSOrder or is already closed, the interface will return an error.
If an order exists in DSOrder and is not closed, the order line(-s) will be updated.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| order_id | string | Yes | Unique order identifier in DSOrder system |
Request Body
The request body is a JSON array of objects.
| Name | Type | Required | Description |
|---|---|---|---|
| line_number | number | Yes | Order line number in DSOrder system |
| article_id | string | Yes | Unique article identifier in external system |
| quantity | number | Yes | Total quantity in base units that is fulfilled for this order line |
| finished | boolean | Yes | Identifies if line report is finished or not. Finished lines will be ignored for further updates |
Request Example
[
{
"line_number": 1000,
"article_id": "ART-0001",
"quantity": 12,
"finished": true
},
{
"line_number": 1100,
"article_id": "ART-0002",
"quantity": 36,
"finished": false
}
]
Response
200: OK — Success
{
"success": true,
"message": null,
"data": null,
"warnings": []
}
200: OK — Success with warnings
{
"success": true,
"message": null,
"data": null,
"warnings": [
"Order line 1000 has already been marked as finished, skipping"
]
}
200: OK — Error
{
"success": false,
"message": "Order with ID 100123 was not found",
"data": null,
"warnings": []
}
Close Order
Method: POST
URL: https://{url}/orders/{order_id}/close
Close the order, making it read-only and not possible to update anymore.
Frequency:
Order close requests are required to be sent in near real-time.
Expected data:
Order ID.
Technical:
If an order does not exist in DSOrder or is already closed, the interface will return an error.
If an order exists in DSOrder and is not closed, the order will be closed.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| order_id | string | Yes | Unique order identifier in DSOrder system |
Response
200: OK — Success
{
"success": true,
"message": null,
"data": null,
"warnings": []
}
200: OK — Error
{
"success": false,
"message": "Order with ID 100123 was not found",
"data": null,
"warnings": []
}