Skip to main content

Article Unit Barcodes

Frequency:

Article unit barcode 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:

Article unit barcodes for different levels of the article package hierarchy.

Technical:

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

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


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

Create or update article unit barcodes.

Request Body

The request body is a JSON array of objects. Each object contains an article_id and a units array. Each unit contains a unit_type_id and a barcodes array.

Top-level object:

NameTypeRequiredDescription
article_idstringYesArticle unique identifier in ERP
unitsarrayYesArray of unit objects for the article

Unit object (inside units array):

NameTypeRequiredDescription
unit_type_idintegerYesArticle unit type: 1 - base unit, 2 - warehouse unit, 3 - layer unit, 4 - pallet unit
barcodesarrayYesArray of barcode objects for the unit

Barcode object (inside barcodes array):

NameTypeRequiredDescription
barcode_type_idstringYesBarcode type
barcodestringYesBarcode value

Request Example

[
{
"article_id": "0001",
"units": [
{
"unit_type_id": 1,
"barcodes": [
{
"barcode_type_id": "EAN13",
"barcode": "4013853567222"
},
{
"barcode_type_id": "EAN13",
"barcode": "4012918688192"
}
]
},
{
"unit_type_id": 2,
"barcodes": [
{
"barcode_type_id": "EAN13",
"barcode": "5012345678900"
},
{
"barcode_type_id": "EAN13",
"barcode": "5012345688192"
}
]
}
]
},
{
"article_id": "0047",
"units": [
{
"unit_type_id": 1,
"barcodes": [
{
"barcode_type_id": "EAN13",
"barcode": "4082957395474"
},
{
"barcode_type_id": "EAN13",
"barcode": "4071391238347"
}
]
}
]
}
]

Response

200: OK — Success

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

400: Bad Request — Error

{
"success": false,
"message": "Article Barcode update failed",
"errors": [
{
"article_id": "0001",
"error": "barcode_type_id is undefined"
}
]
}