Events
These are the endpoints that are available under the /eventDefinition, /eventTriggers, and /eventAction paths, which are all involved in setting up events. Please note that there is no DELETE call for eventAction objects, instead simply make a POST call to edit it and set the active property to false.
Endpoint | Description |
---|---|
GET /eventDefinition/eventType/{eventTypeId} | Returns all eventDefinition objects that are set to specified eventType in array format. |
GET /eventAction/eventDefinition/{eventDefinitionId} | Returns all eventAction objects associated with specified eventDefinition in array format. |
GET /eventDefinition/INVITATION_CAMPAIGN/{invitationCampaignId} | Returns all eventDefinition objects associated with specified invitationCampaign in array format. |
GET /eventTriggers/invitation/{invitationUUID} | Returns all eventTrigger objects on specified invitation that have either already taken place-such as a status change-or eventTrigger objects that are scheduled to take place-like when you want to send out an automatic reminder. |
GET /eventTriggers/CALENDAR/{calendarId} | Returns all eventTrigger objects on associated appointment that have either already taken place - such as a status change - or event trigger objects that are scheduled to take place - like when you want to send an automatic reminder. |
GET /eventDefinition/{eventDefinitionId} | Returns a JSON object for specified event definition. |
POST /eventDefinition | Creates a new eventDefinition object or updates an existing eventDefinition object. Request body: Must pass an eventDefinition object in request body/payload. For these calls, you need to pass an eventDefinition object with all required fields set in the body of the payload; make sure to include eventType object with eventType set to the proper event type from the table provided at the top of page. If you are updating an object, you must include the eventDefnId in the payload. We have an example of a eventDefinition object in the responses section below. |
POST /eventAction | Creates a new eventAction object or updates an existing eventAction object. Request body: Must pass an eventAction object in request body/payload. For these calls, you need to pass an eventAction object with all required fields set in the body of the payload; make sure to fill the eventDefinitionId property with the ID of the event definition that the event action is tied to. If you are updating an object, you must include the eventActionId in the payload. We have an example of a eventAction object in the responses section below. |
DELETE /eventDefinition/{eventDefinitionId} | Removes an eventDefinition object from view by setting its active property to false. |
There are no parameters included with eventDefinition, eventAction, or eventTriggers calls.
The objects below represent the minimum viable objects to pass that are needed to create or update an eventDefinition or eventAction object. Check whether or not a property can be written to by looking at the Object Values table below to see if the property is writable.
eventDefinition
Property name | Type | Required | Description |
---|---|---|---|
active | boolean | Yes | Indicates whether or not the specified event definition should return on GET calls. |
businessId | integer | Yes | Provides unique numeric ID of the business to which the specified event definition belongs. |
createdDate | integer | Displays as date the specified event definition was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
createdUser | string | Displays as username of the user who created the specified event definition. | |
description | string | Displays as the internal description set for the specified event definition. | |
disclaimerFormIdList | array | Displays as an array of disclaimerFormIds of disclaimer forms selected for the specified event definition. | |
eventActions | array | Yes | Displays as an array of eventActions objects for the event actions connected to the specified event definition. |
eventDefnId | integer | Yes, for updates | Provides unique numeric ID for the specified event definition. |
eventType | object | Displays as eventType object associated with the specified event definition. | |
filterTagMapJson | string | Displays as a JSON of all filter tags associated with the specified event definition. | |
groupIdList | array | This property is not being used by the back end database to route events at this time. | |
locationIdList | array | Displays as an array of locationIds of locations selected for the specified event definition. | |
modifiedDate | integer | Displays as date the specified event definition was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
modifiedUser | string | Displays as username of the user who last modified the specified event definition. | |
newStatus | string | Displays as what the status changes to if trigger is status change. * indicates that it could be any status, and any other statuses are the values that returned after GET /status calls. | |
objectId | integer | Provides unique numeric ID for the object connected to the specified event definition. | |
objectType | string | Yes | Displays as type of object connected to the specified event definition. Has available options "CALENDAR", "INVITATION_CAMPAIGN", "RECALL", and "CLASS_SCHEDULE". |
objectUUId | string | Provides unique alphanumeric ID for the object connected to the specified event definition. | |
oldStatus | string | Displays as what the status changes from if trigger is status change. * indicates that it could be any status, and any other statuses are the values that returned after GET /status calls. | |
professionalIdList | array | Displays as an array of professionalIds of staff selected for the specified event definition. | |
reasonIdList | array | Displays as an array of reasonIds of services selected for the specified event definition. | |
triggerHours | integer | Yes | Provides the number of hours before or after an event that the event action will be triggered. |
triggerMinutes | integer | Yes | Provides the number of hours before or after an event that the event action will be triggered. |
eventAction
Property name | Type | Required | Description |
---|---|---|---|
actionType | string | Yes | Displays as the type of action to be taken when the event type is triggered. Has available options "SEND_EMAIL". |
active | boolean | Yes | Indicates whether or not the specified event action should return on GET calls. |
businessId | integer | Yes | Provides unique numeric ID of the business to which the specified event action belongs. |
createdDate | integer | Displays as date specified event action was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
createdUser | string | Displays as username of the user who created the specified event action. | |
emailCategoryId | integer | Provides unique numeric ID for any email category connected to the specified event action. | |
emailTemplateId | integer | Yes | Provides unique numeric ID for email template connected to the specified event action. |
eventActionId | integer | Yes, for updates | Provides unique numeric ID for the specified event action. |
eventDefnId | integer | Yes | Provides unique numeric ID for the event definition connected to the specified event action. |
modifiedDate | integer | Displays as date the specified event action was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
modifiedUser | string | Displays as username of the user who last modified the specified event action. |