Skip to main content

Get Outbound Event Sample Payload

GET 

/api/webhook-events/:event/sample

Returns up to 3 most-recent real records for the named event, each shaped exactly like the live webhook payload. Backs sample-record discovery for connected apps. Returns an empty data array if the tenant has no matching records yet.

Required scope: webhooks:read|webhooks:manage

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Requires webhooks:read or webhooks:manage, AND the event's own READ scope (e.g. orders:read for sales_order.* events) — a token carrying only a webhooks scope receives 403.

Sales order payload notes

  • currency, customer_name, customer_email, customer_company and store_name report the sales-channel snapshot recorded on the order when one exists, and fall back to the linked customer, store and currency records otherwise — so a manually-created order carries the same identity fields as a channel order.
  • An order has no warehouse of its own; the warehouse is chosen per line. Order-level warehouse_id and warehouse_name are therefore reported only when every line ships from the same warehouse, and are null for a split order. The per-line warehouse_id / warehouse_name are always present and are the authoritative value to route on.
  • subtotal, tax_total, total and the per-line unit_price / total are decimal strings with two places, not numbers. tax_total reports the stored tax when the order has one and the calculated tax otherwise.
  • lines is capped at 100 entries; line_count always reports the true total, so compare the two to detect truncation.
  • sku and name come from the linked product. A line with no product reports sku: null and falls back to the line's own description for name.

Purchase order payload notes

  • supplier_name and destination_warehouse_name are resolved from the linked supplier and warehouse records, so they are populated on every delivery regardless of how the purchase order was created.
  • total_cost, tax_total and the per-line unit_cost / total are decimal strings with two places, not numbers. total_quantity and the per-line quantity_ordered / quantity_received are numbers, because a line may be ordered in fractional units.
  • The per-line total is the line's extended cost after its discount — quantity × unit cost less the extended discount — so summing it, not quantity_ordered × unit_cost, reconciles against total_cost.
  • lines is capped at 100 entries; line_count always reports the true total, so compare the two to detect truncation.
  • Every purchase order line references a product, so sku and name come from that product. The line's own description is a note on the line, not the item name.

Request

Responses

OK

Response Headers
    Content-Type