Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CON-3] Introduce /daysOff - /daysOffTypes - /closingDays endpoints #815

Merged
merged 31 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
03d9ec5
Add /daysOff.import documentation
StephenBeirlaen Jun 4, 2024
cec2e71
Rebuild documentation
StephenBeirlaen Jun 4, 2024
b8cd55a
Merge branch 'master' into feature/CON-264/DaysOffImport
StephenBeirlaen Jun 4, 2024
bfd2017
Move to June 2024
StephenBeirlaen Jun 6, 2024
061486f
Rebuild documentation
StephenBeirlaen Jun 6, 2024
a2cc159
CON-288 Delete dayOffType API doc
gehadMohamed Jun 6, 2024
83b3eff
Document daysOff.bulkDelete endpoint
joaoinacio Jun 7, 2024
739b98b
Merge branch 'master' into feature/CON-264/DaysOffImport
StephenBeirlaen Jun 11, 2024
2e70ff7
Document the /closingDays.add endpoint
StephenBeirlaen Jun 11, 2024
b04d1cd
Rebuild documentation
StephenBeirlaen Jun 11, 2024
5dda663
Return the created id in the response
StephenBeirlaen Jun 12, 2024
d1163ec
Rebuild documentation
StephenBeirlaen Jun 12, 2024
a69f7ef
CON-207 document create day off type endpoint
gehadMohamed Jun 14, 2024
7a4b7ff
CON-307 update dayOffTypes.create response code and body
gehadMohamed Jun 17, 2024
55c0596
CON-307 remove slash
gehadMohamed Jun 17, 2024
29fd102
document closingDays.delete endpoint
joaoinacio Jun 19, 2024
7b65245
Merge pull request #808 from teamleadercrm/feature/CON-264/DaysOffImport
StephenBeirlaen Jun 20, 2024
9ceb671
Merge pull request #812 from teamleadercrm/feature/CON-17/closing-day…
StephenBeirlaen Jun 20, 2024
6173f12
Merge branch 'feature/CON-3/days-off' into CON-288-Delete-dayOffType-…
StephenBeirlaen Jun 20, 2024
6d47f49
Merge pull request #809 from teamleadercrm/CON-288-Delete-dayOffType-…
StephenBeirlaen Jun 20, 2024
f46b437
Merge branch 'feature/CON-3/days-off' into DaysOff-BulkDelete
StephenBeirlaen Jun 20, 2024
18e48e3
Merge pull request #810 from teamleadercrm/DaysOff-BulkDelete
StephenBeirlaen Jun 20, 2024
cb4d518
Merge branch 'feature/CON-3/days-off' into CON-307-Create-dayOffType-…
StephenBeirlaen Jun 20, 2024
807463e
Merge pull request #813 from teamleadercrm/CON-307-Create-dayOffType-…
StephenBeirlaen Jun 20, 2024
4de3bc5
Merge branch 'feature/CON-3/days-off' into feature/CON-18/closing-day…
StephenBeirlaen Jun 20, 2024
e57359f
Merge pull request #814 from teamleadercrm/feature/CON-18/closing-day…
StephenBeirlaen Jun 20, 2024
8a9b93e
Change order of endpoints to match day-off-types endpoints
StephenBeirlaen Jun 20, 2024
291995d
Split into multiple lines by resource
StephenBeirlaen Jun 20, 2024
ba125bb
Rebuild documentation
StephenBeirlaen Jun 20, 2024
46a3b45
Remove duplicate line break
StephenBeirlaen Jun 20, 2024
c2fd6b8
CON-3 adjust request doc for dayOffTypes.create
gehadMohamed Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 83 additions & 1 deletion apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ We list all backwards-compatible additions here. These are currently available i

#### June 2024
- We added `tax` to the `products.info` endpoint.
- We added the `daysOff.import` and `daysOff.bulkDelete` endpoints.
- We added the `dayOffTypes.create` and `dayOffTypes.delete` endpoints.
- We added the `closingDays.add` and `closingDays.delete` endpoints.

#### May 2024
- We added `purchase_order_number` to `projects-v2/projects.info`, `projects-v2/projects.create` and `projects-v2/projects.update`.
Expand Down Expand Up @@ -1786,7 +1789,7 @@ Create a new email tracking.

### closingDays.list [POST /closingDays.list]

Returns information about closing days the account
Returns information about closing days of the account

+ Request (application/json)
+ Attributes (object)
Expand All @@ -1805,6 +1808,29 @@ Returns information about closing days the account
+ page (Pagination)
+ matches: `12` (number)

### closingDays.add [POST /closingDays.add]

Adds a closing day for the account.

+ Request (application/json)
+ Attributes (object)
+ `day`: `2024-02-01` (string, required)

+ Response 201 (application/json)
+ Attributes (object)
+ data (object)
+ type: `closingDay` (string)
+ id: `eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8` (string, required)

### closingDays.delete [POST /closingDays.delete]

Removes a closing day for the account.

+ Request (application/json)
+ Attributes (object)
+ id: `eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8` (string, required)

+ Response 204

## Day Off Types [/dayOffTypes]

Expand All @@ -1821,6 +1847,62 @@ Returns a list of day off types for the account
+ `id`: `39263c14-9c16-022d-8513-60cf722ab088` (string)
+ `name`: `Sick leave` (string)

### dayOffTypes.create [POST /dayOffTypes.create]

Create a new day off type.

+ Request (application/json)
+ Attributes (object)
+ name: `day off type` (string, required)
+ color: `#00B2B2` (string, nullable, optional)
+ date_validity (object, nullable, optional)
+ from: `2024-04-04` (string, required)
+ unit: `2025-05-05` (string, required)


+ Response 201 (application/json)
+ Attributes (object)
+ data (object)
+ type: `dayOffType` (string)
+ id: `cf307a90-d778-003c-b820-ab8415d1a524` (string)

### dayOffTypes.delete [POST /dayOffTypes.delete]

Delete a day off type.

+ Request (application/json)
+ Attributes (object)
+ `id`: `1b7cece0-288c-0bbe-b916-5a315fbe9fe2` (string, required)

+ Response 204

## Days Off [/daysOff]

### daysOff.import [POST /daysOff.import]

Imports a list of days off for the given user.

+ Request (application/json)
+ Attributes (object)
+ `user_id`: `f29abf48-337d-44b4-aad4-585f5277a456` (string, required) - The id of the user that the days off belong to.
+ `leave_type_id`: `0f517e20-2e76-4684-8d6c-3334f6d7148c` (string, required) - The id of the leave type that is associated with the given days off.
+ `days` (array, required) - At least one day must be present
+ (object)
+ `starts_at`: `2024-02-01T08:00:00+00:00` (string, required)
+ `ends_at`: `2024-02-01T18:00:00+00:00` (string, required)

+ Response 201 (application/json)

### daysOff.bulkDelete [POST /daysOff.bulkDelete]

Deletes a list of days off for the given user.

+ Request (application/json)
+ Attributes (object)
+ `user_id`: `f29abf48-337d-44b4-aad4-585f5277a456` (string, required) - The id of the user that the days off belong to.
+ `ids`: `0a481ce9-0d2a-0913-9439-0fd8b469b566`, `5050789e-4385-02f6-bd3c-d051cc12f5cf` (array[string]) - At least one day off id must be present.

+ Response 204 (application/json)

# Group CRM

Expand Down
25 changes: 24 additions & 1 deletion src/01-general/closing-days.apib
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### closingDays.list [POST /closingDays.list]

Returns information about closing days the account
Returns information about closing days of the account

+ Request (application/json)
+ Attributes (object)
Expand All @@ -21,3 +21,26 @@ Returns information about closing days the account
+ page (Pagination)
+ matches: `12` (number)

### closingDays.add [POST /closingDays.add]

Adds a closing day for the account.

+ Request (application/json)
+ Attributes (object)
+ `day`: `2024-02-01` (string, required)

+ Response 201 (application/json)
+ Attributes (object)
+ data (object)
+ type: `closingDay` (string)
+ id: `eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8` (string, required)

### closingDays.delete [POST /closingDays.delete]

Removes a closing day for the account.

+ Request (application/json)
+ Attributes (object)
+ id: `eb264fd0-0e5c-0dbf-ae1e-49e7d6a8e6b8` (string, required)

+ Response 204
28 changes: 28 additions & 0 deletions src/01-general/day-off-types.apib
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,31 @@ Returns a list of day off types for the account
+ `id`: `39263c14-9c16-022d-8513-60cf722ab088` (string)
+ `name`: `Sick leave` (string)

### dayOffTypes.create [POST /dayOffTypes.create]

Create a new day off type.

+ Request (application/json)
+ Attributes (object)
+ name: `day off type` (string, required)
+ color: `#00B2B2` (string, nullable, optional)
+ date_validity (object, nullable, optional)
+ from: `2024-04-04` (string, required)
+ unit: `2025-05-05` (string, required)


+ Response 201 (application/json)
+ Attributes (object)
+ data (object)
+ type: `dayOffType` (string)
+ id: `cf307a90-d778-003c-b820-ab8415d1a524` (string)

### dayOffTypes.delete [POST /dayOffTypes.delete]

Delete a day off type.

+ Request (application/json)
+ Attributes (object)
+ `id`: `1b7cece0-288c-0bbe-b916-5a315fbe9fe2` (string, required)

+ Response 204
27 changes: 27 additions & 0 deletions src/01-general/days-off.apib
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Days Off [/daysOff]

### daysOff.import [POST /daysOff.import]

Imports a list of days off for the given user.

+ Request (application/json)
+ Attributes (object)
+ `user_id`: `f29abf48-337d-44b4-aad4-585f5277a456` (string, required) - The id of the user that the days off belong to.
+ `leave_type_id`: `0f517e20-2e76-4684-8d6c-3334f6d7148c` (string, required) - The id of the leave type that is associated with the given days off.
+ `days` (array, required) - At least one day must be present
+ (object)
+ `starts_at`: `2024-02-01T08:00:00+00:00` (string, required)
+ `ends_at`: `2024-02-01T18:00:00+00:00` (string, required)

+ Response 201 (application/json)

### daysOff.bulkDelete [POST /daysOff.bulkDelete]

Deletes a list of days off for the given user.

+ Request (application/json)
+ Attributes (object)
+ `user_id`: `f29abf48-337d-44b4-aad4-585f5277a456` (string, required) - The id of the user that the days off belong to.
+ `ids`: `0a481ce9-0d2a-0913-9439-0fd8b469b566`, `5050789e-4385-02f6-bd3c-d051cc12f5cf` (array[string]) - At least one day off id must be present.

+ Response 204 (application/json)
2 changes: 2 additions & 0 deletions src/apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ HOST: https://api.focus.teamleader.eu

:[Day Off Types](./01-general/day-off-types.apib)

:[Days Off](./01-general/days-off.apib)

# Group CRM

:[Contacts](./02-crm/contacts.apib)
Expand Down
3 changes: 3 additions & 0 deletions src/changes-backwards-compatible.apib
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ We list all backwards-compatible additions here. These are currently available i

#### June 2024
- We added `tax` to the `products.info` endpoint.
- We added the `daysOff.import` and `daysOff.bulkDelete` endpoints.
- We added the `dayOffTypes.create` and `dayOffTypes.delete` endpoints.
- We added the `closingDays.add` and `closingDays.delete` endpoints.

#### May 2024
- We added `purchase_order_number` to `projects-v2/projects.info`, `projects-v2/projects.create` and `projects-v2/projects.update`.
Expand Down
Loading