SkyBox API

Webhook Subscriptions

To receive Webhook notifications, first a subscription using the following API is needed.

Notes

Order of Webhook notifications is not guaranteed and should not be assumed.

SkyBox is not liable for a Webhook notification not being triggered, sending out of order, or sending multiple times resulting in a missed or duplicated action by a user or integrator. Periodic (much less frequent) “clean-up” polling API calls to ensure all events have been properly detected are encouraged.

Please configure your Webhooks handling process in such a way as to make acknowledging receipt of push notifications asynchronous from actually taking the action(s) that a push notification prompts. Timeouts on notification messages are intentionally kept very short (1 second)- a failure to acknowledge messages quickly could result in unnecessary errors.

If many subsequent attempts to deliver a notification fail, SkyBox will automatically "mute" push notifications from being sent for a short period of time. When that suspension period expires, notifications will resume. If, upon resumption, notifications still result in delivery/acknowledgement failures, notifications will again be muted, but for a longer period. This process will repeat until notifications are muted for time periods as long as 24 hours. Each time a "muting" occurs, you will receive an email to the email address on file with your application informing you.

UPDATE- August 7th, 2020

We have added capabilities to SkyBox’s webhooks that result in the following:

Headers

All the endpoints consume and produce application/json. All three below headers are required for authentication:

X-Application-Token

X-Api-Token

X-Account

Endpoints

The following endpoints are available to configure Webhook subscriptions to receive Webhook notifications:

GET /webhooks

GET /webhooks

Returns all the Webhook subscriptions configured by the application on the account specified in the authentication headers.

POST /webhooks

POST /webhooks

Used to create a Webhook subscription. The request body must have the following fields:

1 2 3 4 5 6 7 { "topic": String "url": String "headers": String "secret": String }
topic one of the accepted topics (INVENTORY, PURCHASE, INVOICE, LINE, HOLD)
url the URL where the webhook notifications must be sent. E.g. “https:mydomain.com/skybox/webhooks”. The webhook notification will be sent to this URL using a POST http request with the notification event data in the body
headers the headers that the http requests of the Webhook notifications must have for security, identification or any reason that a header is needed. E.g. “User: SkyTest,Password: password,Id: SkyboxWebhooks“
secret key used to create a HmacSHA1 Message Authentication Code (MAC) with the payload of the message. This hex string is sent in a header called Webhooks-Signature

PUT

Used to modify a Webhook subscription. The request body must have the same fields used in creation. The id of the Webhook to update must be included as path parameter.

PUT /webhooks/{id}

DELETE

Used to delete a Webhook subscription. The id of the webhook to delete must be included as path parameter.

DELETE /webhooks/{id}

GET

Used to retrieve a Webhook subscription in particular. The desired webhook ID must be included as path parameter.

GET /webhooks/{id}

Webhook Notification

Topics:

SkyBox will send a notification for the following topics:

INVENTORY

A notification is sent when a listing is CREATED or UPDATED.

A listing can be retrieved using the GET /inventory/{id} endpoint.

GET /inventory/{id}

PURCHASE

A notification is sent when a purchase is CREATED or UPDATED.

A purchase order can be retrieved using the GET /purchases/{id} endpoint.

GET /purchases/{id}

INVOICE

A notification is sent when an invoice is CREATED or UPDATED.

An invoice can be retrieved using the GET /invoices/{id} endpoint

GET /invoices/{id}

LINE

A notification is sent when a line is CREATED or UPDATED.

A line can be retrieved using the GET /lines/{id} endpoint

GET /lines/{id}

HOLD

A notification is sent when a hold is CREATED, UPDATED or DELETED.

A hold can be retrieved using the GET /holds/{id} endpoint

GET /holds/{id}

Events:

After a subscription is configured for an account using a topic, all the events related to that topic are sent as notifications when the account performs an action related to that topic.

The events are in the payload of the requests sent to the URL set in the subscription and they are as follows:

1 2 3 4 5 6 7 8 9 { "id": Number "accountId": Number "topic": String "action": "CREATED"|"UPDATED"|"DELETED" "generatedBySameAccount": true|false "current": Entity - will be named something like 'invoice' depending on topic "previous": Entity - Optional, on UPDATED actions only }
id unique identifier of the instance to which the notification refers. The type of the instance and the endpoint that can be used to retrieve the instance details depend of the topic of the notification
accountId account of the instance
topic one of the accepted topics (INVENTORY, PURCHASE, INVOICE, LINE, HOLD)
action action that generated the event (CREATED, UPDATED or DELETED, according to the topic)
generatedBySameAccount whether or not the push notification you are receiving was authored by the same application through which you registered for the webhook
current SkyBox entity in question (see topic for details) containing only the relevant fields - on UPDATE it will contain only differences found in relevant fields. Will be renamed according to topic in question (inventory, purchase, invoice, line, hold) - see examples below.
previous SkyBox entity in question (see topic for details) containing only differences found in relevant fields. Only available on UPDATED actions

Examples

Example of usage

The following is an example of a subscription that will receive all notifications regarding Inventory changes.

1. Add a subscription sending a POST to https://skybox.vividseats.com/services/webhooks:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 POST https://skybox.vividseats.com/services/webhooks Headers: > Accept: application/json > X-Account: 1234 > X-Api-Token: ************************************ > X-Application-Token: ************************************ > Content-Type: application/json Body: { "topic": "INVENTORY", "url": "https://example.com", "headers": "Bearer: dc70454c-d10a-4ffd-bac1-bef1a24f4330,Id: Sky", "secret": "ALittleSecret" }

2. A user creates InventoryId 20, prompting a Webhook notification to be sent to https://example.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 POST https://example.com Headers: > Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 > Content-Type: application/json > Bearer: dc70454c-d10a-4ffd-bac1-bef1a24f4330 > Id: Sky > Webhooks-Signature: b6ba38ab28b31f9dd728f1df7aba3fa8c2e11ea3 > User-Agent Jersey/2.28 (HttpUrlConnection 1.8.0_151) > Accept: application/json Body: { "id":20, "accountId":1234, "topic":"INVENTORY", "action":"CREATED", "generatedBySameAccount":false, "inventory":{ "inHandDate":"2020-08-14", "eventId":12345, "quantity":1, "section":"B", "row":"C", "lowSeat":50, "highSeat":50, "cost":70.0, "ticketIds":[10101021], "stockType":"ELECTRONIC", "splitType":"NEVERLEAVEONE", "listPrice":70.0, "publicNotes":"a public note", "attributes":"any", "tags":"sports", "exchangePosId":10102021, "broadcast":true, "zoneSeating":false, "hideSeatNumbers":false, "shownQuantity":null, "filesUploaded":true, "barCodesEntered":true } }

3. A user or integrator made a price change on InventoryId 20, prompting a Webhook notification to be sent to https://example.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 POST https://example.com Headers: > Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 > Content-Type: application/json > Bearer: dc70454c-d10a-4ffd-bac1-bef1a24f4330 > Id: Sky > Webhooks-Signature: b6ba38ab28b31f9dd728f1df7aba3fa8c2e11ea3 > User-Agent Jersey/2.28 (HttpUrlConnection 1.8.0_151) > Accept: application/json Body: { "id":20, "accountId":1234, "topic":"INVENTORY", "action":"UPDATED", "generatedBySameAccount":true, "inventory":{ "cost":80.0 }, "previous":{ "cost":70.0 } }

4. A call to SkyBox to search the details of the relevant inventory (ID=20) should be made (if necessary):

1 2 3 4 5 6 7 GET https://skybox.vividseats.com/services/inventory/20 Headers: > Accept: application/json > X-Account: 1234 > X-Api-Token: ************************************ > X-Application-Token: ************************************ > Content-Type: application/json

Example of actions that fire events

Create a purchase with inventory lines and generic lines:

A split of a listing into 2 listings:

A merge of 2 listings:

Create an invoice with inventory lines and generic lines: