POST
/
unified
/
hris
/
employees
/
{id}
/
time_off
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 '{
  "employee_id": "1687-3",
  "approver_id": "1687-4",
  "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,
  "time_off_policy_id": "cx280928933",
  "reason": {
    "id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
    "remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
    "name": "<string>"
  },
  "passthrough": {
    "other_known_names": "John Doe"
  }
}'
{
  "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

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

x-account-id
string
required

The account identifier

Path Parameters

id
string
required

Body

application/json
employee_id
string | null

The employee ID

Example:

"1687-3"

approver_id
string | null

The approver ID

Example:

"1687-4"

status
object

The status of the time off request

type
object

The type of the time off request

start_date
string | null

The start date of the time off request

Example:

"2021-01-01T01:01:01.000Z"

end_date
string | null

The end date of the time off request

Example:

"2021-01-01T01:01:01.000Z"

start_half_day

True if the start of the time off request begins half way through the day

Example:

true

end_half_day

True if the end of the time off request ends half way through the day

Example:

true

time_off_policy_id
string | null

The time off policy id associated with this time off request

Example:

"cx280928933"

reason
object
passthrough
object | null

Value to pass through to the provider

Example:
{ "other_known_names": "John Doe" }

Response

201
application/json
Record created successfully.
statusCode
number
required
Example:

201

message
string
required
Example:

"Record created successfully."

timestamp
string
required
Example:

"2021-01-01T01:01:01.000Z"

data
object
required