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.

Export payload notes (export.completed, export.failed)

  • Fires when a background export reaches a final state. Exports over 1,000 rows run in the background and respond with a tracked_job_log_id; this event carries the same id, so you can match the delivery to the request that started it instead of polling GET /api/tracked-job-logs/{trackedJobLog}.
  • Delivered only to the subscriptions of the user who started the export — an export can contain financial columns, so it is never broadcast to every subscriber on the account. The sample endpoint likewise returns only your own exports.
  • download_url is absolute but still requires your API token (the same Bearer token you use for every request); it is null on export.failed. row_count and filename are null when the export produced no file.
  • error is the failure reason on export.failed and null on export.completed.
  • Requires the jobs:read scope to subscribe and to view samples.

Request​

Responses​

OK

Response Headers
    Content-Type