Skip to content

Working Time Model Templates

Valid Attributes

AttributeDescriptionDetails
discarded_atTime of removal (or null)Cannot be set manually. Automatically set when deleted (soft-delete).
nameThe name of the working time model templateMust be set; must be unique across an account.
patternThe pattern for the working time models created from the templateMust be set to weekly.
workdaysArray of workdays for the working time models created from the templateOptional, the following table rows explain the attributes of the elements
day_of_weekThe day of the week represented by the workdayMust be set; must be between 0 (Monday) and 6 (Sunday)
secondsThe user’s target working time on the given day of week, in secondsMust be set.

Create

This endpoint creates a new working time model template in an account.

HTTP Request

POST /api/v1/working_time_model_templates

Example request

{
"data": {
"type": "working_time_model_template",
"attributes": {
"name": "Mo-Fr 9 to 5",
"pattern": "weekly",
"workdays": [
{
"day_of_week": 0,
"seconds": 0
},
{
"day_of_week": 2,
"seconds": 7200
}
]
}
}
}

Example response

{
"data": {
"id": "d8d720b7-4410-4d00-bc5d-f3bc6bb2abe5",
"type": "working_time_model_template",
"attributes": {
...
}
}
}

List

This endpoint returns the working time model templates in an account.

HTTP Request

GET /api/v1/working_time_model_templates

Example response

{
"data": [
{
"id": "d8d720b7-4410-4d00-bc5d-f3bc6bb2abe5",
"type": "working_time_model_template",
"attributes": {
...
}
}
]
}

Show

This endpoint returns a specific working time model template by its id.

HTTP Request

GET /api/v1/working_time_model_templates/:working_time_model_template_id

URL Parameters

ParameterDescription
working_time_model_template_idThe ID of the working time model template to return

Example response

{
"data": {
"id": "d8d720b7-4410-4d00-bc5d-f3bc6bb2abe5",
"type": "working_time_model_template",
"attributes": {
...
}
}
}