Skip to main content
POST
/
platform
/
api
/
leave_requests
POST Leave Request
curl --request POST \
  --url https://api.rippling.com/platform/api/leave_requests \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "role": "5ae0b2cb40cae73202bd66cc",
  "status": "PENDING",
  "startDate": "2018-08-22",
  "endDate": "2018-08-24",
  "startDateStartTime": "2018-08-22T12:00:00.235000-07:00",
  "endDateEndTime": "2018-08-24T15:00:00.235000-07:00",
  "startDateCustomHours": "8",
  "endDateCustomHours": "4",
  "reasonForLeave": "Visiting hometown for my brother’s wedding",
  "companyLeaveType": "4c397f3b3c304e478da575da",
  "leavePolicy": "5b998cf940cae798a83e87fd"
}'
[
  {
    "id": "5b998dfb40cae798a83e8874",
    "createdAt": "2018-08-12T15:06:51.681000-07:00",
    "updatedAt": "2018-08-13T15:06:51.684000-07:00",
    "role": "5ae0b2cb40cae73202bd66cc",
    "roleName": "Jane Doe",
    "requestedBy": "5ae0b2cb40cae73202bd66cc",
    "requestedByName": "Jane Doe",
    "status": "PENDING",
    "startDate": "2018-08-22",
    "endDate": "2018-08-24",
    "startDateStartTime": "2018-08-22T12:00:00.235000-07:00",
    "endDateEndTime": "2018-08-24T15:00:00.235000-07:00",
    "startDateCustomHours": 8,
    "endDateCustomHours": 4,
    "comments": null,
    "numHours": 20,
    "numMinutes": 1200,
    "leavePolicy": "5b998cf940cae798a83e87fd",
    "leaveType": "VACATION",
    "policyDisplayName": "Vacation",
    "processedAt": null,
    "processedBy": null,
    "processedByName": null,
    "reasonForLeave": "Visiting hometown for my brother’s wedding",
    "externalId": "qwerty12345",
    "roleTimezone": "America/Los_Angeles",
    "dates": [
      {
        "date": "2018-08-22",
        "numMinutes": 480
      },
      {
        "date": "2018-08-23",
        "numMinutes": 480
      },
      {
        "date": "2018-08-24",
        "numMinutes": 240
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
role
string
required

Unique identifier of the employee who is taking leave.

startDate
string
required
endDate
string
required
companyLeaveType
string
required

Unique identifier of the company leave type

leavePolicy
string
required

Unique identifier of the leave policy. Required if request is not managed by TILT

requestedBy
string
status
string

The status to create the leave request in. Only TILT managed requests can take a status other than PENDING.

startDateStartTime
string
endDateEndTime
string
startDateCustomHours
string
endDateCustomHours
string
reasonForLeave
string
managedBy
string

String identifier for third party that manages this leave request. This may be null.

externalId
string

Object id for corresponding leave obejct in third party system. This may be null.

Response

201 - application/json

OK

Leave request object.

id
string

Unique identifier of the leave request.

createdAt
string
updatedAt
string
role
string

Unique identifier of the employee who is taking leave.

roleName
string
requestedBy
string | null
requestedByName
string | null

Unique identifier of the employee who made the request (in most cases this is the same as role).

status
enum<string>
Available options:
PENDING,
APPROVED,
REJECTED,
CANCELED
startDate
string
endDate
string
startDateStartTime
string | null
endDateEndTime
string | null
startDateCustomHours
string | null
endDateCustomHours
string | null
comments
string | null
numHours
integer | null
numMinutes
integer | null
leavePolicy
string
leaveTypeUniqueId
enum<string>
Available options:
VACATION,
SICK,
JURY_DUTY
policyDisplayName
string
reasonForLeave
string | null
processedAt
string | null
processedBy
string | null

Unique identifier of the employee who approved or rejected the request. This may be null.

processedByName
string | null
roleTimezone
string | null

Timezone of the role. This will be work location timezone, or home timezone for employees without a work location.

dates
object[]
isPaid
boolean

If the leave request is paid this will be TRUE. Otherwise, this will be FALSE.

managedBy
enum<string>

This indicates the system that manages the Leave Request. PTO = managed by Rippling's Time Off app. LEAVES = managed by Rippling's Leave Management app. TILT = managed by third-party partner Tilt.

Available options:
PTO,
LEAVES,
TILT
partialDays
array