Sales
Frequency:
The sales data is retrieved once a day, at an agreed-upon time, for the previous date.
Expected data:
Data about sales for a specific store and date.
- Positive Sales Quantities: Only records with positive sales quantities should be reported.
- Active Articles: Sales data should include only articles that are purchase active.
- Store Active Assortment: Include sales data for articles that are part of the store's active assortment.
Excluded sales data:
- Negative or Zero Sales: Sales data with negative or zero quantities should not be reported.
- No Sales: If there are no sales for an article, it should not be included in the report.
- Discounted Sales: Sales where the price is reduced because the article cannot be sold on time (e.g., nearing the end of its shelf life) should not be reported. These are considered 'lost' sales and are not to be confused with promotion sales.
Technical:
If a sales record does not exist in DSOrder, the record will be created.
If a sales record already exists in DSOrder, the existing record will be updated with the new data.
Import Sales
Method: POST
URL: https://{url}/sales/{date}/{store_id}
Create or update sales data for a specific store and date.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| date | string | Yes | Date in format yyyy-mm-dd |
| store_id | string | Yes | Unique store identifier in external system |
Request Body
The request body is a JSON array of objects.
| Name | Type | Required | Description |
|---|---|---|---|
| article_id | string | Yes | Unique article identifier in external system |
| quantity | number | Yes | Sales total quantity |
Request Example
[
{
"article_id": "ART-00001",
"quantity": 123
},
{
"article_id": "ART-00002",
"quantity": 12.250
}
]
Response
200: OK — Success
{
"success": true,
"message": null,
"data": null,
"warnings": []
}
200: OK — Error
{
"success": false,
"message": "Sales import failed",
"data": null,
"warnings": []
}