Payload
The previous section of the documentation describes how to create a webhook. This section focuses on the payload of the POST-requests that the
system sends when a webhook is invoked.Structure​
The structure of the payload of a POST-request that is sent when a trigger invokes a webhook is listed below. This structure is consistent across all resources for which webhooks can be created.
meta
:user_id
: the GUID of the user that initiated the trigger of the webhook.user_name
: the first and last name of the user that initiated the trigger of the webhook.company_id
: the company GUID of the company within which the trigger for webhook was initiated.
model
:guid
: the GUID of the model for which the trigger was initiated.type
: the type of the model for which the trigger was initiated.name
: the name of the model for which the trigger was initiated.
change
:props
: the latest values of all the properties for the model for which the trigger was initiated.changes
: the changed values for all the fields that have been changed in the model for which the trigger was initiated.
type
: the trigger that invoked the webhook. This can be one of create, update, delete or scan.time
: the date and time when the webhook was invoked.
Event​
There are four triggers that can invoke a webhook for an event: Create, Update, Delete and Scan. An update to an event can invoke up to two different webhook resources depending on the changed fields. Changes to an event-specific field (for example description
or name
) invoke the Event Update webhook while changes to the start and end dates of an event invoke the EventDate Update webhook. The code blocks below show the bodies of the POST-requests that the
- Create
- Update
- Delete
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "b048af93-13d9-45d0-9c3a-10a747de0767",
"type": "event",
"name": "Some Event Name"
},
"change": {
"props": {
"created_at": "2023-06-23T10:17:28+02:00",
"updated_at": "2023-06-23T10:17:28+02:00",
"guid": "b048af93-13d9-45d0-9c3a-10a747de0767",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
"location_id": "19dadee0-21df-4434-8592-f44a6ddd7fab",
"website": "",
"description": "With a description",
"name": "Some Event Name",
"subcategories": "other",
"category": "other",
"locale": "nl_NL",
"currency": "EUR",
"type": "once",
"gui_mode": "simple",
"status": "normal"
}
},
"type": "create",
"time": "2023-06-23T08:17:28Z"
}
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "b048af93-13d9-45d0-9c3a-10a747de0767",
"type": "event",
"name": "Some Event Name"
},
"change": {
"props": {
"deleted_at": null,
"updated_at": "2023-06-23T10:27:26+02:00",
"created_at": "2023-06-23T10:17:28+02:00",
"retrievable_after": null,
"auto_prune": 1,
"playpass_supplier_id": null,
"playpass_hmac_secret": null,
"playpass_hmac_access_id": null,
"playpass_tenant": null,
"subcategories": "other",
"category": "other",
"currency": "EUR",
"locale": "nl_NL",
"website": null,
"contact_phone": "",
"contact_email": "",
"contact_name": "",
"visitor_contact_url": "",
"visitor_contact_phone": "",
"visitor_contact_email": "",
"status": "normal",
"type": "once",
"gui_mode": "simple",
"email_info": null,
"description": "Now the description is different",
"name": "Some Event Name",
"event_refund_setting_id": null,
"payout_profile_id": null,
"location_id": "19dadee0-21df-4434-8592-f44a6ddd7fab",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
"guid": "b048af93-13d9-45d0-9c3a-10a747de0767"
},
"changes": {
"description": {
"val": "Now the description is different",
"old": "With a description"
}
}
},
"type": "update",
"time": "2023-06-23T08:27:26Z"
}
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "bee7df10-24bf-452f-b890-72f8892c5d93",
"type": "eventdate",
"name": "Some Event Name"
},
"change": {
"props": {
"updated_at": "2023-06-23T10:44:24+02:00",
"created_at": "2023-06-23T10:17:28+02:00",
"facebook_event_id": null,
"seats_event_key": null,
"end": "2023-08-01T14:00:00+02:00",
"start": "2023-08-01T11:00:00+02:00",
"capacity": 0,
"name": "Some Event Name",
"event_id": "b048af93-13d9-45d0-9c3a-10a747de0767",
"location_id": null,
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
"guid": "bee7df10-24bf-452f-b890-72f8892c5d93"
},
"changes": {
"start": {
"val": "2023-08-01T11:00:00+02:00",
"old": "2023-08-01T10:00:00+02:00"
}
}
},
"type": "update",
"time": "2023-06-23T08:44:24Z"
}
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "f441c893-cc1a-40b8-9069-10c20d7a2dd5",
"type": "event",
"name": "TestEvent"
},
"type": "delete",
"time": "2023-06-23T11:17:37Z"
}
Ticket​
There are four triggers that can invoke a webhook for a ticket: Create, Update, Delete and Scan. The code blocks below show the bodies of the POST-requests that the
system sends when one of these triggers invoke a webhook.When an invalid ticket is scanned, the direction
will be invalid.
- Create
- Update
- Delete
- Scan
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "f535ab84-4a6b-43c9-9172-582b28e965c3",
"type": "ticket",
"name": "Ticket One"
},
"change": {
"props": {
"created_at": "2023-06-23T10:57:54+02:00",
"updated_at": "2023-06-23T10:57:54+02:00",
"guid": "f535ab84-4a6b-43c9-9172-582b28e965c3",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
"event_id": "b048af93-13d9-45d0-9c3a-10a747de0767",
"name": "Ticket One",
"late_personalization": false,
"hide_without_coupon": false,
"combines_products": true,
"vat_percentage": 21,
"min_price": 0,
"available_stock": 0,
"status_overrule": "auto",
"swappable": true,
"percentage_service_costs_in_ticket": 0,
"availability_margin": 0,
"max_orderable_amount_per_order": 20,
"min_orderable_amount_per_order": 1,
"increment": 1
}
},
"type": "create",
"time": "2023-06-23T08:57:55Z"
}
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "f535ab84-4a6b-43c9-9172-582b28e965c3",
"type": "ticket",
"name": "Ticket One"
},
"change": {
"props": {
"deleted_at": null,
"updated_at": "2023-06-23T11:03:42+02:00",
"created_at": "2023-06-23T10:57:54+02:00",
"swappable": true,
"combines_products": true,
"hide_without_coupon": false,
"available_in_cashr": 0,
"seats_category_key": null,
"percentage_service_costs_in_ticket": 0,
"max_orderable_amount_per_order": 20,
"min_orderable_amount_per_order": 1,
"availability_margin": 0,
"available_until": null,
"available_from": null,
"increment": 1,
"scanned_count": 0,
"sold_count": 0,
"available_stock": 0,
"class": null,
"barcode_type": "generate",
"status_overrule": "auto",
"late_personalization": false,
"vat_percentage": 21,
"min_price": 0,
"description": "Now with description",
"name": "Ticket One",
"event_id": "b048af93-13d9-45d0-9c3a-10a747de0767",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
"guid": "f535ab84-4a6b-43c9-9172-582b28e965c3"
},
"changes": {
"description": {
"val": "Now with description",
"old": ""
}
}
},
"type": "update",
"time": "2023-06-23T09:03:42Z"
}
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "fb470cae-bb98-4c08-b6d3-292231e9a5e9",
"type": "ticket",
"name": "Ticket Two"
},
"type": "delete",
"time": "2023-06-23T09:44:11Z"
}
{
"scanner_id": "b048af93-13d9-45d0-9c3a-10a747de0767",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
"event_id": "b048af93-13d9-45d0-9c3a-10a747de0767",
"ticket_id": "f535ab84-4a6b-43c9-9172-582b28e965c3",
"order_ticket_id": "9b4604a0-11a5-11ee-9dfb-d9eb8451eea8",
"direction": "in",
"products": [],
"created_at": "2023-06-23T09:10:15.255+00:00",
"barcode": "T59TKBKCBBH4SNW"
}
Metadata​
There are three triggers that can invoke a webhook for metadata: Create, Update and Delete. The code blocks below show the bodies of the POST-requests that the
system sends when one of these triggers invoke a webhook.- Create
- Update
- Delete
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "c19087db-0b2c-4545-a5de-8f98644dc17a",
"type": "metadata",
"name": "Test Metadata Name"
},
"change": {
"props": {
"public": false,
"created_at": "2023-06-23T13:05:29+02:00",
"updated_at": "2023-06-23T13:05:29+02:00",
"guid": "c19087db-0b2c-4545-a5de-8f98644dc17a",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
"shop_description": "With extra information",
"name": "Test Metadata Name",
"forced": false,
"applies_to": "person",
"extra": "required",
"type": "string"
}
},
"type": "create",
"time": "2023-06-23T11:05:29Z"
}
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "c19087db-0b2c-4545-a5de-8f98644dc17a",
"type": "metadata",
"name": "Test Metadata Name"
},
"change": {
"props": {
"deleted_at": null,
"updated_at": "2023-06-23T13:07:12+02:00",
"created_at": "2023-06-23T13:05:29+02:00",
"auto_fill_facebook": null,
"class": null,
"copy_on_swap": 0,
"forced": true,
"public": 0,
"default": null,
"extra": "required|alpha",
"applies_to": "person",
"type": "string",
"shop_description": "With extra information",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
"guid": "c19087db-0b2c-4545-a5de-8f98644dc17a"
},
"changes": {
"forced": {
"val": true,
"old": false
},
"extra": {
"val": "required|alpha",
"old": "required"
}
}
},
"type": "update",
"time": "2023-06-23T11:07:12Z"
}
{
"meta": {
"user_id": "535f11b0-0139-11ee-90b9-3766c05c0783",
"user_name": "Firstname Lastname",
"company_id": "53512e90-0139-11ee-8d31-79feaa0dd8b4",
},
"model": {
"guid": "c19087db-0b2c-4545-a5de-8f98644dc17a",
"type": "metadata",
"name": "Test Metadata Name"
},
"type": "delete",
"time": "2023-06-23T11:07:43Z"
}