The Holiday List object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

holiday_list_name string required
from_date string required
to_date string required
total_holidays integer
weekly_off string
color string
country string
subdivision string
is_half_day boolean

Default: false

The Holiday List object
{
  "id": "holiday-list_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "holiday_list_name": "holiday_list_name_example",
  "from_date": "2024-01-15",
  "to_date": "2024-01-15",
  "total_holidays": 0,
  "weekly_off": "weekly_off_example",
  "color": "color_example",
  "country": "country_example",
  "subdivision": "subdivision_example",
  "is_half_day": false
}
GET /api/setup/holiday-list/{id}

Retrieve a holiday list

Retrieves the details of an existing holiday list. Supply the unique holiday list ID that was returned from a previous request.

Path parameters

id string required

The identifier of the holiday list to retrieve.

Returns

Returns the holiday list object if a valid identifier was provided.

GET /api/setup/holiday-list/{id}
curl https://api.overplane.dev/api/setup/holiday-list/holiday-list_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "holiday-list_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "holiday_list_name": "holiday_list_name_example",
  "from_date": "2024-01-15",
  "to_date": "2024-01-15",
  "total_holidays": 0,
  "weekly_off": "weekly_off_example",
  "color": "color_example",
  "country": "country_example",
  "subdivision": "subdivision_example",
  "is_half_day": false
}
GET /api/setup/holiday-list

List all holiday lists

Returns a list of holiday lists. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of holiday list objects.

GET /api/setup/holiday-list
curl https://api.overplane.dev/api/setup/holiday-list \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "holiday-list_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "holiday_list_name": "holiday_list_name_example",
      "from_date": "2024-01-15",
      "to_date": "2024-01-15",
      "total_holidays": 0,
      "weekly_off": "weekly_off_example",
      "color": "color_example",
      "country": "country_example",
      "subdivision": "subdivision_example",
      "is_half_day": false
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/setup/holiday-list

Create a holiday list

Creates a new holiday list object.

Body parameters

holiday_list_name string required
from_date string required
to_date string required
total_holidays integer
weekly_off string
color string
country string
subdivision string
is_half_day boolean

Default: false

Returns

Returns the newly created holiday list object if the call succeeded.

POST /api/setup/holiday-list
curl https://api.overplane.dev/api/setup/holiday-list \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"holiday_list_name":"holiday_list_name_example","from_date":"2024-01-15","to_date":"2024-01-15"}'
Response
{
  "id": "holiday-list_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "holiday_list_name": "holiday_list_name_example",
  "from_date": "2024-01-15",
  "to_date": "2024-01-15",
  "total_holidays": 0,
  "weekly_off": "weekly_off_example",
  "color": "color_example",
  "country": "country_example",
  "subdivision": "subdivision_example",
  "is_half_day": false
}
PATCH /api/setup/holiday-list/{id}

Update a holiday list

Updates the specified holiday list by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the holiday list to update.

Body parameters

holiday_list_name string
from_date string
to_date string
total_holidays integer
weekly_off string
color string
country string
subdivision string
is_half_day boolean

Default: false

Returns

Returns the updated holiday list object.

PATCH /api/setup/holiday-list/{id}
curl https://api.overplane.dev/api/setup/holiday-list/holiday-list_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"holiday_list_name":"holiday_list_name_example","from_date":"2024-01-15"}'
Response
{
  "id": "holiday-list_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "holiday_list_name": "holiday_list_name_example",
  "from_date": "2024-01-15",
  "to_date": "2024-01-15",
  "total_holidays": 0,
  "weekly_off": "weekly_off_example",
  "color": "color_example",
  "country": "country_example",
  "subdivision": "subdivision_example",
  "is_half_day": false
}
DELETE /api/setup/holiday-list/{id}

Delete a holiday list

Permanently deletes a holiday list. This cannot be undone.

Path parameters

id string required

The identifier of the holiday list to delete.

Returns

Returns a confirmation that the holiday list has been deleted.

DELETE /api/setup/holiday-list/{id}
curl https://api.overplane.dev/api/setup/holiday-list/holiday-list_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "holiday-list_abc123",
  "deleted": true
}

Line items

Child objects that belong to this holiday list. These are accessed via the parent's ID.

Holiday

Attributes

idx integer
holiday_list_id string required
holiday_date string required
description string required
weekly_off boolean
is_half_day boolean

Endpoints

GET /api/setup/holiday?parent_id={id}
POST /api/setup/holiday
PATCH /api/setup/holiday/{id}
DELETE /api/setup/holiday/{id}
POST /api/setup/holiday/reorder
Holiday object
{
  "id": "holiday_abc123",
  "idx": 1,
  "holiday_list_id": "holiday_list_id_example",
  "holiday_date": "2024-01-15",
  "description": "description_example",
  "weekly_off": false,
  "is_half_day": false
}