HRIS
- Overview
- Use Cases
Common Guides
API Reference
- Companies
- Custom Field Definitions
- Employees
- GETList Employees
- POSTCreates an employee
- GETGet Employee
- PATCHUpdates an employee
- POSTInvite Employee
- Time Off
- Documents
- Work Eligibility
- Time Off Balances
- Employments
- Skills
- Time Off Policies
- Tasks
- GET
- Documents
- Employments
- Locations
- Time Off
- Time Entries
- Benefits
- Groups
- Jobs
- Time Off Policies
Time Off
Create Employee Time Off Request
POST
/
unified
/
hris
/
employees
/
{id}
/
time_off
Copy
Ask AI
curl --request POST \
--url https://api.stackone.com/unified/hris/employees/{id}/time_off \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'x-account-id: <x-account-id>' \
--data '{
"approver_id": "1687-4",
"status": {
"value": "approved",
"source_value": "<string>"
},
"type": {
"value": "sick",
"source_value": "<string>"
},
"start_date": "2021-01-01T01:01:01.000",
"end_date": "2021-01-01T01:01:01.000",
"start_half_day": true,
"end_half_day": true,
"time_off_policy_id": "cx280928933",
"reason": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "<string>"
},
"comment": "Taking a day off for personal reasons",
"passthrough": {
"other_known_names": "John Doe"
}
}'
Copy
Ask AI
{
"statusCode": 201,
"message": "Record created successfully.",
"timestamp": "2021-01-01T01:01:01.000Z",
"data": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3"
}
}
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
Body
application/json
Response
201
application/json
Record created successfully.
The response is of type object
.
Was this page helpful?
Copy
Ask AI
curl --request POST \
--url https://api.stackone.com/unified/hris/employees/{id}/time_off \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'x-account-id: <x-account-id>' \
--data '{
"approver_id": "1687-4",
"status": {
"value": "approved",
"source_value": "<string>"
},
"type": {
"value": "sick",
"source_value": "<string>"
},
"start_date": "2021-01-01T01:01:01.000",
"end_date": "2021-01-01T01:01:01.000",
"start_half_day": true,
"end_half_day": true,
"time_off_policy_id": "cx280928933",
"reason": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "<string>"
},
"comment": "Taking a day off for personal reasons",
"passthrough": {
"other_known_names": "John Doe"
}
}'
Copy
Ask AI
{
"statusCode": 201,
"message": "Record created successfully.",
"timestamp": "2021-01-01T01:01:01.000Z",
"data": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3"
}
}
Assistant
Responses are generated using AI and may contain mistakes.