diff --git a/apiary.apib b/apiary.apib index fa5924f6..93355a09 100644 --- a/apiary.apib +++ b/apiary.apib @@ -430,6 +430,7 @@ We list all backwards-compatible additions here. These are currently available i - We renamed `task_type` and `task_type_id` to `work_type` and `work_type_id` in `projects-v2/tasks.list`, `projects-v2/tasks.info`, `projects-v2/tasks.create` and `projects-v2/tasks.update`. The old names are still supported, but deprecated. - We replaced `task_type_rate` with `work_type_rate` in `projects-v2/tasks.list`, `projects-v2/tasks.info`, `projects-v2/tasks.create` and `projects-v2/tasks.update`. `task_type_rate` was never used. - We added `project_id` to the `tasks.create` endpoint. +- We added the `users.listDaysOff` and `dayOffTypes.list` endpoints. #### December 2023 - The `dealPhases.list` endpoint can now filter phases by pipeline id. @@ -1320,6 +1321,45 @@ Get details for a single user. + type: `team` (string) + id: `6dd0069e-45da-0ec4-911a-afb351d968cd` + +### users.listDaysOff [POST /users.listDaysOff] + +Returns information about days off of a given user. + ++ Request (application/json) + + Attributes (object) + + id: `87982c96-f2fe-4b05-838c-ff42c0525758` (string, required) + + filter (object, optional) + + `starts_after`: `2023-10-01` (string, optional) - Start of the period for which to return days off. + + `ends_before`: `2023-10-30` (string, optional) - End of the period for which to return days off. + + page (Page, optional) + ++ Response 200 (application/json) + + Attributes (object) + + data (array) + + (object) + + `id`: `f611da79-90c2-02b1-b819-a810e0c77291` (string) + + `starts_at`: `2023-10-01T09:00:00+01:00` (string) + + `ends_at`: `2023-10-20T18:00:00+01:00` (string) + + user (object) + + `type`: `user` (enum[string]) + + Members + + `user` + + `id`: `b5094b3f-bb7a-0391-b01b-e709773f3509` (string) + + leave_type (object) + + `type`: `dayOffType` (enum[string]) + + Members + + `dayOffType` + + `id`: `f68b123c-4c36-0f5c-ac16-11f498e5dc01` (string) + + `status`: `approved` (enum) + + Members + + `approved` + + `not_approved` + + `pending` + + meta (object) - Only included with request parameter `includes=pagination` + + page (Pagination) + + matches: `12` (number) + ## Teams [/teams] *Required scopes: `users`* @@ -1703,6 +1743,22 @@ Returns information about closing days the account + matches: `12` (number) +## Day Off Types [/dayOffTypes] + +### dayOffTypes.list [POST /dayOffTypes.list] + +Returns a list of day off types for the account + ++ Request (application/json) + ++ Response 200 (application/json) + + Attributes (object) + + `data` (array) + + (object) + + `id`: `39263c14-9c16-022d-8513-60cf722ab088` (string) + + `name`: `Sick leave` (string) + + # Group CRM ## Contacts [/contacts] diff --git a/src/01-general/day-off-types.apib b/src/01-general/day-off-types.apib new file mode 100644 index 00000000..052b5b0c --- /dev/null +++ b/src/01-general/day-off-types.apib @@ -0,0 +1,15 @@ +## Day Off Types [/dayOffTypes] + +### dayOffTypes.list [POST /dayOffTypes.list] + +Returns a list of day off types for the account + ++ Request (application/json) + ++ Response 200 (application/json) + + Attributes (object) + + `data` (array) + + (object) + + `id`: `39263c14-9c16-022d-8513-60cf722ab088` (string) + + `name`: `Sick leave` (string) + diff --git a/src/01-general/users.apib b/src/01-general/users.apib index 0f4a22b9..706f7b6b 100644 --- a/src/01-general/users.apib +++ b/src/01-general/users.apib @@ -154,4 +154,43 @@ Get details for a single user. + teams (array) + (object) + type: `team` (string) - + id: `6dd0069e-45da-0ec4-911a-afb351d968cd` \ No newline at end of file + + id: `6dd0069e-45da-0ec4-911a-afb351d968cd` + + +### users.listDaysOff [POST /users.listDaysOff] + +Returns information about days off of a given user. + ++ Request (application/json) + + Attributes (object) + + id: `87982c96-f2fe-4b05-838c-ff42c0525758` (string, required) + + filter (object, optional) + + `starts_after`: `2023-10-01` (string, optional) - Start of the period for which to return days off. + + `ends_before`: `2023-10-30` (string, optional) - End of the period for which to return days off. + + page (Page, optional) + ++ Response 200 (application/json) + + Attributes (object) + + data (array) + + (object) + + `id`: `f611da79-90c2-02b1-b819-a810e0c77291` (string) + + `starts_at`: `2023-10-01T09:00:00+01:00` (string) + + `ends_at`: `2023-10-20T18:00:00+01:00` (string) + + user (object) + + `type`: `user` (enum[string]) + + Members + + `user` + + `id`: `b5094b3f-bb7a-0391-b01b-e709773f3509` (string) + + leave_type (object) + + `type`: `dayOffType` (enum[string]) + + Members + + `dayOffType` + + `id`: `f68b123c-4c36-0f5c-ac16-11f498e5dc01` (string) + + `status`: `approved` (enum) + + Members + + `approved` + + `not_approved` + + `pending` + + meta (object) - Only included with request parameter `includes=pagination` + + page (Pagination) + + matches: `12` (number) \ No newline at end of file diff --git a/src/apiary.apib b/src/apiary.apib index fde15b90..d8f42bfd 100644 --- a/src/apiary.apib +++ b/src/apiary.apib @@ -35,6 +35,8 @@ HOST: https://api.focus.teamleader.eu :[Closing Days](./01-general/closing-days.apib) +:[Day Off Types](./01-general/day-off-types.apib) + # Group CRM :[Contacts](./02-crm/contacts.apib) diff --git a/src/changes-backwards-compatible.apib b/src/changes-backwards-compatible.apib index 1f09eddf..ae4217e0 100644 --- a/src/changes-backwards-compatible.apib +++ b/src/changes-backwards-compatible.apib @@ -8,6 +8,7 @@ We list all backwards-compatible additions here. These are currently available i - We renamed `task_type` and `task_type_id` to `work_type` and `work_type_id` in `projects-v2/tasks.list`, `projects-v2/tasks.info`, `projects-v2/tasks.create` and `projects-v2/tasks.update`. The old names are still supported, but deprecated. - We replaced `task_type_rate` with `work_type_rate` in `projects-v2/tasks.list`, `projects-v2/tasks.info`, `projects-v2/tasks.create` and `projects-v2/tasks.update`. `task_type_rate` was never used. - We added `project_id` to the `tasks.create` endpoint. +- We added the `users.listDaysOff` and `dayOffTypes.list` endpoints. #### December 2023 - The `dealPhases.list` endpoint can now filter phases by pipeline id.