POST Delivery Promise Create
The endpoint will return the estimated delivery time if the delivery is available.
Endpoint verifies drivers and DSPs availability for delivery for one or multiple stores. The quotes provided by drivers and DSPs are compared and the best delivery quote is selected.
Headers
- Type: stringAcceptrequired
Accept header
- Type: stringAuthorizationrequired
Authorization header
- Type: stringContent
- Type requiredContent-Type header
- Type: stringA
P I - V E R S I O N requiredAPI version
- Type: stringApplicationrequired
Application key
- Type: stringX
- Request - I D requiredUnique request identifier
Body
- Type: stringexpected
_delivery _time - Type: numberFormat: floatlatitude
- Type: numberFormat: floatlongitude
- Type: array of stringstore
_ids
Responses
- application/json
Request Example for post/dispatch-service/promises
curl https://api-public-demo.menu.app/api/dispatch-service/promises \
--request POST \
--header 'Accept: application/json' \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--header 'API-VERSION: ' \
--header 'Application: ' \
--header 'X-Request-ID: c10b4a70-6274-490d-80a0-03e7bb826937' \
--data '{
"expected_delivery_time": "2023-08-11 17:00:00",
"store_ids": [
"b8baafab-3f22-11ed-936c-1a67b454859d"
],
"latitude": 45.263273710844025,
"longitude": 19.831003078597004
}'
{
"status": "OK",
"code": 200,
"data": {
"promises": [
{
"token": "3921ed0b-f4a6-40eb-89a4-d68b64f6fb77",
"state": "Ready to order",
"store_id": "b8b96123-3f22-11ed-936c-1a67b454859d",
"order_token": "null",
"expected_delivery_time": "2023-01-23T19:00:00.000Z",
"estimated_pickup_time": "null",
"estimated_delivery_time": "2023-05-24T13:57:40.000Z",
"estimated_delivery_fee": 705,
"target_delivery_providers": [
"dsp1"
],
"external_delivery_provider_promise_order_id": "null"
}
]
}
}