Groups

The Groups API is used to access, create, and modify the groups on your business' account. The Groups API is connected to the Locations and Services APIs, as locations and services can be optionally put together into groups. Groups of services are called reasons groups on the TimeTap site.

On this page




Groups API Endpoints

These are the endpoints that are available under the /groups path, which lists all the different groups you have added to the locations or reasons on your business account for scheduling purposes.

Endpoint

Description

GET /groups/list/{listType}

Returns all groups objects on an account in array format. The listType can be LOCATION or SERVICE. If the listType is set to LOCATION, this endpoint will send back all groups on an account where groupType = LOCATION, and if the listType is set to SERVICE, this endpoint will send back all groups on an account where groupType = SERVICE.

GET /groups/{groupId}

Returns a JSON object for the specified group.

POST /groups

Creates a new groups object on an account.

Request body/payload:  Must pass a full groups object in the request body/payload.

For these calls, you need to pass a groups 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 groups object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.

PUT /groups

Updates the specified groups object. 

Request body/payload: Must pass a groups object with desired changes made in the request body/payload.

For these calls, you need to pass a groups object with all the required fields and any fields you want to updated filled in in the body of the payload. We have an example of a groups object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.

DELETE /groups/{groupId}Removes a group object from view by setting its active property to false.




Groups API Parameters

Data points passed on in the request URL portion of the API call that are used to filter the data that is being requested. 

ParameterTypeEndpoints to be used withDescription
workingbooleanGET /groups/list/{listType}Returns only those groups that have availability defined in the group profile.





Groups API Request Body/Payloads

The objects below represent the minimum viable objects to pass that are needed to create or update a groups 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.

POST /groups
{
    "active": true,
    "allOrNoneSelectLocations": {value: "select", label: "Select Locations"},
    "businessId": 43111,
    "groupItems": {active: true, objectType: "LOCATION", objectId: 87877},
    "groupName": "Putty tats",
    "groupType": "LOCATION",
    "timeZoneCode": null
}
PUT /groups
{
    "active": true,
    "allowOnline": true,
    "businessId": 43111,
    "code": null,
    "createdDate": 1530107194592,
    "createdUser": "JoeSchmo",
    "directions": null,
    "email": null,
    "embedCode": "<iframe src='https://www.timetap.com/pembed/Z7kwFP2pUd' frameborder='0' width='840' height='500'></iframe>",
    "groupDescription": "All of our aquatic classes",
    "groupId": 29573,
    "groupItemIds": [177850],
    "groupItems": [{groupItemId: 306752, businessId: 43111, objectType: "SERVICE", objectId: 177850,…}],
    "groupName": "Aquatics",
    "groupType": "SERVICE",
    "internalDisplayName": "Aquatics",
    "internalName": null,
    "itemNameList": ["Surfing for Beginners"],
    "logoUrl": null,
    "modifiedDate": 1549654674118,
    "modifiedUser": "JoeSchmo",
    "privateUrl": "https://www.timetap.com/appts/Z7kwFP2pUd",
    "screeningQuestion": null,
    "sortWeight": null,
    "textSearchable": "Aquatics All of our aquatic classes",
    "timezone": null
}




Groups API Responses

GET /groups/list/{listType}
[{
    “active”: true,
    “allowOnline”: true,
    “businessId”: 43111,
    "code": null,
    “createdDate”: 1531493122232,
    "createdUser": "JoeSchmo",
    “directions”: null,
    “email”: null,
    "emailInstructions": null,
    "embedCode": null,
    “groupDescription”: "<p>Our three primary offices</p>",
    “groupId”: 31158,
    "groupItemIds": [87877, 282639, 81181],
    "groupItems": [{
        "active": true,
        "businessId": 43111,
        "createdDate": 1531748539077,
        "createdUser": "JoeSchmo",
        "groupItemId": 297574,
        "internalDisplayName": "Beach - US/Eastern",
        "modifiedDate": 1531748539077,
        "modifiedUser": "JoeSchmo",
        "objectId": 81181,
        "objectType": "LOCATION",
        "reasonType": null
    }],
    "groupName": "Primary Offices",
    "groupType": "LOCATION",
    “internalDisplayName”: "Da big 3",
    “internalName”: "Da big 3",
    "itemNameList": ["Beach - US/Eastern", "Office 1", "Green office - America/New_York"],
    “logoUrl”: null,
    "modifiedDate": 1531748539077,
    "modifiedUser": "JoeSchmo",
    “privateUrl”: "https://big3.timetap.com",
    "salesforceId": null,
    "salesforceValue": null,
    "screeningQuestions": null,
    “sortWeight”: null,
    "textSearchable": "Primary Offices <p>Our three primary offices</p> Da big 3",
    “timeZoneCode”: {
        "sortOrder": 10,
        "timeZoneCode": "US/Eastern",
        "timeZoneDesc": "EST",
        "timeZoneId": 219,
        "visible": null
    }
}]
GET /groups/{groupId}
{   
    “active”: true,
    “allowOnline”: true,
    “businessId”: 43111,
    “createdDate”: 1531493122232,
    "createdUser": "JoeSchmo",
    “directions”: null,
    “email”: null,
    “embedCode: "<iframe src='https://www.timetap.com/pembed/gzvwUZQdH2' frameborder='0' width='840' height='500'> </iframe>",
    "groupDescription": "<p>Our three primary offices</p>",
    "groupId": 31158,
    “groupItems”: [{
        "active": true,
        "businessId": 43111,
        "createdDate": 1531493122232,
        "createdUser": "JoeSchmo",
        "groupItemId": 226873,
        "internalDisplayName": "Office 1 - America/New_York",
        "modifiedDate": 1531493122232,
        "modifiedUser": "JoeSchmo",
        "objectId": 81877,
        "objectType": "LOCATION"
    },
        "active": true,
        "businessId": 43111,
        "createdDate": 1531493122232,
        "createdUser": "JoeSchmo",
        "groupItemId": 226874,
        "internalDisplayName": "Office 2 - America/New_York",
        "modifiedDate": 1531493122232,
        "modifiedUser": "JoeSchmo",
        "objectId": 81428,
        "objectType": "LOCATION"
    },
        "active": true,
        "businessId": 43111,
        "createdDate": 1531493122232,
        "createdUser": "JoeSchmo",
        "groupItemId": 226875,
        "internalDisplayName": "Beach Office - America/New_York",
        "modifiedDate": 1531493122232,
        "modifiedUser": "JoeSchmo",
        "objectId": 81181,
        "objectType": "LOCATION"
    }],
    "groupName": "Primary Offices",
    "groupType": "LOCATION",
    “internalDisplayName”: "Da Big 3",
    “internalName”: "Da Big 3",
    "itemNameList": ["Office 1 - America/New_York", "Office 2 - America/New_York", "Beach Office - America/New_York"],
    “logoUrl”: null,
    “modifiedDate”: 1531493122232,
    "modifiedUser": "JoeSchmo",
    “privateUrl”: "https://www.timetap.com/appts/J00qtMAUx",,
    "screeningQuestion": null,
    "sortWeight": null,
    "timeZoneCode": {Timezone object for timezone of location group-see timezones API}
}
POST /groups
{
    “active”: true,
    "allowOnline": true,
    “businessId”: 43111,
    "code": null,
    "createdDate": 1535049680026,
    "createdUser": "JoeSchmo",
    "directions": null,
    "email": "petzRus@noemail.com",
    "embedCode": null,
    “groupescription”: "<p>All of our pet related gigs in one group!</p>",
    "groupId": 36239,
    "groupItems": [{
        "active": true,
        "businessId": 43111,
        "createdDate": 1535049680026,
        "createdUser": "JoeSchmo",
        "groupItemId": 237961,
        "internalDisplayName": "Pooch Primping",
        "modifiedDate": 153504810043,    
        "modifiedUser": "JoeSchmo",
        "objectId": 159330,
        "objectType": "SERVICE"
    },{
        "active": true,
        "businessId": 43111,
        "createdDate": 1535049680026,
        "createdUser": "JoeSchmo",
        "groupItemId": 237962,
        "internalDisplayName": "Dog Training",
        "modifiedDate": 153504810043,    
        "modifiedUser": "JoeSchmo",
        "objectId": 240094,
        "objectType": "SERVICE"
    },{
        "active": true,
        "businessId": 43111,
        "createdDate": 1535049680025,
        "createdUser": "JoeSchmo",
        "groupItemId": 237963,
        "internalDisplayName": "Cat Grooming",
        "modifiedDate": 153504810043,    
        "modifiedUser": "JoeSchmo",
        "objectId": 255109,
        "objectType": "SERVICE"
    }]
    "groupName": "Pet Pampering",
    "groupType": "SERVICE",
    "internalDisplayName": "Pet Pampering",
    “internalName”: null,
    "itemNameList": ["Pooch Primping", "Dog Training", "Cat Grooming"],
    "logoUrl": null,
    "modifiedDate": 1535048100252,
    "modifiedUser": "'JoeSchmo",
    "privateUrl": "http://www.timetap.com/appts/Z7kxFw3pL",
    "screeningQuestion": null,
    "sortWeight": null,
    “timeZoneCode”: null
}
PUT /groups
{
    “active”: true,
    “allowOnline”: true,
    "businessId": 43111,
    “createdDate”: 1530107194592,
    "createdUser": "JoeSchmo",
    "directions": null,
    "email": null,
    “embedCode”: "<iframe src='https://www.timetap.com/pembed/JODqTXMAUx' frameborder='0' width='840' height='500'> </iframe>",
    “groupDescription”: "All of our aquatic classes",
    "groupId": 29573,
    "groupItems": [{
        "active": true,
        "objectId": 177850,
        "objectType": "SERVICE"
    },{
        "active": true,
        "objectId": 160734,
        "objectType": "SERVICE"
    }]
    "groupName": "Aquatics",
    "groupType": "SERVICE",
    "internalDisplayName": "Aquatics",
    “internalName”: null,
    "itemNameList": ["Surfing for beginners", "Wading"],
    “logoUrl”: null,
    "modifiedDate": 1531748369398,
    "modifiedUser": "JoeSchmo",
    “privateUrl”: “http://www.timetap.com/appts/Z7kwFP2pUd”,
    "screeningQuestion": null,
    "sortWeight": null,
    "timeZoneCode": null
}




Groups Object Values

Property nameTypeRequiredWritableDescription
activebooleanYes
Indicates whether or not the specified group should return on GET calls. 
allowOnlineboolean
YesIndicates whether or not the specified group shows on the scheduler.
businessIdintegerYes
Provides unique numerical ID of the business to which the specified group belongs. 
codestring

Displays as the code for the specified group.
createdDateinteger

Displays as date the specified group was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
createdUserstring

Displays the username of user who created the specified group.
directionsstring
YesDisplays as directions provided on the specified group's profile.
emailstring
YesDisplays as email provided for the specified group.
emailInstructionsstring

Displays as the email instructions for the specified group.
embedCodestring

Provides iframe code that can be used to display scheduler for the specified group based on address given on the group's profileback-end component, users cannot alter.
groupDescriptionstring
YesDisplays as description provided on the specified group's profile.
groupIdintegerYes, on PUT calls

Provides unique numerical ID of the specified group.

groupItemIdsarray

Provides the IDs (either locationIds or reasonIds) that make up the specified group.
groupItemsarray
YesShows all objects in the specified group in array format.
groupNamestring
YesDisplays as public name of the specified group.
groupTypestring

Provides the type of group the specified group is. Options are "LOCATION" and "SERVICE".
internalDisplayNamestring
YesIf groupName is filled out but internalName is empty, internalDisplayName would be the same as the groupName; if internalName is not empty, internalDisplayName would be the same as the internalName.
internalNamestring
YesDisplays as the group name that staff see when logged into backoffice of TimeTap
itemNameListarray
YesShows internalDisplayNames for all objects in the specified group.
logoUrlstring

Displays as URL of the specified group.

modifiedDate

integer



Displays as date the specified group was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form.

modifiedUserstring

Displays the username of user who last modified the specified group.

privateUrlstring

Displays as URL of the specified group's private scheduling page.
salesforceIdinteger

Provides unique numeric ID associated with the specified group.
salesforceValuestring

Provides the Salesforce value associated with the specified group.
screeningQuestionobject
YesDisplays any screening questions added to the specified group. Only applies to groupType of SERVICE.
sortWeightinteger
YesAffects the order in which different groups of a business are displayed to users.
textSearchablestring

Provides a string of text that you can search for that will return the specified group.

timeZoneCodeobject

Displays the timezone code used by the specified group. Only applies to groupType of LOCATION. For more info, see Timezones API page.