Skip to main content

Articles

Frequency:

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

Expected data:

Each request contains general article master data.

Technical:

If an article record does not exist in DSWMS, the record will be created.

If an article record already exists in DSWMS, the existing record will be updated with the new data.

Each article in the array is validated and imported independently. If some articles fail, the remaining ones are still imported and the response is 400 with an errors array listing the failed article_ids. Only the failed records need to be sent again.


POST https://{url}/v1/articles​

Create or update articles.

Request Body​

The request body is a JSON array of article objects.

NameTypeRequiredDescription
idstringYesArticle unique identifier in ERP
titlestringYesArticle title
title_englishstringYesArticle title in English
total_shelf_lifeintegerYesTotal shelf life in days
picking_methodintegerYesPicking method: 1 - regular, 2 - weight, 3 - none, 4 - average measure
min_sales_shelf_lifeintegerYesMinimum shelf life in days allowed for sales
min_purchase_shelf_lifeintegerYesMinimum shelf life in days allowed for purchasing
is_tobacco_trackablebooleanNoWhether tobacco reporting to the EU is required. Default: false
is_country_of_origin_requiredbooleanNoWhether country of origin is required. Default: false

Request Example​

[
{
"id": "0001",
"title": "Coca Cola 1L dzēriens",
"title_english": "Coca Cola 1L",
"total_shelf_life": 180,
"picking_method": 1,
"min_sales_shelf_life": 120,
"min_purchase_shelf_life": 120,
"is_tobacco_trackable": false,
"is_country_of_origin_required": false
},
{
"id": "0047",
"title": "Fanta 0.5L dzēriens",
"title_english": "Fanta 0.5L",
"total_shelf_life": 240,
"picking_method": 1,
"min_sales_shelf_life": 240,
"min_purchase_shelf_life": 240,
"is_tobacco_trackable": false,
"is_country_of_origin_required": false
}
]

Response​

200: OK — Success​

{
"success": true,
"message": null
}

400: Bad Request — Error​

{
"success": false,
"message": "Imported 1 articles of 2",
"errors": [
{
"article_id": "0001",
"error": "some error"
}
]
}