List Templates
Read as MarkdownDescription #
Lists the Templates in an Organizational Unit that can be used to
create a Scheduling Request using a Template.
Use it to let your users pick a Template, rather than asking them to copy its
sub from the Cronofy Dashboard.
For each Template, request_requirements lists what you still need to send when
creating a Scheduling Request from it. Each requirement names a concept, such
as an invitee.
Scheduling concepts
explains how to provide it.
Authentication is with either:
- an access token for the Organizational Unit, created by authorizing an application for an Organizational Unit scope like
organizational_unit_scheduling - the
client_secretof an Internal Application linked to the Organizational Unit.
Which Templates are listed #
A Template is listed when:
- it belongs to the Organizational Unit you’re authorized for
- it has the type
Scheduling Request via API - it can be used to create a Scheduling Request right now
Templates that would fail Template Validation are left out. For example, a Template is left out when it has no host, when its host doesn’t have Scheduler access, or when its event details contain placeholders the API can’t fill. Once the Template is corrected in the Cronofy Dashboard, it’s listed again.
Templates are sorted by name.
URL format #
{data_center_url}/v1/scheduling_request_templates
Example Request #
GET /v1/scheduling_request_templates HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {API_KEY}Example Response #
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"pages": {
"current": 1,
"total": 2,
"next_page": "https://api.cronofy.com/v1/scheduling_request_templates/pages/08a07b034306679e"
},
"scheduling_request_templates": [
{
"sub": "sgr_eaf24e449d1c55621a10c0a9",
"name": "Driving lesson",
"request_requirements": [
{ "name": "invitee" }
]
},
{
"sub": "sgr_bb83b59f8e2e14b412fb7a50",
"name": "Driving test",
"request_requirements": [
{ "name": "invitee" }
]
}
]
}Request Parameters #
data_center_url Required
The URL for the data center you want to communicate with. Possible choices are:
api-au.cronofy.com- π¦πΊ Australiaapi-ca.cronofy.com- π¨π¦ Canadaapi-de.cronofy.com- π©πͺ Germanyapi-sg.cronofy.com- πΈπ¬ Singaporeapi-uk.cronofy.com- π¬π§ United Kingdomapi.cronofy.com- πΊπΈ United States
Find out more about Cronofy's data centers.
Response Parameters #
pages.current #
An Integer specifying which page of the result set the current request is for.
pages.total #
An Integer specifying the total number of pages in the result set.
pages.next_page Optional #
When present, a String specifying the URL for the next page of results.
The next page of results can be retrieved by issuing a GET request to this URL, and you will receive a response in the same format.
scheduling_request_templates #
An array of the Templates that can be used to create a Scheduling Request through the API. Empty when there are none.
scheduling_request_templates.sub #
A String of the Template’s sub. Pass it as scheduling_request_template.sub when creating a Scheduling Request using a Template.
scheduling_request_templates.name #
A String of the Template’s name, as shown in the Cronofy Dashboard.
scheduling_request_templates.request_requirements #
An array of what you need to send, alongside scheduling_request_template.sub, to create a Scheduling Request from the Template.
scheduling_request_templates.request_requirements.name #
A String naming the requirement. One of:
More requirements may be added in the future. Treat a requirement you don’t recognize as one your application can’t provide, and don’t offer that Template.
Error responses #
401 Unauthorized #
The request was refused as the provided authentication credentials were not recognized.
403 Forbidden #
The request was refused as the provided credentials don’t grant access to the Organizational Unit’s Templates. Authorize your application for an Organizational Unit scope like organizational_unit_scheduling.