post https://api.mealme.ai/account/tracking/add_webhook
Use this API to subscribe to events that occur during order orchestration.
Webhook Events
The POST request to your callback URL will have a payload that consists of at least the following two string properties: order_id
and event
. Below you'll find a comprehensive list of all event
types.
store_confirmed
- This event is triggered when the restaurant or grocery store has accepted the order.pickup_ready
- This event is triggered when the restaurant or grocery store has signaled that the pickup order is ready.delivery_3_minutes_away
- This event signals that the delivery driver is 3 minutes away from the delivery address.driver_arrived
- This event signals that the delivery driver has arrived to the destination.order_canceled
- This event is triggered when the restaurant, grocery store, or DSP has canceled the order. Please refer to this guide to learn more about how refunds and cancelations are handled. The payload may also include the string propertycancelation_reason
. Below is a list of all values this property can take on.Payment failed
- This reason signals that the order was canceled due to failure in charging the customer's credit card.
order_refunded
- This event is triggered for all refunds provided for an order. The payload will also include the integer property:refund_amount
.chat_initiated
- This event signals that a chat was initiated with the initiate chat endpoint. The payload will also include the string property:chat_id
.
Example POST request
Here's an example POST request that will be made for an order that was confirmed by the store, after being created using the Create Order API and setting the input parameter place_order
to true
, or finalized using the Finalize Order API.
Example callback URL: https://mealme.ai/tracking_webhook
curl --location 'https://mealme.ai/tracking_webhook' \
--header 'Content-Type: application/json' \
--data '{
"order_id": "-Mxak0IAuif3TvN9hBP7",
"event": "store_confirmed"
}'
Note:
The Webhooks sent sometimes can be duplicated.