Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Time Off Entries

Time Off Entries represent the time and dates that a user has requested off from work, such as PTO or vacation days.

Fetching a list of Time Off Entries

Returns time off entries which are visible to the user. Items are visible to a user if they are on the same account.

This endpoint returns structured Time Off Entry 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 time_off_entries top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
created_after
string <date-time>

Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

created_before
string <date-time>

Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

end_date
string <date>

Include only time off entries prior to the specified date. The date must be in ISO 8601 format.

external_reference_external_message
string

Filter the objects based on the external message of their associated external references. This is an exact match.

external_reference_external_status
string

Filter by the status of the external object in the external system.

external_reference_service_model
string

Filter by the type of the external object this external reference belongs to.

external_reference_service_model_ref
integer <int32>

Filter by the id of the external object this external reference belongs to.

external_reference_service_model_refs
string

Filter for objects that correlate to the specified external object IDs. Provide a comma-separated list of up to 200 external IDs.

external_reference_service_name
string

Filter by the name of the provider for integration.

external_reference_status
string

Filter by the status of the integration, this can be successful or fail.

has_external_references
boolean

Filter by whether or not the object has external references.

include
string

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

  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • user (User) - Reference the user associated to the time off entry.
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.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
start_date
string <date>

Include only time off entries after the specified date. The date must be in ISO 8601 format.

updated_after
string <date-time>

Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

updated_before
string <date-time>

Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

user_id
integer <int32>

Include only time off entries for the specified User ID.

user_ids
Array of integers <int32>

Include only time off entries for the specified users. Provide a comma-separated list of user IDs.

without_external_reference_service_name
string

Exclude by the existence of an external reference with the specified service name.

workspace_id
integer <int32>

Filter for participants of a specific project.

Responses
200

A list of Time Off Entries have been retrieved.

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

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/time_off_entries
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "time_off_entries": {
    },
  • "external_references": {
    },
  • "users": {
    }
}

Creating one or many Time Off Entries

Creates a single or multiple time off entries for a user. Multiple time off entries can be created for the same day, in a single request or separate requests. Entries for the same day are combined into one time off entry. Time off hours cannot exceed the user's possible workday hours for that day.

This endpoint returns structured Time Off Entry 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 time_off_entries 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.

  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • user (User) - Reference the user associated to the time off entry.
Request Body schema: application/json
required
object
Array of objects

Multiple time off entries and their attributes in an array.

Responses
200

Time Off Entry has been created.

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

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/time_off_entries
Request samples
application/json
{
  • "time_off_entry": {
    },
  • "time_off_entries": [
    ]
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "time_off_entries": {
    },
  • "external_references": {
    },
  • "users": {
    }
}

Delete multiple time off entries

The IDs of the time off entries to delete can be provided in the ids query parameter or via the request body.

Request body example:

{ "ids": "1,2,3" }

If any specified time off entries cannot be deleted, the entire request will fail and an error message will be returned that specifies which ones could not be deleted and why.

This endpoint returns structured Time Off Entry 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 time_off_entries top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
ids
string

A comma-separated list of IDs of time off entries. You can provide up to 100 IDs. The IDs can be provided in this query parameter or via the request body.

Responses
204

Time Off Entry has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

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

Updating an existing Time Off Entry

Update a Time Off Entry. Only the hours and external references can be modified. Time off hours cannot exceed the user's possible workday hours for that day.

This endpoint returns structured Time Off Entry 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 time_off_entries 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.

  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • user (User) - Reference the user associated to the time off entry.
Request Body schema: application/json
required
object
hours
required
number <float>

The number of hours of time off requested for the day (quarter hour increments recommended).

object

Typically populated programmatically by a third party system via an integration, this is an optional object that holds data from an external system. It connects objects in an external system with objects in Kantata OX (for example, to connect a Jira issue to a Kantata OX Project).

Responses
200

Time Off Entry has been updated.

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

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/time_off_entries/{id}
Request samples
application/json
{
  • "time_off_entry": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "time_off_entries": {
    },
  • "external_references": {
    },
  • "users": {
    }
}

Deleting an existing Time Off Entry

This will delete the time off entry.

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

Time Off Entry has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

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