Translation
The Translation API is used to access, create, and modify the different translations, translationTag, and translationLocale objects on your business' account. The Translation API is connected to the Locale API, as locales help inform the languages used for translations. Translations are used for the scheduler, not the back office - meaning they would show to clients booking and not to staff logged into back office.
To differentiate between the /translationLocale, /translationTag, and /translation paths and show how they all interact to translate content accurately - as well as show how you can control these translations - we present the following use case:
If you run a business in South Carolina, you would naturally have English set up as your first language. This means that the business object on your account would have the locale property set to "en–us". (For more info on this, see the Business API page, and for more info on locale objects see the Locale API page.) You want to make translations available for Spanish and French on your business' account. The first thing you’ll want to do is add those two locales to your translationLocale table by making a POST call to the translationLocale endpoint.
After you do that, you can format translation objects and store then in a translationTag object by first making a POST call to the translationTag endpoint with the proper object to reference what you are translating, and then making a POST call to the translation endpoint with the translation object set up to reference the translationTag you just created and the locale code of the translationLocale the translation is being provided for.
Translation API Endpoints
These are the endpoints that are available under the /translationLocale, /translationTag and /translation paths, which show all the different objects that contribute to creating translations, as detailed in the paragraphs above.
Endpoint | Description |
|---|---|
GET /translationLocale | Returns all translationLocale objects on your business' account - which represent the different languages that your business has explicitly said it wants to support - in array format. |
POST /translationLocale | Creates a new translationLocale object on your business' account - in other words, this call adds a language to the list of allowed languages that your business supports. Request body/payload: Must pass a translationLocale object in the request body/payload. For these calls, you need to pass a translationLocale object with all required fields and any fields you want to set filled in the body of the payload. We have an example of a translationLocale object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
PUT /translationLocale | Updates an existing translationLocale object on your business' account - this call is used to delete a translationLocale object by changing the active property to false. Request body/payload: Must pass a translationLocale object in the request body/payload. For these calls, you need to pass a translationLocale object with all required fields and any fields you want to update filled in the body of the payload. We have an example of a translationLocale object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
GET /translationTag | Returns all translationTag objects on your business' account - which represent the pieces of text that you want to be translated - in array format. |
POST /translationTag | Creates a translationTag object on your business' account for mapping translations against. Request body/payload: Must pass a translationTag object in the request body/payload. For these calls, you need to pass a translationTag object with all required fields and any fields you want to set filled in the body of the payload. We have an example of a translationTag object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
PUT /translationTag | Updates an existing translationTag object on your business’ account. Can be used to change the defaultValue of the translationTag. There is no dedicated endpoint for deleting a translationTag, so the PUT call can also be used to delete the translationTag by setting the active property on the object to false. Request body/payload: Must pass a translationTag object in the request body/payload. For these calls, you need to pass a translationTag object with all required fields and any fields you want to update filled in the body of the payload. We have an example of a translationTag object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
POST /translation | Creates a translation object that is tied back to the translationTag. Request body/payload: Must pass a translation object in the request body/payload. For these calls, you need to pass a translation object with all required fields and any fields you want to set filled in the body of the payload. We have an example of a translation object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
PUT /translation | Updates an existing translation object on your business' account. Request body/payload: Must pass a translation object in the request body/payload. For these calls, you need to pass a translation object with all required fields and any fields you want to update filled in the body of the payload. We have an example of a translationTag object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
DELETE /translation/{translationId} | Removes a existing translation object from view by changing its active property to false. |
Translation API Parameters
There are no parameters associated with translationLocale, translationTag, or translation calls.
Translation API Request Body/Payloads
Translation API Responses
Translation Object Values
translationLocale
Property name | Type | Required | Description |
|---|---|---|---|
active | boolean | Yes | Indicates whether or not the specified translation locale should return on GET calls. |
businessId | integer | Yes | Provides unique numeric ID of the business that the specified translation locale belongs to. |
createdDate | integer |
| Displays as the date the specified translation locale was created, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. |
createdUser | string |
| Displays the username of the user who created the specified translation locale. |
locale | string | Yes | Displays as the locale connected to the specified translation locale - for more info, see Locale API page. |
modifiedDate | integer |
| Displays as the date the specified translation locale was last modified, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. |
modifiedUser | string |
| Displays the username of the user who last modified the specified translation locale. |
translationLocaleId | integer | Yes, on PUT calls | Provides unique numeric ID of the specified translation locale. |
translationTag
Property Name | Type | Required | Definition |
|---|---|---|---|
active | boolean | Yes | Indicates whether or not the specified translation tag should return on GET calls. |
businessId | integer | Yes | Provides unique numeric ID of the business that the specified translation tag belongs to. |
code | string | Yes | Displays as the code used to represent the object of the specified translation tag - takes the form "tag.{objectType}.{objectAttribute}.{objectId}". |
createdDate | integer |
| Displays as the date the specified translation tag was created, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. |
createdUser | string |
| Displays the username of the user who created the specified translation tag. |
defaultValue | string | Yes | Displays as the default, untranslated value that the specified translation tag is applied to. |
description | string |
| Displays the description of the specified translation tag. |
modifiedDate | integer |
| Displays as the date the specified translation tag was last modified, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. |
modifiedUser | string |
| Displays the username of the user who last modified the specified translation tag. |
objectAttribute | string | Yes | Displays as the object attribute of the specified translation tag. |
objectId | integer | Yes | Provides unique numeric ID of the object of the specified translation tag using the ID for that object type. |
objectType | string | Yes | Displays as the type of object that the translation tag is made for. Has available options "mini_website", "reason", "job", "custom_field", "location", and "scheduler_link". |
richText | boolean |
| Indicates whether or not the specified translation tag is set to use rich text. |
tags | string |
| Displays the tags that the specified translation tag uses, if any. |
translationTagId | integer | Yes, on PUT calls | Provides unique numeric ID of the specified translation tag. |
translations | array |
| Displays as an array of the different translations saved for the specified translation tag. |
translation
Property Name | Type | Required | Description |
|---|---|---|---|
active | boolean | Yes | Indicates whether or not the specified translation should return on GET calls. |
businessId | integer | Yes | Provides unique numeric ID of the business that the specified translation belongs to. |
createdDate | integer |
| Displays as the date the specified translation was created, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. |
createdUser | string |
| Displays the username of the user who created the specified translation. |
locale | string | Yes | Displays as the locale connected to the specified translation - for more info, see Locale API page. |
modifiedDate | integer |
| Displays as the date the specified translation was last modified, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. |
modifiedUser | string |
| Displays the username of the user who last modified the specified translation. |
translationId | integer | Yes, on PUT calls | Provides a unique numeric ID of the specified translation. |
translationTagId | integer | Yes, on PUT calls | Provides a unique numeric ID of the translation tag that the specified translation is connected to. |
value | string | Yes | Displays as the value that appears as translated. |