HRIS
- Overview
- Use Cases
Common Guides
API Reference
- Companies
- Custom Field Definitions
- Employees
- Documents
- Employments
- Locations
- Time Off
- Time Entries
- Benefits
- Groups
- Jobs
- Time Off Policies
Get time off request
curl --request GET \
--url https://api.stackone.com/unified/hris/time_off/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'x-account-id: <x-account-id>'
{
"data": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"employee_id": "1687-3",
"remote_employee_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"approver_id": "1687-4",
"remote_approver_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"status": {
"value": "approved",
"source_value": "<string>"
},
"type": {
"value": "sick",
"source_value": "<string>"
},
"start_date": "2021-01-01T01:01:01.000Z",
"end_date": "2021-01-01T01:01:01.000Z",
"start_half_day": true,
"end_half_day": true,
"duration": "P3Y6M4DT12H30M5S",
"time_off_policy_id": "cx280928933",
"remote_time_off_policy_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"reason": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "<string>"
},
"created_date": "2021-01-01T01:01:01.000Z",
"updated_date": "2021-01-01T01:01:01.000Z",
"policy": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "Holidays",
"description": "Usable for regional and national holidays of employees.",
"type": {
"value": "holiday",
"source_value": "<string>"
},
"duration_unit": {
"value": "hours",
"source_value": "<string>"
},
"reasons": [
{
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "<string>"
}
],
"created_at": "2021-01-01T01:01:01.000Z",
"updated_at": "2021-01-01T01:01:01.000Z"
}
},
"raw": [
{
"method": "<string>",
"url": "<string>",
"body": "<string>",
"response": {}
}
]
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Headers
The account identifier
Path Parameters
Query Parameters
Indicates that the raw request result should be returned in addition to the mapped result (default value is false)
Query parameters that can be used to pass through parameters to the underlying provider request by surrounding them with 'proxy' key
The comma separated list of fields that will be returned in the response (if empty, all fields are returned)
"id,remote_id,employee_id,remote_employee_id,approver_id,remote_approver_id,status,type,start_date,end_date,start_half_day,end_half_day,duration,time_off_policy_id,remote_time_off_policy_id,reason,created_at,updated_at,policy"
The comma separated list of fields that will be expanded in the response
"policy"
Response
Unique identifier
"8187e5da-dc77-475e-9949-af0f1fa4e4e3"
Provider's unique identifier
"8187e5da-dc77-475e-9949-af0f1fa4e4e3"
The employee ID
"1687-3"
Provider's unique identifier of the employee
"e3cb75bf-aa84-466e-a6c1-b8322b257a48"
The approver ID
"1687-4"
Provider's unique identifier of the approver
"e3cb75bf-aa84-466e-a6c1-b8322b257a48"
The type of the time off request
sick
, unmapped_value
, vacation
, long_term_disability
, short_term_disability
, absent
, comp_time
, training
, annual_leave
, leave_of_absence
, break
, child_care_leave
, maternity_leave
, jury_duty
, bereavement_leave
, sabbatical
, accident
The start date of the time off request
"2021-01-01T01:01:01.000Z"
The end date of the time off request
"2021-01-01T01:01:01.000Z"
True if the start of the time off request begins half way through the day
true
True if the end of the time off request ends half way through the day
true
The duration of the time off request
"P3Y6M4DT12H30M5S"
The time off policy id associated with this time off request
"cx280928933"
Provider's unique identifier of the time off policy id associated with this time off request
"e3cb75bf-aa84-466e-a6c1-b8322b257a48"
The created date of the time off request
"2021-01-01T01:01:01.000Z"
The updated date of the time off request
"2021-01-01T01:01:01.000Z"
The time off policy associated with Time Off
Unique identifier
"8187e5da-dc77-475e-9949-af0f1fa4e4e3"
Provider's unique identifier
"8187e5da-dc77-475e-9949-af0f1fa4e4e3"
The name of this policy
"Holidays"
The description of this policy
"Usable for regional and national holidays of employees."
The type of this policy
The unified value for the type of the time off policy. If the provider does not specify this unit, the value will be set to unmapped_value
paid
, unpaid
, holiday
, vacation
, sick
, personal
, in_lieu
, bereavement
, jury_duty
, unmapped_value
"holiday"
The duration unit of the current policy
The created_at date of this policy
"2021-01-01T01:01:01.000Z"
The updated_at date of this policy
"2021-01-01T01:01:01.000Z"
Was this page helpful?
curl --request GET \
--url https://api.stackone.com/unified/hris/time_off/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'x-account-id: <x-account-id>'
{
"data": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"employee_id": "1687-3",
"remote_employee_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"approver_id": "1687-4",
"remote_approver_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"status": {
"value": "approved",
"source_value": "<string>"
},
"type": {
"value": "sick",
"source_value": "<string>"
},
"start_date": "2021-01-01T01:01:01.000Z",
"end_date": "2021-01-01T01:01:01.000Z",
"start_half_day": true,
"end_half_day": true,
"duration": "P3Y6M4DT12H30M5S",
"time_off_policy_id": "cx280928933",
"remote_time_off_policy_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"reason": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "<string>"
},
"created_date": "2021-01-01T01:01:01.000Z",
"updated_date": "2021-01-01T01:01:01.000Z",
"policy": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "Holidays",
"description": "Usable for regional and national holidays of employees.",
"type": {
"value": "holiday",
"source_value": "<string>"
},
"duration_unit": {
"value": "hours",
"source_value": "<string>"
},
"reasons": [
{
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "<string>"
}
],
"created_at": "2021-01-01T01:01:01.000Z",
"updated_at": "2021-01-01T01:01:01.000Z"
}
},
"raw": [
{
"method": "<string>",
"url": "<string>",
"body": "<string>",
"response": {}
}
]
}