Skip to main content

Subscribing to Order Notifications

Subscribing to Order Notifications

Subscribing to Order notifications works in the same way as for other event subscriptions documented in the Subscription API [relink] section. Please refer to this section for detailed information, including what input fields and enums are available.

When subscribing to Order notifications please use:

  • EventEntity enum of Order

  • EventKey enums of submitted, accepted, rejected, cancelled, uncancelled , relish_finalized

  • ParentEntity enum should be Caterer

Variables

Below is a example of the variables that would be used with Subscription Create to subscribe to Order notifications.

Variables

{
"subscriptionParams": {
"eventEntity": "Order",
"eventKey": "accepted",
"parentEntity": "Caterer",
"parentId": "ezcater-caterer-id",
"subscriberId": "your-subscriber-id"
}
}

Notifications

Notification - Submitted

{
"id": "notification-id",
"parent_type": "Caterer",
"parent_id": "ezcater-caterer-id",
"entity_type": "Order",
"entity_id": "your-ezcater-order-id",
"key": "submitted",
"created_at": "2025-04-15 23:48:23 UTC",
"occurred_at": "2025-04-15 23:48:21 UTC",
"updated_at": "2025-04-15 23:48:23 UTC",
"payload":null
}

Notification - Accepted

{
"id": "notification-id",
"parent_type": "Caterer",
"parent_id": "ezcater-caterer-id",
"entity_type": "Order",
"entity_id": "your-ezcater-order-id",
"key": "accepted",
"created_at": "2025-04-15 23:48:23 UTC",
"occurred_at": "2025-04-15 23:48:21 UTC",
"updated_at": "2025-04-15 23:48:23 UTC",
"payload":null
}

Notification - Failed

{
"id": "notification-id",
"parent_type": "Caterer",
"parent_id": "ezcater-caterer-id",
"entity_type": "Order",
"entity_id": "your-ezcater-order-id",
"key": "rejected",
"created_at": "2025-04-15 23:48:23 UTC",
"occurred_at": "2025-04-15 23:48:21 UTC",
"updated_at": "2025-04-15 23:48:23 UTC",
"payload":null
}

Example - Cancelled

{
"id": "notification-id",
"parent_type": "Caterer",
"parent_id": "ezcater-caterer-id",
"entity_type": "Order",
"entity_id": "your-ezcater-order-id",
"key": "rejected",
"created_at": "2025-04-15 23:48:23 UTC",
"occurred_at": "2025-04-15 23:48:21 UTC",
"updated_at": "2025-04-15 23:48:23 UTC",
"payload":null
}

Order Event Notification Flows

After initial Order submitted and accepted or rejected notifications, the only notifications for an order are accepted, rejected, and cancelled. Below are some example order notification flows.

Order Submitted

Subscription notifications will be received for:

  • submitted

Order Submitted -> Accepted

Subscription notifications will be received for:

  • submitted, accepted

Order Submitted -> Rejected

Subscription notifications will be received for:

  • submitted, rejected, cancelled

Order Submitted -> Rejected -> Uncancelled

Subscription notifications will be received for:

  • submitted, rejected

  • Note: no uncancelled notification will be received, however once it is re-`accepted` or rejected other webhooks will be received

Order Submitted -> Rejected -> Uncancelled -> Accepted

Subscription notifications will be received for:

  • submitted, rejected, accepted

  • Note: no uncancelled notification will be received

Order Submitted -> Accepted -> Cancelled -> Uncancelled

Subscription notifications will be received for:

  • submitted, accepted, cancelled

  • Note: no uncancelled notification will be received, however once it is reaccepted or rejected other notifications will be received

Order Submitted -> Accepted -> Cancelled -> Uncancelled -> Accepted

Subscription notifications will be received for:

  • submitted, accepted, cancelled, accepted

  • Note: no uncancelled notification will be received

Order Submitted -> Accepted -> Modified -> Accepted

Subscription notifications will be received for:

  • submitted, accepted, accepted

  • Note: no modified notification will be received

Order Submitted -> Accepted -> Modified -> Accepted > Cancelled

Subscription notifications will be received for:

  • submitted, accepted, accepted, cancelled

  • Note: no modified notification will be received

Order Submitted -> Accepted -> Modified > Rejected

Subscription notifications will be received for:

  • submitted, accepted, rejected

  • Note: no modified notification will be received

  • Note: rejected order modifications will not result in a canceled notification, ezCater is working behind the scenes to save the order

Order Submitted > Accepted > Modified > Rejected > Cancelled

Subscription notifications will be received for:

  • submitted, accepted, rejected, cancelled

  • Note: no modified notification will be received

Order Submitted -> Accepted -> Modified > Rejected -> Cancelled -> Uncancelled

Subscription notifications will be received for:

  • submitted, accepted, rejected, cancelled

  • Note: no modified notification will be received

  • Note: no uncancelled notification will be received, however once it is again accepted or rejected other notifications will be received

Order Submitted -> Accepted -> Modified -> Cancelled -> Uncancelled -> Accepted

Subscription notifications will be received for:

  • submitted, accepted, rejected, cancelled, accepted

  • Note: no modified notification will be received

  • Note: no uncancelled notification will be received

Order Submitted -> Accepted -> Store Changed

Subscription notifications will be received for:

  • submitted, accepted

  • Note: agents are trained to cancel and replace orders, but if this does not happen

Order Submitted -> Accepted -> Modified -> Cancelled for Replacement

Subscription notifications will be received for:

  • submitted, accepted

  • Note: no modified, cancelled or rejected notification will be received for original order

Order Submitted -> Cancelled for Replacement

Subscription notifications will be received for:

  • submitted

  • Note: no cancelled or rejected notification will be received for the original order

Meal Program Order Finalized

Subscription notifications will be received for:

  • relish_finalized

  • Note: submitted and accepted notifications will not be received for Meal Program orders, as Meal Program orders are submitted two weeks before delivery time as placeholders that contain no menu items. relish_finalized is transmitted shortly after the cut-off time for that order, and indicates that the order has been populated with all items to be delivered.

Did this answer your question?