Skip to main content

Reserve the delivery promise

When a customer proceeds to checkout, and before payment is completed, Future Ordering sends a WaitingForReservation event with information about which delivery to reserve. The deliveryId is the same as the promiseId you provided when creating promises.

{
"id": "a3f2b1c4-5d6e-7f8a-9b0c-1d2e3f4a5b6c",
"topic": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-delivery/providers/Microsoft.EventGrid/topics/delivery-events",
"subject": "/fo/production/delivery/promises/",
"eventType": "FO.Delivery.WaitingForReservation",
"eventTime": "2026-04-17T10:30:00+00:00",
"dataVersion": "1",
"data": {
"code": "promise-abc123",
"dspName": "FastCourier",
"tenantId": "tenant-se-001",
"correlationId": "corr-7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b",
"deliveryId": "del-b2c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
"storeId": "store-a1b2c3",
"estimatedPickupTime": "2026-04-17T11:00:00+00:00",
"estimatedDropOffTime": "2026-04-17T11:45:00+00:00",
"omsOrderId": "oms-12345678",
"omsOrderName": "1234",
"asapOrder": true
}
}

Respond to the reservation endpoint with the result of the reservation.

POST delivery/{orderId}/reservation

Failed

{
"status": "Failed",
"estimatedPickupTime": "0001-01-01T00:00:00+00:00",
"estimatedDropOffTime": "0001-01-01T00:00:00+00:00",
"errorInfo": {
"code": "RESERVATION_REJECTED",
"message": "The delivery service provider rejected the reservation request",
"data": {
"reason": "no_couriers_available",
"storeId": "store-a1b2c3"
},
"innerError": null
}
}

Success

{
"status": "Succeeded",
"estimatedPickupTime": "2026-04-17T11:00:00+00:00",
"estimatedDropOffTime": "2026-04-17T11:45:00+00:00",
"errorInfo": null
}

Once a successful reservation is received, the user experience continues with payment and then order placement in the POS.