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.


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, 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_trackablebooleanYesWhether tobacco reporting to the EU is required
is_country_of_origin_requiredbooleanYesWhether country of origin is required

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": "Article update failed",
"errors": [
{
"article_id": "0001",
"error": "some error"
}
]
}