Show a sample event
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/webhook-subscriptions/v1-webhook-subscription-sample.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
GET/
Builds the event YoPrint would send for event_name, from your team's latest matching record, without sending anything. Use it to see the exact payload of an event before you subscribe.
The response is the bare event body (id, type, payload, created_at, updated_at), without the usual success, status and data envelope, because YoPrint's Zapier app reads it as is. The sample id is not a real event id.
When the team has no record the event could use (for example, no published sales order), the response is the usual envelope with an empty list: {"success": true, "status": 200, "data": []}.
Business rules
event_nameis one of the event names YoPrint sends (see Create a webhook subscription).allis not accepted.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The event to build a sample of: one of the names in the "Events" table on Create a webhook subscription, such as
order.created.alland unknown names answer 400event_not_found.- One of:
"order.created","quote.created","order.deleted","quote.deleted","order.restored","quote.restored","quote.converted_to_sales_order","order.converted_to_quote","order.marked_as_rush","order.marked_as_not_rush","sales_order.status_changed","quote.status_changed","order.status_changed","job.status_changed","job.marked_as_rush","job.marked_as_not_rush","work_pipeline.status_changed","shipment.status_changed","purchase_order.status_changed","order_approval.approved","order_approval.change_requested","job_approval.approved","job_approval.change_requested","payment_received.any_amount","payment_received.deposit_amount","payment_received.full_amount","payment.refund_issued","customer_credit.deposited","customer_credit.withdrew","customer.created","customer.updated","customer.deleted","customer_contact.created","customer_contact.updated","customer_contact.deleted","message.received_customer","message.received_purchase_order","message.customer_bounced","message.bounced_purchase_order","message.status_changed" - Example
order.created
- One of:
Request body
This operation takes no request body.
Response
200The sample event, or an empty envelope when the team has no matching record.
Errors
400The event name is not one YoPrint sends.
- When
- YoPrint doesn't send an event with that name (
event_not_found). - Fix
- Use a name from the "Events" table on Create a webhook subscription.
401The API key is missing or wrong (
unauthenticated).- When
- The API key is missing or wrong.
- Fix
- Send your personal API key as
Authorization: Bearer YOUR_API_KEY.
403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.
Notes
- The sample reads real team data, such as the latest published sales order, and may include customer names and emails.
- The three
payment_received.*names all return a sample withtypepayment_received.any_amount; their payloads have the same shape.
Related
- POSTCreate a webhook subscription
/v1/ api/ store/ {team_slug}/ setting/ webhook_subscription
