Skip to main content

Webhook

Overview​

The LORA API allows customers to leverage real-time subscriptions to events on models in the LORA system.

When an event is detected on a model belonging to an organization with a webhook binding, that change is forwarded to your API.

Webhooks are delivered to a predetermined callback URL using the GET/POST method. The URL is expected to be provided by the client.

Collections​

Collection nameSupported ActionsMethodDescription
showShowCreatedGET/POSTApplicable to all creating show with in an organization
productTBCTBCTBC

Common data model​

{
Action, // see appendix for the list of values
Category, // see appendix for the list of values
Timestamp, // a Datetime with timezone at the time of webhook is triggered by LORA
Payload, // the detail datamodel that LORA send out via webhook - ref appendix for detail
}

Depending on the Action & Category, the Payload will be changed accordingly to the right business model.

Show​

ShowCreated​

Pre-requisite: The admin must be registered to the event via LORA CMS

Event Description: triggered when a LIVE show is set up and created successfully.

Sample output​

Assume that admin registered on CMS with the webhook url as following:

https://mywebhook.com/hook/showcallback

For GET method​

Data will be sent out by

Request url:

https://mywebhook.com/hook/showcallback?action=ShowCreated&category=Show.ShowCreated&payload=[serialized-as-json]&timestamp=[datetime with timezone]

For POST method​

Data will be sent out by

Request url:

https://mywebhook.com/hook/showcallback

Payload: follow the common data model

Appendix​

Definition for Category​

NameDescriptionNote
Show.ShowCreatedShow is createdAvailable in LORA version 4.0

Definition for Action​

NameDescriptionNote
ShowCreatedShow is createdAvailable in LORA version 4.0

Payload model for ShowCreated​

FieldData typeDescriptionVersion
showIdstringId of the show4.0
titlestringTitle of the show4.0
hostIdnumberUser id of host4.0
themeIdnumberThe id of selected theme4.0
productIdsstring[]The array of all selected product Ids in the show.
Ex: [“1”, “2”]
4.0
shareLinkstringTitle of the show4.0
coverImageFileUrlstringTitle of the show4.0
placeHolderImageFileUrlstringTitle of the show4.0
isObsbooleanTitle of the show4.0
vouchersobject[]The list of vouchers that is added to the show
See Voucher model for more detail
4.0

Voucher data model​

FieldData typeDescriptionVersion
codestringCode of voucher4.0
descriptionstringDescription of voucher4.0
discountnumberAmount to be discount4.0