Skip to main content

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:

NameTypeRequiredDescription
order_idstringYesUnique order identifier in DSOrder system
supplier_idstringYesUnique supplier identifier in external system
store_idstringYesUnique store identifier in external system
order_datenumberYesDate of order as Unix timestamp in milliseconds
delivery_datenumberYesDelivery date as Unix timestamp in milliseconds
xdock_delivery_datenumberNoCross-dock delivery date as Unix timestamp in milliseconds
supplier_schedule_titlestringNoSupplier schedule title in DSOrder system
detailsarrayYesArray of order detail objects

Order detail object (inside details array):

NameTypeRequiredDescription
line_numbernumberYesDetail line number
article_idstringYesUnique article identifier in external system
quantitynumberYesOrdered quantity in base units
min_purchase_shelf_lifenumberNoMinimal 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

NameTypeRequiredDescription
order_idstringYesUnique order identifier in DSOrder system

Request Body

The request body is a JSON array of objects.

NameTypeRequiredDescription
line_numbernumberYesOrder line number in DSOrder system
article_idstringYesUnique article identifier in external system
quantitynumberYesTotal quantity in base units that is fulfilled for this order line
finishedbooleanYesIdentifies 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

NameTypeRequiredDescription
order_idstringYesUnique 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": []
}