Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
topOfPage
topOfPage
The Scheduler Fields API is used to access, create, and modify the fields that appear on your business' scheduler. The fields are used to get and store information about the clients, appointments, and classes.

To delete a scheduler field, make a PUT /schedulerField call to edit that field and change the active boolean property to false.


Info
titleOn this page

Table of Contents





Scheduler Fields API Endpoints


These are the endpoints that are available under the /schedulerField path, which shows any fields you have set up for your business account.

Endpoint

Description

GET /schedulerFieldList

Returns all schedulerFields objects on an account in array format.

GET /schedulerFieldList/reason/{reasonId}Returns all schedulerFields objects for specified reason in array format.
GET /schedulerFieldList/mode/{mode}

Returns all schedulerFields objects for specified mode in array format.

Accepted mode types: APPT, CLIENT, CLASS.

GET /schedulerField/{schedulerPreferenceFieldDefnId}Returns a JSON object for specified scheduler field.
POST /schedulerField

Creates a new schedulerFields object on an account.

Request body/payload: Pass a schedulerFields object with the schedulerPreferenceFieldDefnId included.

For these calls, you need to pass a schedulerFields object with all required fields and any fields you want to set filled in the body of the payload - make sure you set the saving property to true. We have an example of a schedulerFields object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.

PUT /schedulerField

Updates an existing scheduler fields object.

Request body/payload: Pass a schedulerFields object with all required objects defined.

For these calls, you need to pass a schedulerFields object with all required fields and any fields you want to update filled in the body of the payload - make sure you set the saving property to true. We have an example of a schedulerFields object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.





Scheduler Fields Parameters

There are no parameters included with schedulerFields calls.




Scheduler Fields API Responses


Code Block
languagejs
titleGET /schedulerFieldList
linenumberstrue
collapsetrue
[{
    "active": true,
    "businessId": 43111
    "code": "spouseName",
    "createdDate": 1522268785000,
    "createdUser": "JoeSchmo",
    "dataType": "TXT",
    "defaultValue": null,
    "depAction": null,
    "depCondition": null,
    "depError": null,
    "depFieldDefnId": null,
    "depSetValue": null,
    "depType": null,
    "depValue": null,
    "extendedValue": null,
    "fieldValues": null,
    "filterByService": false,
    "hint": null,
    "label": "Spouse",
    "labelTag": "%CLIENT_SPOUSE_LABEL%",
    "mask": null,
    "mode": "CLIENT",
    "modifiedDate": 1522268785000,
    "modifiedUser": "JoeSchmo",
    "oldFieldIds": null,
    "required": true,
    "schedulerPreferenceFieldDefnId": 322534,
    "services": null,
    "sortOrder": 23,
    "tagName": "CLIENT_SPOUSE",
    "userDefinedField": false,
    "validationError": null,
    "validationRegex": null,
    "value": null,
    "valueTag": "%CLIENT_SPOUSE%",
    "visible": false,
    "visibleOnScheduler": false
}]


Code Block
languagejs
titleGET /schedulerFieldList/reason/{reasonId}
linenumberstrue
collapsetrue
[{
    "active": true,
    "businessId": 43111
    "code": "cellPhone",
    "createdDate": 1522268785000,
    "createdUser": "JoeSchmo",
    "dataType": "TXT",
    "defaultValue": null,
    "depAction": null,
    "depCondition": null,
    "depError": null,
    "depFieldDefnId": null,
    "depSetValue": null,
    "depType": null,
    "depValue": null,
    "extendedValue": null,
    "fieldValues": null,
    "filterByService": false,
    "hint": null,
    "label": "Email",
    "labelTag": "%CLIENT_MOBILE_PHONE_LABEL%",
    "mask": null,
    "mode": "CLIENT",
    "modifiedDate": 1522268785000,
    "modifiedUser": "JoeSchmo",
    "oldFieldIds": null,
    "required": false,
    "schedulerPreferenceFieldDefnId": 322523,
    "services": null,
    "sortOrder": 12,
    "tagName": "CLIENT_MOBILE_PHONE",
    "userDefinedField": false,
    "validationError": null,
    "validationRegex": null,
    "value": null,
    "valueTag": "%CLIENT_MOBILE_PHONE%",
    "visible": true,
    "visibleOnScheduler": false
}]


Code Block
languagejs
titleGET /schedulerFieldList/mode/{mode}
linenumberstrue
collapsetrue
[{
    "active": true,
    "businessId": 43111
    "code": "cellPhone",
    "createdDate": 1522268785000,
    "createdUser": "JoeSchmo",
    "dataType": "TXT",
    "defaultValue": null,
    "depAction": null,
    "depCondition": null,
    "depError": null,
    "depFieldDefnId": null,
    "depSetValue": null,
    "depType": null,
    "depValue": null,
    "extendedValue": null,
    "fieldValues": null,
    "filterByService": false,
    "hint": null,
    "label": "Email",
    "labelTag": "%CLIENT_MOBILE_PHONE_LABEL%",
    "mask": null,
    "mode": "CLIENT",
    "modifiedDate": 1522268785000,
    "modifiedUser": "JoeSchmo",
    "oldFieldIds": null,
    "required": false,
    "schedulerPreferenceFieldDefnId": 322523,
    "services": null,
    "sortOrder": 12,
    "tagName": "CLIENT_MOBILE_PHONE",
    "userDefinedField": false,
    "validationError": null,
    "validationRegex": null,
    "value": null,
    "valueTag": "%CUSTOM_MOBILE_PHONE%",
    "visible": true,
    "visibleOnScheduler": false
}]


Code Block
languagejs
titleGET /schedulerField/{schedulerPreferenceFieldDefnId}
linenumberstrue
collapsetrue
{
    "active": true
    "businessId": 43111,
    "createdDate": 1528818398000,
    "createdUser": "JoeSchmo",
    "dataType": "TXT",
    "defaultValue": "0",
    "depAction": null,
    "depCondition": null,
    "depError": null,
    "depFieldDefnId": null,
    "depSetValue": null,
    "depType": null,
    "depValue": null,
    "extendedValue": null,
    "fieldValues": null,
    "filterByService": false,
    "hint": "How many children will you allow parents to bring with them to this class?",
    "label": "Number of kids",
    "labelTag": "%CUSTOM_FIELD_375724_LABEL%",
    "mask": null,
    "mode": "CLASS",
    "modifiedDate": 1528818398000,
    "modifiedUser": "JoeSchmo",
    "oldFieldIds": null,
    "required": true,
    "schedulerPreferenceFieldDefnId": 375724,
    "services": null,
    "sortOrder": 0,
    "tagName": null,
    "userDefinedField": true,
    "validationError": null,
    "validationRegex": null,
    "value": null,
    "valueTag": "%CUSTOM_FIELD_375724%",
    "visible": true,
    "visibleOnScheduler": false
}


Code Block
languagejs
titlePOST /schedulerField
linenumberstrue
collapsetrue
{
    "active": true,
    "businessId": 43111,
    "code": "UDF",
    "createdDate": 1535048100252,
    "createdUser": "JoeSchmo",
    "dataType": "CHKBOX",
    "defaultValue": null,
    "depAction": null,
    "depCondition": null,
    "depError": null,
    "depFieldDefnId": null,
    "depSetValue": null,
    "depType": null,
    "depValue": null,
    "extendedValue": null,
    "fieldValues": null,
    "filterByService": false,
    "hint": "Which pets will you be bringing?",
    "label": "Pets",
    "labelTag": "%CUSTOM_FIELD_443717_LABEL%",
    "mask": null,
    "mode": "CLIENT",
    "modifiedDate": 1535048100252,
    "modifiedUser": "JoeSchmo",
    "oldFieldIds": null,
    "required": false,
    "schedulerPreferenceFieldDefnId": 443717,
    "serviceIds": null,
    "sortOrder": 3,
    "tagName": null,
    "userDefinedField": true,
    "validationError": null,
    "validationRegex": null,
    "value": null,
    "valueTag": "%CUSTOM_FIELD_443717%",
    "visible": true,
    "visibleOnScheduler": false
}


Code Block
languagejs
titlePUT /schedulerField
linenumberstrue
collapsetrue
{
    "active": true
    "businessId": 43111,
    "code": "UDF",
    "createdDate": 1528819443000,
    "createdUser": "JoeSchmo",
    "dataType": "DATE",
    "defaultValue": null,
    "depAction": null,
    "depCondition": null,
    "depError": null,
    "depFieldDefnId": null,
    "depSetValue": null,
    "depType": null,
    "depValue": null,
    "extendedValue": null,
    "fieldValues": null,
    "filterByService": false,
    "hint": "Please enter the date of the next-to-last class you plan on offering.",
    "label": "Date of penultimate class",
    "labelTag": "%CUSTOM_FIELD_375737_LABEL%",
    "mask": null,
    "mode": "CLASS",
    "modifiedDate": 153002161438,
    "modifiedUser": "JoeSchmo",
    "oldFieldIds": null,
    "required": false,
    "schedulerPreferenceFieldDefnId": 375737,
    "services": null,
    "sortOrder": 2,
    "tagName": null,
    "userDefinedField": true,
    "validationError": null,
    "validationRegex": null,
    "value": null,
    "valueTag": "%CUSTOM_FIELD_375737%",
    "visible": true,
    "visibleOnScheduler": false
}





Scheduler Fields Object Values


For a description of how the conditional properties (generally those properties that begin with "dep") interact, see the documentation on the Scheduler Field Dependent Properties child page.

Property nameTypeRequiredDescription
activebooleanYesIndicates whether or not specified scheduler field should return following a GET call.
businessIdintegerYesProvides unique numeric ID of the business to which specified scheduler field belongs.
codestring
All fields TimeTap provides at the point of account creation have a unique code representative of that field; if specified scheduler field was added by the user to the account, the code would be UDF, which stands for User Defined Field.
createdDateinteger
Displays as date specified scheduler field was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form.
createdUserstring
Displays as username of user who created specified scheduler field. 
dataTypestringYesProvides the type of data needed in responses to specified scheduler field. Has acceptable values "TXT", "DATE", "CHKBOX", "LIST", "AREA", "LIST_CHKBOX", and "FILEUPLOAD".
defaultValuestring
Displays as default value that has been set for specified scheduler field.
depAction

string


For conditional fields, provides the action that is taken if the dependent condition is met.
depConditionstring
For conditional fields, provides the condition that must be met.
depErrorstring
For conditional fields, provides the error message that displays if the dependent condition is not met.
depFieldDefnIdinteger
For conditional fields, provides the schedulerFieldDefnId of the field with which specified field interacts.
depSetValuestring
For conditional fields, provides the setting of the dependent value.
depTypestring
For conditional fields, provides the type of dependent condition that must be met.
depValuestring
For conditional fields, provides the value required to meet the dependent condition.
extendedValuestring
Will fill in when field is used on a Client profile, Appointment detail, or Class (depending on mode) depending on the dataType of specified field. If dataType is anything but "FILEUPLOAD", it will fill in with the value directly; if it is a "FILEUPLOAD" dataType, this will provide the link to the file to download.
fieldValuesstring
Provides the different responses that are possible for specified field. Only applicable to "LIST" and "LIST_CHKBOX" dataTypes.
filterByServiceboolean
Indicates whether or not specified scheduler field can be filtered by service. Only applicable if the mode property is equal to APPT or CLASS.
hintstring
Displays as the text to be shown below specified scheduler field.
labelstringYesDisplays as the text appearing adjacent to specified scheduler field. 
labelTagstringYesProvides a tag to display specified scheduler field's label text. Generally takes the form "tagName + _LABEL" wrapped in % signs. Can be used with email templates.
maskstring
Displays as format required for specified scheduler field. Example: (###) ###-####.
modestring
Provides the mode of the service attached to specified scheduler field. Used for back office. Available values include "CLIENT", "COURSE", "APPT", and "CLASS".
modifiedDateinteger
Displays as date that specified scheduler field was last updated in milliseconds elapsed since January 1, 1970 00:00:00 UTC form.
modifiedUserstring
Displays as username of user who last updated specified scheduler field.
requiredbooleanYes

Indicates whether or not specified scheduler field requires a response. 

schedulerPreferenceFieldDefnIdintegerYes, on PUT callsProvides unique numeric ID for specified scheduler field.
serviceIdsarray
If specified scheduler field is of mode "APPT" and filterByService is true, then can fill in with list of reasonIds that the fields would be assigned to. When clients book appointments for the reasonIds contained in this list, they will be prompted to fill in these fields.
sortOrderinteger
Displays the order in which specified scheduler field appears in the list of scheduler fields.
tagNamestring
Provides the base tagName for the fields label and value. If you want to display the field's value in an email, you would wrap the tagName in % signs; if you want to display the field's label in an email you would add _LABEL at the end of the tagName and wrap in % signs.
userDefinedFieldboolean
Indicates whether or not specified scheduler field was created by a user.
validationErrorstring
If value entered fails to meet the conditions of the RegEx expression entered in the the validationRegex field, this error message will show to the client on the scheduler.
validationRegexstring
Provides a space to add a RegEx expression to validate the value put into the field against.
valuestring
Displays the value associated with specified scheduler field when it is input to the Client Profile, Appointment Detail, or Class Session.
valueTagstring
The valueTag can be put into emails and messages as a merge field to display the value that was put into the value property of the field. Generally takes the form of the tagName wrapped in % signs.
visiblebooleanYesIndicates whether or not specified scheduler field is set to show at all. Unlike the visibleOnScheduler property, if visible is set to false, the field will not show to staff if they are on the Client Profile, Appointment Detail, or Class Session screens. 
visibleOnSchedulerbooleanYesIndicates whether or not specified scheduler field is set to show to clients as they are booking on your scheduler. If set to false, field will only be visible to staff on the back office.