Absence Types
Valid Attributes
Attribute | Description | Details |
---|---|---|
account_id | The ID of the account to which the absence type belongs. | Cannot be set |
active | Whether an absence type is active or not | Must be true or false |
name | The name of the absence type | Must be set |
Meta data: Permissions
Group | Description |
---|---|
actions | Contains permissions to edit or delete an absence type |
Create
HTTP Request
POST /api/v1/absence_types
Example request:
{ "data": { "type": "absence_type", "attributes": { "name": "Vacation" } }}
Example response:
{ "data": { "id": "a6e9e2g8-5p4e-4r4b-8c7e-6a5b85h3c2b1a", "type": "absence_type", "attributes": { "active": true, "account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f", "name": "Vacation" } }}
This endpoint creates a new absence type for an account.
Update
Example request:
{ "data": { "type": "absence_type", "attributes": { "name": "Updated Absence Type" } }}
Example response:
{ "data": { "id": "a6e9e2g8-5p4e-4r4b-8c7e-6a5b85h3c2b1a", "type": "absence_type", "attributes": { ... } }}
This endpoint updates an absence type.
HTTP Request
PUT /api/v1/absence_types/:absence_type_id
URL Parameters
Parameter | Description |
---|---|
absence_type_id | ID of the absence type to be updated |
List
Example response:
{ "data": [ { "id": "a6e9e2g8-5p4e-4r4b-8c7e-6a5b85h3c2b1a", "type": "absence_type", "attributes": { "active": true, "account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f", "name": "Vacation" } }, { ... } ]}
This endpoint returns all absence types.
HTTP Request
GET /api/v1/absence_types
Show
Example response:
{ "data": { "id": "a6e9e2g8-5p4e-4r4b-8c7e-6a5b85h3c2b1a", "type": "absence_type", "attributes": { "active": true, "account_id": "c2c3a4c9-5a9e-4ad8-9b7b-9a7d6c5b2e1f", "name": "Vacation" } }}
This endpoint returns an absence type.
HTTP Request
GET /api/v1/absence_types/:absence_type_id
URL Parameters
Parameter | Description |
---|---|
absence_type_id | The ID of the absence type to return |
Delete
Example response:
{ "data": { "id": "56555aac-4b49-4c75-b6b8-f2d6e8052d57", "type": "absence_type", "attributes": { ... } }}
This endpoint deletes an absence type.
HTTP Request
DELETE /api/v1/absence_types/:absence_type_id
URL Parameters
Parameter | Description |
---|---|
absence_type_id | ID of the absence type to delete |