Skip to main content

Promotion Articles

Frequency:

Promotion articles data changes are required to be sent in near real-time. Any change to the interface field in the external system should trigger the interface.

Expected data:

Article promotions data for specific purchase/sales dates on organization or store level.

Technical:

If a promotion articles record does not exist in DSOrder, the record will be created.

If a promotion articles record already exists in DSOrder, the existing record will be updated with the new data.


Get Promotion Articles

Method: GET
URL: https://{url}/promotions/articles/{date}/{store_id}

Retrieve promotion articles for a specific store and date.

Path Parameters

NameTypeRequiredDescription
datestringYesDate in format yyyy-mm-dd
store_idstringYesUnique store identifier in external system

Response Body

NameTypeRequiredDescription
article_idstringYesUnique article identifier in external system
promotion_idstringYesUnique promotion identifier in external system
purchase_startdateYesDate when purchase period for promotion starts (in format: yyyy-mm-dd)
purchase_enddateYesDate when purchase period for promotion ends (in format: yyyy-mm-dd)
sales_startdateYesDate when sales period for promotion starts (in format: yyyy-mm-dd)
sales_enddateYesDate when sales period for promotion ends (in format: yyyy-mm-dd)
is_not_ordered_after_promobooleanNoIndicates if purchase order should be placed outside promotion period. Only works for orders with delivery date within promo period. Default: false

Response

200: OK

[
{
"promotion_id": "PROMOT-00001",
"article_id": "ART-00001",
"purchase_start": "2023-07-26",
"purchase_end": "2023-08-30",
"sales_start": "2023-08-01",
"sales_end": "2023-08-30",
"is_not_ordered_after_promo": false
},
{
"promotion_id": "PROMOT-00001",
"article_id": "ART-00002",
"purchase_start": "2023-07-26",
"purchase_end": "2023-08-30",
"sales_start": "2023-08-01",
"sales_end": "2023-08-30",
"is_not_ordered_after_promo": true
}
]

Import Promotion Articles

Method: POST
URL: https://{url}/promotions/articles

Create or update promotion articles.

Request Body

The request body is a JSON array of objects.

NameTypeRequiredDescription
promotion_idstringYesUnique promotion identifier in external system
article_idstringYesUnique article identifier in external system
store_idstringNoUnique store identifier in external system (or null if promotion is not store specific)
purchase_startdateYesDate when purchase period for promotion starts (in format: yyyy-mm-dd)
purchase_enddateYesDate when purchase period for promotion ends (in format: yyyy-mm-dd)
sales_startdateYesDate when sales period for promotion starts (in format: yyyy-mm-dd)
sales_enddateYesDate when sales period for promotion ends (in format: yyyy-mm-dd)
is_not_ordered_after_promobooleanNoIndicates if purchase order should be placed outside promotion period. Only works for orders with delivery date within promo period. Default: false

Request Example

[
{
"promotion_id": "PROMOT-00001",
"article_id": "ART-00001",
"store_id": null,
"purchase_start": "2023-07-26",
"purchase_end": "2023-08-30",
"sales_start": "2023-08-01",
"sales_end": "2023-08-30",
"is_not_ordered_after_promo": false
},
{
"promotion_id": "PROMOT-00001",
"article_id": "ART-00002",
"store_id": "STORE-0001",
"purchase_start": "2023-07-26",
"purchase_end": "2023-08-30",
"sales_start": "2023-08-01",
"sales_end": "2023-08-30",
"is_not_ordered_after_promo": true
}
]

Response

200: OK — Success

{
"success": true,
"message": null,
"data": null,
"warnings": []
}

200: OK — Error

{
"success": false,
"message": "Promotion article import failed",
"data": null,
"warnings": []
}

Delete Promotion Articles

Method: DELETE
URL: https://{url}/promotions/articles

Delete promotion articles from DSOrder.

Request Body

The request body is a JSON array of objects.

NameTypeRequiredDescription
promotion_idstringYesUnique promotion identifier in external system
article_idstringYesUnique article identifier in external system

Request Example

[
{
"promotion_id": "PROMOT-00001",
"article_id": "ART-00001"
},
{
"promotion_id": "PROMOT-00001",
"article_id": "ART-00002"
}
]

Response

200: OK — Success

{
"success": true,
"message": null,
"data": null,
"warnings": []
}

200: OK — Error

{
"success": false,
"message": "Promotion article was not deleted",
"data": null,
"warnings": []
}