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.

  • Only purchase active articles and their master data updates are expected to be reported.
  • If an article becomes purchase inactive, this should be reported, and no further information exchange is expected for such an article.
  • If an article becomes purchase active, all article master data interfaces should be triggered to update the relevant information.

Technical:

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

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

Articles are matched by id within the client.

An update replaces all article fields with the values from the request. is_purchase_active defaults to false when omitted, also for existing articles: omitting it deactivates the article for purchasing. Always send the full record.

If commercial_group_id is omitted, empty, or does not match a commercial group in DSMDS, the article's current commercial group link is left unchanged.

The whole request is processed in a single transaction. If any article fails (e.g., a required field is missing, a value is too long, or picking_method is unknown), the request fails with 409 and an empty body, and no articles from the request are saved.


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

Create or update articles.

Request Body

The request body is a JSON array of article objects.

NameTypeRequiredDescription
idstringYesArticle unique identifier in the external system. Max 255 characters
titlestringYesArticle title in the local language. Max 255 characters
title_englishstringYesArticle title in English. Max 255 characters
total_shelf_lifeintegerYesTotal shelf life in days
min_sales_shelf_lifeintegerYesMinimum shelf life in days allowed for sales
min_purchase_shelf_lifeintegerYesMinimum shelf life in days allowed for purchasing
picking_methodintegerYesPicking method: 1 - regular, 2 - weight, 3 - none, 4 - average weight. Any other value fails the request with 409
is_purchase_activebooleanNotrue - article is active for purchasing, false - article is not active for purchasing. Defaults to false if omitted, which also deactivates an existing article
commercial_group_idstringNoCommercial group (lowest category) identifier in the external system. If omitted, empty, or not found in DSMDS, the current group link is left unchanged
is_tobacco_trackablebooleanNoAccepted, but currently not stored

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_purchase_active": true,
"commercial_group_id": "mc3"
},
{
"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_purchase_active": true,
"commercial_group_id": "mc3"
}
]

Response

200: OK — Success

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

200: OK — Error

{
"success": false,
"message": "Failed to map JSON",
"data": null,
"warnings": []
}