Holiday
Ticket holiday.
Holidays- Holidays ManageGET ticketing/holidays- Get the list of HolidaysGET ticketing/holidays/{id}- Get a single HolidayPOST ticketing/holidays- Create a new HolidayPUT ticketing/holidays/{id}- Update the HolidayDELETE ticketing/holidays/{id}- Remove the Holiday
Holiday JSON Format
Holiday is represented as simple flat JSON objects with the following keys:
| Name | Type | Description |
|---|---|---|
id |
guid | Id of the holiday. |
title |
string | Name of the holiday. |
date |
datetime | Holiday date. |
Get the list of Holidays
GET ticketing/holidays
-
Parameters:
No Parameters
-
Response:
An array of Holiday
-
Example
Sample Request:
curl https://api11.comm100.io/v4/ticketing/holidays \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"holidays": [
{
"id": "31cb2663-cf09-4852-a3cd-f412da17d731",
"title": "test holiday",
"date": "2021-05-10"
}
],
"nextPage": null,
"previousPage": null,
"total": 1
}
Get a single Holiday
GET ticketing/holidays/{id}
-
Parameters:
No Parameters
-
Response:
-
Example
Sample Request:
curl https://api11.comm100.io/v4/ticketing/holidays/31cb2663-cf09-4852-a3cd-f412da17d731 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "31cb2663-cf09-4852-a3cd-f412da17d731",
"title": "test holiday",
"date": "2021-05-10"
}
Create a new Holiday
POST ticketing/holidays
-
Parameters:
| Name | Type | in | Required | Description |
|---|---|---|---|---|
title |
string | body | yes | Name of the holiday. |
date |
datetime | body | yes | Holiday date. |
-
Response:
-
Example
Sample Request:
curl https://api11.comm100.io/v4/ticketing/holidays \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"title":"test holiday","date":"2021-05-10"}'
Response:
HTTP/1.1 201 Created
{
"id": "31cb2663-cf09-4852-a3cd-f412da17d731",
"title": "test holiday",
"date": "2021-05-10"
}
Update the Holiday
PUT ticketing/holidays/{id}
-
Parameters:
| Name | Type | in | Required | Description |
|---|---|---|---|---|
title |
string | body | yes | Name of the holiday. |
date |
datetime | body | yes | Holiday date. |
-
Response:
-
Example
Sample Request:
curl https://api11.comm100.io/v4/ticketing/holidays/31cb2663-cf09-4852-a3cd-f412da17d731 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"title":"test holiday","date":"2021-05-10"}'
Response:
HTTP/1.1 200 OK
{
"id": "31cb2663-cf09-4852-a3cd-f412da17d731",
"title": "test holiday",
"date": "2021-05-10"
}
Remove the Holiday
DELETE ticketing/holidays/{id}
-
Parameters:
No Parameters
-
Response:
No Content
-
Example
Sample Request:
curl https://api11.comm100.io/v4/ticketing/holidays/31cb2663-cf09-4852-a3cd-f412da17d731 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content