The WebhookEvent JSON object is the JSON structure sent as the body of the post made to Webhook callback URLs.
Please reference the Webhook Overview to understand how the Webhook system works.
- Make sure you're familiar with JSON before continuing.
- The JSON objects are defined using Orderly. Optional attrs end with a "?" all others are required.
- isodate fields use one of these ISO 8601 format: 2014-01-01T10:30:00.000+01:00, 2014-01-01T10:30:00.000+0100, 2014-01-01T10:30:00.000Z
- Dsco reserves the right to add new attributes at any time so Partners should ensure their validators won't break should this happen
Definition
Referenced Objects:
Object { string webhookUuid; # The unique ID of the webhook that caused this event to be created and triggered string event[ORDER_CREATED, # The event will only trigger a callback to you if the data change event is this type (specify ORDER_UPDATED, # multiple webhooks to listen for multiple event types) INVENTORY_UPDATED, INVOICE_CREATED, INVOICE_UPDATED, ORDER_LINE_ITEM_STATUS_UPDATED ]; isodate eventDate; # The date and time the event was triggered for ref Order | # Order that changed (if is ORDER_CREATED/ORDER_UPDATED event) ref ItemInventory | # or Item that changed (if INVENTORY_UPDATED event) ref Invoice | # or Invoice that chagned (if INVOICE_CREATED/INVOICE_UPDATED) ref OrderItemStatusChanged payload; # or OrderItemStatusChanged data (if ORDER_LINE_ITEM_STATUS_UPDATED event) };
Example
{ "webhookUuid": "b5599fc5-053e-46ef-8f98-1e979bd1b5fe", "event": "ORDER_CREATED", "eventDate": "2015-04-04T10:12:00+01:00", "payload": <Order> }
Comments
Please sign in to leave a comment.