Working Time Model Templates
Valid Attributes
| Attribute | Description | Details | 
|---|---|---|
| discarded_at | Time of removal (or null) | Cannot be set manually. Automatically set when deleted (soft-delete). | 
| name | The name of the working time model template | Must be set; must be unique across an account. | 
| pattern | The pattern for the working time models created from the template | Must be set to weekly. | 
| workdays | Array of workdays for the working time models created from the template | Optional, the following table rows explain the attributes of the elements | 
| day_of_week | The day of the week represented by the workday | Must be set; must be between 0 (Monday) and 6 (Sunday) | 
| seconds | The user’s target working time on the given day of week, in seconds | Must 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
| Parameter | Description | 
|---|---|
| working_time_model_template_id | The ID of the working time model template to return | 
Example response
{  "data": {    "id": "d8d720b7-4410-4d00-bc5d-f3bc6bb2abe5",    "type": "working_time_model_template",    "attributes": {      ...    }  }}