Store Assortments
Frequency:
Store assortment 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:
Links between stores and assortments. Multiple assortments can be linked to one store.
Technical:
The store and the assortment must already exist in DSMDS.
POST creates the link between the store and the assortment. POST does not check existing links: sending the same pair again creates a duplicate link, and a later DELETE for that pair fails with 409. Send each link only once.
DELETE removes the link if it exists.
Stores are matched within the organization, assortments within the client. A record whose store ID is missing, or whose store or assortment is not found, is skipped with a warning; the other records are still processed. A blank assortment_id produces an "assortment not found" warning. DELETE returns the same warnings as POST, including the "was not imported" wording.
Records are processed one at a time, not in a single transaction. If a record fails with 409, records processed before it stay saved.
POST https://{url}/stores/assortments/v1
Add assortments to stores.
Request Body
The request body is a JSON array of objects with the following fields.
| Name | Type | Required | Description |
|---|---|---|---|
| store_id | string | Yes | Store unique identifier in the external system |
| assortment_id | string | Yes | Assortment unique identifier in the external system |
Request Example
[
{
"store_id": "P0000035",
"assortment_id": "LPB-1"
},
{
"store_id": "P0000036",
"assortment_id": "LPB-1"
}
]
Response
200: OK — Success
{
"success": true,
"message": "",
"data": null,
"warnings": []
}
200: OK — Success with warnings
{
"success": true,
"message": null,
"data": null,
"warnings": [
"Store assortment was not imported, assortment not found by ID LPB-1",
"Store assortment was not imported, store not found by ID P0000099",
"Store was not imported by data StoreAssortmentData(assortmentId=LPB-1, storeId=), store ID is missing"
]
}
200: OK — Error
{
"success": false,
"message": "Failed to map JSON",
"data": null,
"warnings": []
}
DELETE https://{url}/stores/assortments/v1
Remove assortments from stores.
Request Body
The request body is a JSON array of objects with the following fields.
| Name | Type | Required | Description |
|---|---|---|---|
| store_id | string | Yes | Store unique identifier in the external system |
| assortment_id | string | Yes | Assortment unique identifier in the external system |
Request Example
[
{
"store_id": "P0000035",
"assortment_id": "LPB-1"
}
]
Response
200: OK — Success
{
"success": true,
"message": "",
"data": null,
"warnings": []
}
200: OK — Success with warnings
{
"success": true,
"message": null,
"data": null,
"warnings": [
"Store assortment was not imported, assortment not found by ID LPB-1",
"Store assortment was not imported, store not found by ID P0000099",
"Store was not imported by data StoreAssortmentData(assortmentId=LPB-1, storeId=), store ID is missing"
]
}
200: OK — Error
{
"success": false,
"message": "Failed to map JSON",
"data": null,
"warnings": []
}