Holidays

List holidays

get

Retrieve a collection of holiday entries.

Authorizations
Query parameters
filterstringOptional

Use the filter query parameter to retrieve just a subset of a collection.

searchstringOptional

Use the search query parameter to restrict the results of a request to match a search criterion.

orderbystringOptional

Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.

skipinteger · int32Optional

Use the skip query parameter to set the number of items to skip at the start of a collection.

Default: 0
topinteger · int32 · min: 1 · max: 100Optional

Use the top query parameter to specify the page size of the result set.

Default: 100
Responses
200
OK
application/json
get
GET /api/holidays HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 100,
  "items": [
    {
      "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "name": "text",
      "region": "text",
      "consecutive": true,
      "every_year": true,
      "year_start": 1,
      "year_end": 1,
      "month_start": 1,
      "month_end": 1,
      "day_start": 1,
      "day_end": 1,
      "hour_start": 1,
      "hour_end": 1,
      "minute_start": 1,
      "minute_end": 1
    }
  ]
}

Create a new holiday

post

Create a new holiday

Authorizations
Body
namestring · min: 1 · max: 64Required

The name of the holiday.

regionstringRequired

A valid country code based on iso3166-1 alpha-3 standard. see: https://www.iso.org/iso-3166-country-codes.html

consecutivebooleanRequired

Whether the holiday consists of consecutive days.

every_yearbooleanRequired

Does the holiday take effect every year.

year_startintegerOptional

The start year of holiday.

year_endintegerOptional

The start year of holiday.

month_startintegerOptional

The start month of holiday.

month_endintegerOptional

The end month of holiday.

day_startintegerOptional

The start day of holiday.

day_endintegerOptional

The end day of holiday.

hour_startintegerOptional

The start hour of holiday.

hour_endintegerOptional

The end hour of holiday.

minute_startintegerOptional

The start minute of holiday.

minute_endintegerOptional

The end minute of holiday.

Responses
201
Created
application/json
post
POST /api/holidays HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 212

{
  "name": "text",
  "region": "text",
  "consecutive": true,
  "every_year": true,
  "year_start": 1,
  "year_end": 1,
  "month_start": 1,
  "month_end": 1,
  "day_start": 1,
  "day_end": 1,
  "hour_start": 1,
  "hour_end": 1,
  "minute_start": 1,
  "minute_end": 1
}
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Retrieve a holiday

get
Authorizations
Path parameters
idall ofRead-onlyRequired

The unique ID of holiday.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200
OK
application/json
get
GET /api/holidays/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "name": "text",
  "region": "text",
  "consecutive": true,
  "every_year": true,
  "year_start": 1,
  "year_end": 1,
  "month_start": 1,
  "month_end": 1,
  "day_start": 1,
  "day_end": 1,
  "hour_start": 1,
  "hour_end": 1,
  "minute_start": 1,
  "minute_end": 1
}

Update a holiday

post

Update a holiday that already exists.

Authorizations
Path parameters
idall ofRead-onlyRequired

The unique ID of holiday.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Body
namestring · min: 1 · max: 64Optional

The name of the holiday.

regionstringOptional

A valid country code based on iso3166-1 alpha-3 standard. see: https://www.iso.org/iso-3166-country-codes.html

consecutivebooleanOptional

Whether the holiday consists of consecutive days.

every_yearbooleanOptional

Does the holiday take effect every year.

year_startintegerOptional

The start year of holiday.

year_endintegerOptional

The start year of holiday.

month_startintegerOptional

The start month of holiday.

month_endintegerOptional

The end month of holiday.

day_startintegerOptional

The start day of holiday.

day_endintegerOptional

The end day of holiday.

hour_startintegerOptional

The start hour of holiday.

hour_endintegerOptional

The end hour of holiday.

minute_startintegerOptional

The start minute of holiday.

minute_endintegerOptional

The end minute of holiday.

Responses
200
OK
post
POST /api/holidays/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 212

{
  "name": "text",
  "region": "text",
  "consecutive": true,
  "every_year": true,
  "year_start": 1,
  "year_end": 1,
  "month_start": 1,
  "month_end": 1,
  "day_start": 1,
  "day_end": 1,
  "hour_start": 1,
  "hour_end": 1,
  "minute_start": 1,
  "minute_end": 1
}

No content