Improve example req/res data for some endpoints
This commit is contained in:
parent
1e7ce5f9e2
commit
2d48134ecb
@ -138,7 +138,7 @@ A json object for the deleted account with confirmation message.
|
||||
|
||||
#### Get a list of meetings for an account
|
||||
|
||||
**`GET /api/accounts/:account_id/meetings`**
|
||||
**`GET /api/accounts/:id/meetings`**
|
||||
|
||||
##### Request
|
||||
|
||||
@ -155,21 +155,34 @@ A json object with an `token`.
|
||||
A json object for the specified account with an array of `meeting`.
|
||||
|
||||
```
|
||||
[{
|
||||
"id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"title": "Worldwide strategy meeting for growth",
|
||||
"description": "Let's find the best ethical growth hacking technics together. Yeah, fun.",
|
||||
"start_time": "2022-02-16 20:00:00",
|
||||
"timezone": "Europe/Brussels",
|
||||
"duration": 60,
|
||||
"status": 1
|
||||
},
|
||||
{
|
||||
"id": "follow-up-with-tech-team-21850",
|
||||
"title": "Follow up with tech team",
|
||||
"duration": 120,
|
||||
"status": 0
|
||||
}
|
||||
[
|
||||
{
|
||||
"id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"title": "Worldwide meeting I",
|
||||
"description": "Let's find the best ethical growth hacking technics together. Yeah, fun.",
|
||||
"start_time": "10:30:00",
|
||||
"timezone": "Europe/Brussels",
|
||||
"duration": 90,
|
||||
"status": false
|
||||
},
|
||||
{
|
||||
"id": "2e8f3748-ea5a-4d20-b9a8-683ac65f5634",
|
||||
"title": "Worldwide meeting II",
|
||||
"description": "Let's find the best ethical growth hacking technics together. Yeah, fun.",
|
||||
"start_time": "08:00:00",
|
||||
"timezone": "America/New_York",
|
||||
"duration": 90,
|
||||
"status": false
|
||||
},
|
||||
{
|
||||
"id": "a8344a68-7961-4bff-bb3b-b288f3abcf1c",
|
||||
"title": "Worldwide meeting III",
|
||||
"description": "Let's find the best ethical growth hacking technics together. Yeah, fun.",
|
||||
"start_time": "14:30:00",
|
||||
"timezone": "Asia/Kolkata",
|
||||
"duration": 90,
|
||||
"status": false
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
@ -292,7 +305,7 @@ A json object with a `meeting_id`.
|
||||
|
||||
```
|
||||
{
|
||||
"id": "f86983db-955e-43b8-be3e-bc92bbeb9b43"
|
||||
"id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c"
|
||||
}
|
||||
```
|
||||
|
||||
@ -303,29 +316,27 @@ A json object for the specified meeting with an array of `participant`.
|
||||
```
|
||||
[
|
||||
{
|
||||
"id": 23,
|
||||
"account_id": 5,
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"earliest_time": "09:30",
|
||||
"latest_time": "17:00",
|
||||
"quorum": 1,
|
||||
"mandatory": 1,
|
||||
"host": 1,
|
||||
"answered": 1,
|
||||
"timezone": "Europe/Brussels"
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"account_id": 11,
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"earliest_time": "10:00",
|
||||
"latest_time": "21:00",
|
||||
"quorum": 0,
|
||||
"mandatory": 1,
|
||||
"host": 0,
|
||||
"answered": 1,
|
||||
"timezone": "Europe/Brussels"
|
||||
}
|
||||
"account_id": 1,
|
||||
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"earliest_time": "09:30:00",
|
||||
"latest_time": "22:00:00",
|
||||
"quorum": false,
|
||||
"mandatory": false,
|
||||
"host": false,
|
||||
"answered": false,
|
||||
"timezone": "Europe/Brussels"
|
||||
},
|
||||
{
|
||||
"account_id": 2,
|
||||
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"earliest_time": "09:00:00",
|
||||
"latest_time": "20:00:00",
|
||||
"quorum": false,
|
||||
"mandatory": false,
|
||||
"host": false,
|
||||
"answered": false,
|
||||
"timezone": "America/New_York"
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
@ -387,36 +398,38 @@ A json object with a `meeting_id`.
|
||||
A json object for the specified meeting with `meeting_id` and an array of `availibility`.
|
||||
|
||||
```
|
||||
{
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"availibility": [{
|
||||
"participant_id": 5,
|
||||
"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"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"participant_id": 56,
|
||||
"possible_date_id": 21,
|
||||
"intervals": [{
|
||||
"preference": 0,
|
||||
"start_time": "2021-06-25 08:00:00",
|
||||
"end_time": "2021-06-25 10:30:00",
|
||||
"timezone": "Europe/Brussels"
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"account_id": 1,
|
||||
"possible_date_id": 1,
|
||||
"preference": false,
|
||||
"start_time": "09:00:00",
|
||||
"end_time": "22:00:00",
|
||||
"timezone": "Europe/Brussels"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"account_id": 2,
|
||||
"possible_date_id": 1,
|
||||
"preference": false,
|
||||
"start_time": "10:00:00",
|
||||
"end_time": "20:00:00",
|
||||
"timezone": "America/New_York"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"account_id": 1,
|
||||
"possible_date_id": 2,
|
||||
"preference": false,
|
||||
"start_time": "10:00:00",
|
||||
"end_time": "14:00:00",
|
||||
"timezone": "Europe/Brussels"
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
@ -556,8 +569,8 @@ A json object for the meeting to add with **`meeting_id`** and **`possible_date`
|
||||
|
||||
```
|
||||
{
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date": "2020-02-18"
|
||||
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"possible_date": "2025-02-27"
|
||||
}
|
||||
```
|
||||
|
||||
@ -567,11 +580,9 @@ A json object for the added meeting with `id`, `meeting_id` and `possible_date`.
|
||||
|
||||
```
|
||||
{
|
||||
"data": {
|
||||
"id": 5,
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date": "2020-02-18"
|
||||
}
|
||||
"id": 20,
|
||||
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"possible_date": "2025-02-26T23:00:00.000Z"
|
||||
}
|
||||
```
|
||||
|
||||
@ -581,11 +592,11 @@ A json object for the added meeting with `id`, `meeting_id` and `possible_date`.
|
||||
|
||||
##### Request
|
||||
|
||||
A json object for the possible date to delete with `id`.
|
||||
A json object for the possible date to delete with `token`.
|
||||
|
||||
```
|
||||
{
|
||||
"id": 12
|
||||
"token": "fsdfsdf-sdfsgdfg-dfgdfg-dfgd"
|
||||
}
|
||||
```
|
||||
|
||||
@ -614,7 +625,7 @@ A json object for the deleted possible date with `message`.
|
||||
| created_at | datetime | generated by database |
|
||||
| updated_at | datetime | generated by database |
|
||||
|
||||
#### Add an availibility for a possible date
|
||||
#### Add an availibility
|
||||
|
||||
**`POST /api/availibility`**
|
||||
|
||||
@ -624,12 +635,12 @@ A json object with the availibility to add with **`participant_id`**, **`possibl
|
||||
|
||||
```
|
||||
{
|
||||
"account_id": 5,
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date_id": 21,
|
||||
"preference": 0,
|
||||
"start_time": "2021-06-25 09:00:00",
|
||||
"end_time": "2021-06-25 13:00:00",
|
||||
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"account_id": 1,
|
||||
"possible_date_id": 1,
|
||||
"preference": false,
|
||||
"start_time": "23:00:00",
|
||||
"end_time": "23:59:00",
|
||||
"timezone": "Europe/Brussels"
|
||||
}
|
||||
|
||||
@ -641,13 +652,13 @@ A json object with the availibility added with **`id`**, **`account_id`**, **`me
|
||||
|
||||
```
|
||||
{
|
||||
"id": 1,
|
||||
"account_id": 5,
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date_id": 21,
|
||||
"preference": 0,
|
||||
"start_time": "2021-06-25 09:00:00",
|
||||
"end_time": "2021-06-25 13:00:00",
|
||||
"id": 30,
|
||||
"account_id": 1,
|
||||
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||
"possible_date_id": 1,
|
||||
"preference": false,
|
||||
"start_time": "23:00:00",
|
||||
"end_time": "23:59:00",
|
||||
"timezone": "Europe/Brussels"
|
||||
}
|
||||
```
|
||||
@ -672,6 +683,6 @@ A json object for the deleted availibility with `message`.
|
||||
|
||||
```
|
||||
{
|
||||
"message": "Availibility with id 12 was successfully deleted."
|
||||
"message": "Availibility with id 30 was successfully deleted."
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user