HomeGuidesAPI Reference
Log In
API Reference

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.

  • order_accepted - This event is triggered upon a 200 response from the Create Order API. The payload will also include all properties returned from the Create Order API.
  • 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.
  • driver_assigned- This event signals that a driver has been assigned to deliver the order.
  • 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 property cancelation_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, including partial refunds. For example, if an item is missing or out of stock, the cost of the item will be refunded. 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.

Language
Credentials
Header
Click Try It! to start a request and see the response here!