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.
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Article unique identifier in ERP |
| title | string | Yes | Article title |
| title_english | string | Yes | Article title in English |
| total_shelf_life | integer | Yes | Total shelf life in days |
| picking_method | integer | Yes | Picking method: 1 - regular, 2 - weight, 4 - average measure |
| min_sales_shelf_life | integer | Yes | Minimum shelf life in days allowed for sales |
| min_purchase_shelf_life | integer | Yes | Minimum shelf life in days allowed for purchasing |
| is_tobacco_trackable | boolean | Yes | Whether tobacco reporting to the EU is required |
| is_country_of_origin_required | boolean | Yes | Whether 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"
}
]
}