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.

On this page




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 /translationTagReturns 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

POST /translationLocale
{
    "active": true,
    "businessId": 43111,
    "createdDate": 1696529324341,
    "languageObject": {
        "alreadyAdded": false,
        "languageCode": "th",
        "languageName": "Thai",
        "locale": "th"
    }}
PUT /translationLocale
{
    "active": false,
    "businessId": 43111,
    "createdDate": 1589903551590,
    "createdUser": "JoeSchmo",
    "friendlyLanguageName": "Hebrew",
    "locale": "he",
    "modifiedDate": null,
    "modifiedUser": null,
    "translationLocaleId": 5347
}
POST /translationTag
{
    "active": true,
    "businessId": 43111,
    "code": "tag.scheduler_link.unpublishMessage",
    "codeToAppend": null,
    "objectAttribute": "unpublishMessage",
    "objectAttributeObject": {
        "inputType": "text",
        "label": "Unpublished Booking Site Message",
        "labelJson": false,
        "objectAttribute": "unpublishMessage",
        "objectIdNullOnly": false,
        "objectType": "scheduler_link",
        "propertyName": "unpublishMessage",
        "schedulerVersion": 5,
        "translationPropertiesArrayName": "schedulerTranslationProperties"
    },
    "objectId": null,
    "objectType": "scheduler_link",
    "objectTypeObject": {
        "forAdding": true,
        "labelPlural": "Scheduler translations",
        "labelSingular": "Scheduler translation",
        "value": "scheduler_link"
    },
    "translationObject": {
        "internalDisplayName": "Default",
        "internalName": "Default",
        "schedulerLinkId": null
    },
    "translationTagId": null
}
PUT /translationTag
{
    "active": false,
    "businessId": 43111,
    "code": "tag.reason.reasonDesc.255109",
    "createdDate": 1547069594575,
    "createdUser": "JoeSchmo",
    "defaultValue": "Cat Grooming",
    "description": null,
    "friendlyObjectAttributeName": "Tag Labels - %REASON% (Services & Classes Name)",
    "modifiedDate": null,
    "modifiedUser": null,
    "objectAttribute": "reasonDesc",
    "objectId": 255109,
    "objectType": "reason",
    "richText": false,
    "tags": null,
    "translationTagId": 2379,
    "translations": [{
        "0": {
            "active": true,
            "businessId": 43111,
            "createdDate": 1547069707491,
            "createdUser": "JoeSchmo",
            "locale": "fr",
            "modifiedDate": null,
            "modifiedUser": null,
            "translationId": 2560,
            "translationTagId": 2379,
            "value": "french chat"
    }}]}
POST /translation
{
    "active": true,
    "businessId": 43111,
    "locale": "es",
    "translationTagId": 17062,
    "value": "esa cita no esta aqui"
}
PUT /translation
{
    "active": true,
    "businessId": 43111,
    "createdDate": 1537378522865,
    "createdUser": "JoeSchmo",
    "locale": "es",
    "modifiedDate": 1550165859703,
    "modifiedUser": "JoeSchmo",
    "translationId": 1731,
    "translationTagId": 1585,
    "value": "Bienvenidos a nos cita"
}




Translation API Responses

GET /translationLocale
[{
    "active": true,
    "businessId": 43111,
    "createdDate": 1537377934267,
    "createdUser": "JoeSchmo",
    "locale": "es",
    "modifiedDate": null,
    "modifiedUser": null,
    "translationLocaleId": 958
}]
POST /translationLocale
{
    "active": true,
    "businessId": 43111,
    "createdDate": 1546636642453,
    "createdUser": "JoeSchmo",
    "locale": "fr",
    "modifiedDate": null,
    "modifiedUser": null,
    "translationLocaleId": 1486
}
PUT /translationLocale
{
    "active": false,
    "businessId": 43111,
    "createdDate": 1546636642453,
    "createdUser": "JoeSchmo",
    "locale": "de",
    "modifiedDate": 1546973455414,
    "modifiedUser": "JoeSchmo",
    "translationLocaleId": 1355
}
GET /translationTag
[{
    "active": true,
    "businessId": 43111,
    "code": "tag.mini_website.headerText",
    "createdDate": 1537383600075,
    "createdUser": "JoeSchmo",
    "defaultValue": "Dog Groomers Anonymous!",
    "description": null,
    "modifiedDate": 1545246607921,
    "modifiedUser": "JoeSchmo",
    "objectAttribute": "headerText",
    "objectId": null,
    "objectType": "mini_website",
    "richText": false,
    "tags": null,
    "translationTagId": 1618,
    "translations": [{
        "active": true,
        "businessId": 43111,
        "createdDate": 1537378522865,
        "createdUser": "JoeSchmo",
        "locale": "es",
        "modifiedDate": 1547061109762,
        "modifiedUser": "JoeSchmo",
        "translationId": 1731,
        "translationTagId": 1585,
        "value": "Bienvenidos a nos citas"
}]}]
POST /translationTag
{
    "active": true,
    "businessId": 43111,
    "code": "tag.custom_field.label.322516",
    "createdDate": 1547147311212,
    "createdUser": "JoeSchmo",
    "defaultValue": "First Name",
    "description": null,
    "modifiedDate": null,
    "modifiedUser": null,
    "objectAttribute": "label",
    "objectId": 322516,
    "objectType": "custom_field",
    "richText": false,,
    "tags": null,
    "translationTagId": 2410,
    "translations": null
}
PUT /translationTag
{
    "active: false,
    "businessId": 43111,
    "code": "tag.reason.reasonDesc.255109",
    "createdDate": 1546620151222,
    "createdUser": "JoeSchmo",
    "defaultValue": "Cat Grooming",
    "modifiedDate": 1546884573445,
    "modifiedUser": "JoeSchmo",
    "objectAttribute": "reasonDesc",
    "objectId": 255109,
    "objectType": "reason",
    "translationTagId": 2280,
    "translations": [{
        "active": true,
        "businessId": 43111,
        "createdDate": 1546620151288,
        "createdUser": "JoeSchmo",
        "locale": "es",
        "modifiedDate": 1546632075596,
        "modifiedUser": "JoeSchmo",
        "translationId": 2463,
        "translationTagId": 2280,
        "value": "Peluquería de gatos"
}]}
POST /translation
{
    "active": true,
    "businessId": 43111,
    "createdDate": 1546631284198,
    "createdUser": "JoeSchmo",
    "locale": "es",
    "modifiedDate": null,
    "modifiedUser": null,
    "translationId": 2465,
    "translationTagId": 2311,
    "value": "<p>palabra</p>"
}
PUT /translation
[
    "active": true,
    "businessId": 43111,
    "createdDate": 1546619015836,
    "createdUser": "JoeSchmo",
    "locale": "de",
    "modifiedDate": 1547050434117,
    "modifiedUser": "JoeSchmo",
    "translationId": 2457,
    "translationTagId": 1585,
    "value": "Herzlich willkommen"
}




Translation Object Values

translationLocale

Property nameTypeRequiredDescription
activebooleanYesIndicates whether or not the specified translation locale should return on GET calls.
businessIdintegerYesProvides unique numeric ID of the business that the specified translation locale belongs to.
createdDateinteger
Displays as the date the specified translation locale was created, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
createdUserstring
Displays the username of the user who created the specified translation locale.
localestringYesDisplays as the locale connected to the specified translation locale - for more info, see Locale API page.
modifiedDateinteger
Displays as the date the specified translation locale was last modified, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
modifiedUserstring
Displays the username of the user who last modified the specified translation locale.
translationLocaleIdintegerYes, on PUT callsProvides unique numeric ID of the specified translation locale.

translationTag

Property NameTypeRequiredDefinition
activebooleanYesIndicates whether or not the specified translation tag should return on GET calls.
businessIdintegerYesProvides unique numeric ID of the business that the specified translation tag belongs to.
codestringYesDisplays as the code used to represent the object of the specified translation tag - takes the form "tag.{objectType}.{objectAttribute}.{objectId}".
createdDateinteger
Displays as the date the specified translation tag was created, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
createdUserstring
Displays the username of the user who created the specified translation tag.
defaultValuestringYesDisplays as the default, untranslated value that the specified translation tag is applied to.
descriptionstring
Displays the description of the specified translation tag.
modifiedDateinteger
Displays as the date the specified translation tag was last modified, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
modifiedUserstring
Displays the username of the user who last modified the specified translation tag.
objectAttributestringYesDisplays as the object attribute of the specified translation tag.
objectIdintegerYesProvides unique numeric ID of the object of the specified translation tag using the ID for that object type.
objectTypestringYesDisplays 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".
richTextboolean
Indicates whether or not the specified translation tag is set to use rich text.
tagsstring
Displays the tags that the specified translation tag uses, if any.
translationTagIdintegerYes, on PUT callsProvides unique numeric ID of the specified translation tag.
translationsarray
Displays as an array of the different translations saved for the specified translation tag.

translation

Property NameTypeRequiredDescription
activebooleanYesIndicates whether or not the specified translation should return on GET calls.
businessIdintegerYesProvides unique numeric ID of the business that the specified translation belongs to.
createdDateinteger
Displays as the date the specified translation was created, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
createdUserstring
Displays the username of the user who created the specified translation.
localestringYesDisplays as the locale connected to the specified translation - for more info, see Locale API page.
modifiedDateinteger
Displays as the date the specified translation was last modified, in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
modifiedUserstring
Displays the username of the user who last modified the specified translation.
translationIdintegerYes, on PUT callsProvides a unique numeric ID of the specified translation.
translationTagIdintegerYes, on PUT callsProvides a unique numeric ID of the translation tag that the specified translation is connected to.
valuestringYesDisplays as the value that appears as translated.