Calling up order rejection
Getting a list of order rejection reasons
Query example
GET https://delivery.ucs.ru/orders/api/v1/rejectionReasons
Response example
{
"result": [
{
"ID": "a762a6da-2379-4fa2-9a04-7f5ca82b39d4",
"reason": "Test order",
"type": "simple",
"isPossibleDelete": true
},
{
"ID": "4239979e-093c-43c0-8351-6918364c5c94",
"reason": "Duplicate",
"type": "simple",
"isPossibleDelete": true
},
{
"ID": "37631981-7d11-4e36-8465-dd1887d888cc",
"reason": "Rejected by guest",
"type": "simple",
"isPossibleDelete": true
},
{
"ID": "7c224784-7382-4a47-8e5a-849d8529a34a",
"reason": "Guest is not available / has not opened the door",
"type": "simple",
"isPossibleDelete": true
},
{
"ID": "bb8502fa-dfcc-4196-a306-08ec526abc91",
"reason": "Dish is not available",
"type": "simple",
"isPossibleDelete": true
},
{
"ID": "73f8e0eb-06d5-489f-8258-42a941bede14",
"reason": "Rejected by restaurant",
"type": "simple",
"isPossibleDelete": false
},
{
"ID": "5ff37e88-61ef-46ff-9f6c-4c9579e74210",
"reason": "Other",
"type": "text"
"isPossibleDelete": true
}
]
}
The response in case of a successful order rejection: 200 OK.
Order rejection
Query
PUT https://delivery.ucs.ru/orders/api/v1/orders/{orderID}/reject
Content-Type: application/json
Query example
{
"rejectionReasonID": "7ca12506-0c20-4417-88b2-2a5b0d237770",
"rejectionReasonText": "Rejected by guest"
}
Query example (if order rejection reasons are turned off)
{
"rejectionReasonID": "",
"rejectionReasonText": ""
}
Parameters description
Parameter | Description | |
---|---|---|
rejectionReasonID | string | Order rejection reason ID |
rejectionReasonText | string | Text of order rejection reason |
The order ID (orderID) is used as an identifying code.
The query may also contain the restaurant ID (restaurantID) as related information.
Find the errors description in this article.