Subscriptions

Subscriptions are similar to webhooks except that subscriptions will use one URL callback for all orders or invoice of the account, and it is possible to specify the events which will call the URL. It is much more granular and flexible. An account may have multiple subscriptions.

Possible event types for orders subscriptions are:

  • order_created
  • order_dispatched
  • order_assigned
  • order_picked_up
  • driver_unassigned
  • driver_arrived_at_pickup
  • driver_arrived_at_delivery
  • order_delivered
  • order_cancelled
  • order_on_hold
  • order_released
  • pickup_from_time_updated
  • delivery_time_window_updated
  • proof_of_delivery_added

Possible event types for invoice subscriptions are:

  • invoice_completed
  • invoice_cancelled

Examples

Request payload for creating an order subscription for when an order is created and delivered:

{
  "Url": "https://my-order-webhook.com",
  "EventTypes": [
    "order_created",
    "order_delivered"
  ]
}

Request payload for creating an invoice subscription for when an invoice is completed:

{
  "Url": "https://my-invoice-webhook.com",
  "EventTypes": [
    "invoice_completed"
  ]
}