Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Holidays

Holidays are the company-wide days off that have been added to a user's Kantata OX account.

Fetching a list of Holidays

This endpoint returns structured Holiday objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the holidays top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • holiday_calendar_associations (HolidayCalendarAssociation) - The Holiday Calendar Associations for this Holiday.
matching
string

Includes holidays matching the specified name.

not_on_calendars
string

Includes holidays not specified in the comma separated list of calendar IDs.

only
string

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Value: "calendar_names_list"
order
string
Default: "start_date:asc"

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: start_date:asc and start_date:desc.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
Responses
200

A list of Holidays have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/holidays
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "holidays": {
    },
  • "holiday_calendar_associations": {
    }
}

Creating a new Holiday

This endpoint returns structured Holiday objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the holidays top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • holiday_calendar_associations (HolidayCalendarAssociation) - The Holiday Calendar Associations for this Holiday.
optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Value: "calendar_names_list"
Request Body schema: application/json
required
object
name
required
string

The name of the holiday.

start_date
required
string <date>

The date the holiday begins. The date must be in ISO 8601 format.

end_date
string <date>

The date the holiday ends. The date must be in ISO 8601 format.

paid
boolean

Whether this time range is considered paid time off.

holiday_calendar_ids
integer <int32>

The calendars to which this holiday belongs.

Responses
200

Holiday has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/holidays
Request samples
application/json
{
  • "holiday": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "holidays": {
    },
  • "holiday_calendar_associations": {
    }
}

Fetching a single Holiday

This endpoint returns structured Holiday objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the holidays top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • holiday_calendar_associations (HolidayCalendarAssociation) - The Holiday Calendar Associations for this Holiday.
optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Value: "calendar_names_list"
Responses
200

The Holiday has been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/holidays/{id}
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "holidays": {
    },
  • "holiday_calendar_associations": {
    }
}

Updating an existing Holiday

This endpoint returns structured Holiday objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the holidays top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • holiday_calendar_associations (HolidayCalendarAssociation) - The Holiday Calendar Associations for this Holiday.
optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Value: "calendar_names_list"
Request Body schema: application/json
required
object
name
required
string

The name of the holiday.

start_date
required
string <date>

The date the holiday begins. The date must be in ISO 8601 format.

end_date
string <date>

The date the holiday ends. The date must be in ISO 8601 format.

paid
boolean

Whether this time range is considered paid time off.

holiday_calendar_ids
integer <int32>

The calendars to which this holiday belongs.

Responses
200

Holiday has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/holidays/{id}
Request samples
application/json
{
  • "holiday": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "holidays": {
    },
  • "holiday_calendar_associations": {
    }
}

Deleting an existing Holiday

The response will contain no content and an HTTP 204 status code if the request was successful, or a standard Kantata OX error message explaining why the object could not be deleted.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
204

Holiday has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

delete/holidays/{id}
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}