Email Categories

Email Categories

The Email Categories API is used to access the email categories objects on your business' account. The Email Categories API is connected to the Email Templates APIs, as email templates are grouped in email categories.

The allowDuplicates property explained:

Email categories differ based on whether they are part of the automated appointment process or if they are categories that you can send manually/adhoc or create trigger or recall campaigns around. You'll want to pay attention to the property on the email category called allowDuplicates. If this is set to false, the email templates within that category will need to abide by the levels rules described on the email template API page. All email categories where allowDuplicates is set to false must have a “Default Template” (level 0 or level 1) that acts as a fallback if the appointment in question does not meet the specific reason/service/class and the client is not assigned to the language of another template in that category. The default template should always return for these email categories in any GET emailTemplates/emailCategory/{emailCategoryId} call. The default template will have its level set to 0 or 1 (if it has been edited by the business) and no other templates in that category are allowed to have a level of 0 or 1.

 


 

Email Categories API Endpoints

These are the endpoints that are available under the /emailCategories path, which lists all the different email categories on your business' account.

Endpoint

Description

Endpoint

Description

GET /emailCategories/sentTo/{recipient}

Returns all email category objects sent to specified recipient on an account in array format, where the recipient would be either "Client" or "Staff".

GET /emailCategories/{emailCategoryId}

Returns a JSON object for specified email category.

GET /emailCategories/excluded

Returns all email category objects that have been disabled on an account in array format.

 


 

Email Categories API Parameters

There are no parameters included with emailCategories calls.

 


 

Email Categories API Responses

[{ "allowChange": null, "allowDuplicates": false, "allowOnline": null, "businessId": 43111, "code": "APPT_CANCEL_CLIENT", "countOfTemplates": 1, "emailCategory": "Appointment Cancellation by Staff", "emailCategoryId": 19, "emailTemplateId": null, "enabled": null, "objectType": "CALENDAR", "sendICS": null, "sentTo": "Client", "sentToClient": true, "sms": false, "sortOrder": null, "subject": null, "type": null }]
{ "allowChange": true, "allowDuplicates": false, "allowOnline": null, "businessId": null, "code": "APPT_COMPLETED_CLIENT", "countOfTemplates": null, "emailCategory": "Appointment Completed/Thanks sent to CLIENT", "emailCategoryId": 29, "emailTemplateId": null, "enabled": null, "objectType": "CALENDAR", "sendICS": 2, "sentTo": "Client", "sentToClient": true, "sms": false, "sortOrder": null, "subject": null, "type": "EMAIL" }
{ "allowChange": null, "allowDuplicates": false, "allowOnline": null, "businessId": 43111, "code": "APPT_CHANGE_STAFF_SMS", "countOfTemplates": 1, "emailCatagory": "Appointment Changed Text Message", "emailCatagoryId": 40, "emailTemplateId": null, "enabled": null, "objectType": "CALENDAR", "sendICS": null, "sentTo": "Staff", "sentToClient": false, "sms": false, "sortOrder": null, "subject": null, "type": null }

 


 

Email Categories Object Values

Property Name

Type

Description

Property Name

Type

Description

allowChange

boolean

Indicates whether or not the specified email category allows changes to be made to it.

allowDuplicates

boolean

Indicates whether or not the specified email category allows duplicates to be made of it. If it is set to true, then multiple email templates can be added to the email category with the level property set to a value of 1. If it is set to false, then you must create email templates in that category following the level rules described on the email templates page.

allowOnline

boolean

Indicates whether or not the specified email is allowed online.

businessId

integer

Provides unique numeric ID for the business to which the specified email category belongs.

code

string

All email categories TimeTap provides at the point of account creation have a unique code representative of that email category. This property displays that code.

countOfTemplates

integer

Displays as the number of email templates that fall within the specified email category.

emailCategory

string

Displays as name of the specified email category.

emailCategoryId

integer

Provides unique numeric ID for the specified email category.

emailTemplateId

integer

Provides unique numeric ID for the specified email template.

enabled

boolean

Indicates whether or not the specified email category is enabled.

objectType

string

Displays as the object type of the specified email category. Has available options CALENDAR, RECURRING_APPOINTMENT, WAIT_LIST, STAFF, DISCLAIMER_FORM_DATA, CLASS_SCHEDULE, INVOICE, BULK, INVITE_REMIND_BULK, INVITE_COMPLETE_BULK, REQUEST, PROFESSIONAL, PACKAGE, and RECALL.

sendICS

integer

Indicates whether or not the specified email category is meant to send an ICS file, where 1 indicates is meant to send an ICS file and 2 indicates is not meant to send one.

sentTo

string

Displays as the "recipient" from the endpoint URL. Has available options "Client" and "Staff".

sentToClient

boolean

Indicates whether or not the specified email category is sent to a Client.

sms

boolean

Indicates whether or not type of communication used for the specified email category is SMS.

sortOrder

integer

Affects the order in which different email categories on an account are displayed.

subject

string

Displays as the subject of the specified email category.

type

string

Displays the type of of communication used in the specified email category. Has available options "EMAIL" and "SMS".

Only filled for GET /emailCategory/{emailCategory/{emailCategoryId} calls. 

Comments