Holiday
  • 16 Jun 2022
  • 1 Minute to read
  • Dark
    Light

Holiday

  • Dark
    Light

Article summary

Holiday

Ticket holiday.

Holiday JSON Format

Holiday is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the holiday.
titlestringName of the holiday.
datedatetimeHoliday 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:

Holiday

  • 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:

NameTypeinRequiredDescription
titlestringbodyyesName of the holiday.
datedatetimebodyyesHoliday date.
  • Response:

Holiday

  • 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:

NameTypeinRequiredDescription
titlestringbodyyesName of the holiday.
datedatetimebodyyesHoliday date.
  • Response:

Holiday

  • 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


Was this article helpful?