Introduction
Amilia's Webhooks form a complement to the API. You can subscribe to a webhook to stay informed, in real-time, of changes to the platform, removing the need to poll the API endpoints continuously. This reduces overhead and allows you to react faster to new information.
You can subscribe to the webhooks through the API management UI under the admin settings tab
(Webhooks 'Module' must be enabled), or through the webhooks API endpoint.
You'll need to specify a name, URL and the context / action for each webhook.
Delivery and failure modes
The webhooks will be sent with an http post request to the URL you specify, and expect an
HTTP 200 response as soon as possible. In case an error message is received,
the webhook will be retried at a regular interval for approximately 72 hours, after which
the webhook subscription will be disabled and any messages remaining in the queue will be
discarded.
You can see the status of your webhook subscriptions in the API management tab, or poll them
through the API endpoint.
Program
A program is a set of activities organized in a hierarchy. It can have categories and subcategories.
# Create Program
This webhook will fire when a new program is created.
# Update Program
This webhook will fire on a program update, such as a name change.
# Delete Program
This webhook will fire on a program being archived.
Account
This is the webhook context Account.
# Create Account
This is the webhook payload returned when the action Create is called with the context Account.
# Update Account
This is the webhook payload returned when the action Update is called with the context Account.
# Delete Account
This is the webhook payload returned when the action Delete is called with the context Account.
Person
This is the webhook context Person.
# Create Person
This is the webhook payload returned when the action Create is called with the context Person.
# Update Person
This is the webhook payload returned when the action Update is called with the context Person.
# Delete Person
This is the webhook payload returned when the action Delete is called with the context Person.
FacilityBooking
A facility booking is any action that results in a facility being occupied for a time, for example an activity, a client reservation or a facility closing.
Webhook generated id prefix | Description |
---|---|
AB- | Admin booking |
AC- | Activity |
PL- | Private lesson |
FB- | Facility booking |
RC- | Rental contact |
CR- | Client reservation |
# Create FacilityBooking
This webhook will fire on a facility booking, which can be any one of the following: an activity being created, a private lesson booking, an admin facility booking, a client reservation of a facility through the checkout, or a rental contract being finalized. Note that a facility closure will fire a admin booking creation webhook.
# Update FacilityBooking
This webhook will fire on a facility booking update, such as changing the time of an admin booking, or an activity being rescheduled.
# Delete FacilityBooking
This webhook will fire on a facility booking deletion, such as cancelling an activity or refunding a client reservation.
MembershipPurchased
A membership can take different forms: it can be a membership card, an annual fee, an activity-specific membership, etc.
# Create MembershipPurchased
This webhook will fire on a membership being purchased through the checkout.
# Update MembershipPurchased
This webhook will fire on a membership being updated.
# Delete MembershipPurchased
This webhook will fire when a membership is refunded or cancelled.
MerchandisePurchased
This is the webhook context MerchandisePurchased.
# Create MerchandisePurchased
This is the webhook payload returned when the action Create is called with the context MerchandisePurchased.
# Update MerchandisePurchased
This is the webhook payload returned when the action Update is called with the context MerchandisePurchased.
# Delete MerchandisePurchased
This is the webhook payload returned when the action Delete is called with the context MerchandisePurchased.
MultiPassPurchased
This is the webhook context MultiPassPurchased.
# Create MultiPassPurchased
This is the webhook payload returned when the action Create is called with the context MultiPassPurchased.
# Update MultiPassPurchased
This is the webhook payload returned when the action Update is called with the context MultiPassPurchased.
# Delete MultiPassPurchased
This is the webhook payload returned when the action Delete is called with the context MultiPassPurchased.
DonationPurchased
This is the webhook context DonationPurchased.
# Create DonationPurchased
This is the webhook payload returned when the action Create is called with the context DonationPurchased.
# Update DonationPurchased
This is the webhook payload returned when the action Update is called with the context DonationPurchased.
# Delete DonationPurchased
This is the webhook payload returned when the action Delete is called with the context DonationPurchased.
Activity
This is the webhook context Activity.
# Create Activity
This is the webhook payload returned when the action Create is called with the context Activity.
# Update Activity
This is the webhook payload returned when the action Update is called with the context Activity.
# Delete Activity
This is the webhook payload returned when the action Delete is called with the context Activity.
Registration
An activity registration is either an activity session, a drop-in spot, or a private lesson.
Webhook generated id prefix | Description |
---|---|
SUB- | Subscription |
DI- | Drop-in |
PL- | Private lesson |
# Create Registration
This webhook will fire on an activity registration, through a normal checkout process, on redeeming a multipass, or through the mobile app.
# Update Registration
This is the webhook payload returned when the action Update is called with the context Registration.
# Delete Registration
This webhook will fire on a activity registration cancellation, either with a refund or an activity cancellation.
WaitListRegistration
This is the webhook context WaitListRegistration.
# Create WaitListRegistration
This webhook will fire when a person is added to an activity waitlist.
# Update WaitListRegistration
This webhook will fire when a person on an activity waitlist change status.
# Delete WaitListRegistration
This is the webhook payload returned when the action Delete is called with the context WaitListRegistration.