v1
latestOpenAPI 3.0.02026-07-24189145350.1 KBOrders
Add 1 or more orders
Endpoint to add Orders
post/orders
Request body
Example request
[
{
"date": "2022-12-31",
"timeWindow": [
{
"from": "08:00",
"to": "13:00"
}
],
"merchants": [
{
"_id": 1
}
]
}
]Response
Order/s added On Error, meta object will contain an error array with these possible values
Error codes:
| Code | Description | Field |
|---|---|---|
| 1001 | Wrong time window object | timeWindow |
| 2002 | Wrong time window values, must be string | timeWindow |
| 2003 | Wrong time window, 'from' must be less than 'to' | timeWindow |
| 2004 | Wrong time window, times are overlapped | timeWindow |
| 2020 | Order code already present for this user | code |
| 2021 | Order code not found or not allowed for this user | code |
| 2026 | Invalid operation type | operation |
| 2032 | Poi id not found or not allowed for this user | poiId |
| 2037 | totalAmount must be greater than zero and not empty | totalAmount |
| 2038 | orderItems and orderMeasures are not allowed for collection orders | orderItems, orderMeasures |
| 2039 | orderStatus not found or not allowed for this user | statusId |
| 2051 | Merchant id not found or not allowed for this user | merchants |
| 2052 | Exceeded limit of 3 emails per order | merchants |
| 2054 | subStatus not found or not allowed for this user | subSstatusId |
Example response
{
"data": [
{
"date": "2022-12-31",
"qtn": "ABC123",
"timeWindow": [
{
"from": "08:00",
"to": "13:00"
}
],
"merchants": [
{
"_id": 1
}
]
}
]
}