Holidays

List current user's holidays

get

Retrieve a collection of current user's holidays.

Authorizations
Responses
200
OK
application/json
get
GET /api/user/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 for current user

post

Create a new holiday for current user.

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 end 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/user/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 of current user

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/user/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 of current user

post

Update a holiday of current user.

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: 64Required

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

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 end 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/user/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