diff --git a/api-documentation.md b/api-documentation.md index 82332f7..11686fd 100644 --- a/api-documentation.md +++ b/api-documentation.md @@ -278,7 +278,7 @@ A json object for the deleted meeting with `message`. ``` { - "message": "Meeting with id f86983db-955e-43b8-be3e-bc92bbeb9b43 successfully deleted." + "message": "Meeting with id f86983db-955e-43b8-be3e-bc92bbeb9b43 was successfully deleted." } ``` @@ -532,8 +532,7 @@ A json object for the deleted participant with `message`. ``` { -{ - "message": "Meeting with id 1-f86983db-955e-43b8-be3e-bc92bbeb9b43 successfully deleted." + "message": "Meeting with id 1-f86983db-955e-43b8-be3e-bc92bbeb9b43 was successfully deleted." } ``` @@ -592,13 +591,11 @@ A json object for the possible date to delete with `id`. ##### Response `200` -A json object for the deleted possible date with `id`, `meeting_id` and `possible_date`. +A json object for the deleted possible date with `message`. ``` { - "id": 12, - "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43", - "possible_date": "2020-02-18" + "message": "Possible date with id 12 was successfully deleted." } ``` @@ -627,76 +624,54 @@ A json object with the availibility to add with **`participant_id`**, **`possibl ``` { - "participant_id": 5, + "account_id": 5, + "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43" "possible_date_id": 21, - "intervals": [{ - "preference": 0, - "start_time": "2021-06-25 09:00:00", - "end_time": "2021-06-25 13:00:00", - "timezone": "Europe/Brussels" - }, - { - "preference": 1, - "start_time": "2021-06-25 15:00:00", - "end_time": "2021-06-25 20:00:00", - "timezone": "Europe/Brussels" - } - ] + "preference": 0, + "start_time": "2021-06-25 09:00:00", + "end_time": "2021-06-25 13:00:00", + "timezone": "Europe/Brussels" } ``` ##### Response `201` -A json object with the availibility added with **`id`**, **`participant_id`**, **`possible_date_id`** and an array of intervals with **`id`**, **`preference`**, **`start_time`**, **`end_time`** and **`timezone`**. +A json object with the availibility added with **`id`**, **`account_id`**, **`meeting_id`**, **`possible_date_id`** and an array of intervals with **`id`**, **`preference`**, **`start_time`**, **`end_time`** and **`timezone`**. ``` { "id": 1 - "participant_id": 5, + "account_id": 5, + "meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43" "possible_date_id": 21, - "intervals": [{ - "id": 45, - "preference": 0, - "start_time": "2021-06-25 09:00:00", - "end_time": "2021-06-25 20:00:00", - "timezone": "Europe/Brussels" - }, - { - "id": 46, - "preference": 1, - "start_time": "2021-06-25 09:00:00", - "end_time": "2021-06-25 20:00:00", - "timezone": "Europe/Brussels" - } - ] + "preference": 0, + "start_time": "2021-06-25 09:00:00", + "end_time": "2021-06-25 13:00:00", + "timezone": "Europe/Brussels" } ``` -#### Delete availibility for a possible date +#### Delete an availibility **`DELETE /api/availibility/:id`** ##### Request -A json object for the availibility to delete with **`participant_id`** and **`possible_date_id`**. +A json object for the availibility to delete with **`token`**. ``` { - "participant_id": 5, - "possible_date_id": 21 + "token": "bbeb9b43-fzefzef-zefdhffg-zgze" } ``` ##### Response `200` -A json object for the deleted availibility with status code and message. +A json object for the deleted availibility with `message`. ``` { - "data": { - "participant_username": "José", - "possible_date": "2020-05-12" - } + "message": "Availibility with id 12 was successfully deleted." } ```