Remote Employee Time Off API
The Employee Time Off API from Remote — 3 operation(s) for employee time off.
The Employee Time Off API from Remote — 3 operation(s) for employee time off.
openapi: 3.0.0
info:
title: Remote Address Details Employee Time Off API
version: 0.1.0
servers:
- url: https://gateway.remote.com/
variables: {}
- url: https://gateway.remote-sandbox.com/
variables: {}
security:
- OAuth2: []
tags:
- name: Employee Time Off
paths:
/v1/employee/timeoff/{id}:
patch:
callbacks: {}
deprecated: false
description: 'Updates a Time Off record as Employee
## Scopes
| Category | Read only Scope | Write only Scope (read access implicit) |
|---|---|---|
| Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) |
'
operationId: patch_v1_employee_timeoff_id (2)
parameters:
- description: Timeoff ID
example: 93t3j-timeoff-id-9suej43
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateEmployeeTimeoffParams'
description: UpdateTimeoff
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffResponse'
description: Success
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: Not Found
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/UnprocessableEntityResponse'
description: Unprocessable Entity
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsResponse'
description: Unprocessable Entity
security:
- OAuth2Assertion:
- https://gateway.remote.com/employment.manage
- timeoff:write
- time_and_attendance
- all:write
summary: Update Time Off as Employee
tags:
- Employee Time Off
put:
callbacks: {}
deprecated: false
description: 'Updates a Time Off record as Employee
## Scopes
| Category | Read only Scope | Write only Scope (read access implicit) |
|---|---|---|
| Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) |
'
operationId: patch_v1_employee_timeoff_id
parameters:
- description: Timeoff ID
example: 93t3j-timeoff-id-9suej43
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateEmployeeTimeoffParams'
description: UpdateTimeoff
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffResponse'
description: Success
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: Not Found
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/UnprocessableEntityResponse'
description: Unprocessable Entity
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsResponse'
description: Unprocessable Entity
security:
- OAuth2Assertion:
- https://gateway.remote.com/employment.manage
- timeoff:write
- time_and_attendance
- all:write
summary: Update Time Off as Employee
tags:
- Employee Time Off
/v1/employee/timeoff/{id}/cancel:
post:
callbacks: {}
deprecated: false
description: 'Cancels a Time Off record as Employee
## Scopes
| Category | Read only Scope | Write only Scope (read access implicit) |
|---|---|---|
| Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) |
'
operationId: post_v1_employee_timeoff_id_cancel
parameters:
- description: Timeoff ID
example: 93t3j-timeoff-id-9suej43
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CancelTimeoffParams'
description: CancelTimeoff
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffResponse'
description: Success
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: Not Found
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/UnprocessableEntityResponse'
description: Unprocessable Entity
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsResponse'
description: Unprocessable Entity
security:
- OAuth2Assertion:
- https://gateway.remote.com/employment.manage
- timeoff:write
- time_and_attendance
- all:write
summary: Cancel Time Off as Employee
tags:
- Employee Time Off
/v1/employee/timeoff:
get:
callbacks: {}
deprecated: false
description: 'Lists the current employee''s time off records
## Scopes
| Category | Read only Scope | Write only Scope (read access implicit) |
|---|---|---|
| Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) |
'
operationId: get_v1_employee_timeoff
parameters:
- description: Starts fetching records after the given page
example: 1
in: query
name: page
required: false
schema:
default: 1
minimum: 1
type: integer
- description: Number of items per page
example: 20
in: query
name: page_size
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListTimeoffResponse'
description: Success
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: Not Found
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsResponse'
description: Unprocessable Entity
security:
- OAuth2Assertion:
- https://gateway.remote.com/employment.manage
- timeoff:read
- timeoff:write
- time_and_attendance
- all:write
- all:read
summary: List employee time offs
tags:
- Employee Time Off
post:
callbacks: {}
deprecated: false
description: 'Creates a pending Time Off record
## Scopes
| Category | Read only Scope | Write only Scope (read access implicit) |
|---|---|---|
| Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) |
'
operationId: post_v1_employee_timeoff
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEmployeeTimeoffParams'
description: Timeoff
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffResponse'
description: Created
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: Not Found
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/UnprocessableEntityResponse'
description: Unprocessable Entity
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsResponse'
description: Unprocessable Entity
security:
- OAuth2Assertion:
- https://gateway.remote.com/employment.manage
- timeoff:write
- time_and_attendance
- all:write
summary: Create a Pending Time Off
tags:
- Employee Time Off
components:
schemas:
ParameterError:
example:
code: invalid_param
message: Invalid parameter
param: employment_id
properties:
code:
description: An error code that describes the nature of the error.
type: string
message:
description: A developer friendly error message that gives details on what the error was and how it may be remedied.
type: string
param:
description: The parameter that lead to the error message.
type: string
required:
- code
- message
- param
title: ParameterError
type: object
TimeoffResponse:
description: Timeoff response
example:
data:
timeoff:
automatic: false
document:
id: 9880b711-file-id-ecf8f551bd78
inserted_at: '2021-07-15T18:18:17Z'
name: id.pdf
sub_type: personal_id
type: id
employment_id: 5e55386e-4f4f-4def-92f4-bdc19a5ce77d
end_date: '2021-12-21'
id: 0073fcb5-b669-4e4a-b963-2a47744e75a1
leave_policy:
leave_policy_variant_slug: 663e0b79-c893-45ff-a1b2-f6dcabc098b5
leave_type: sick_leave
name: Self-Care
notes: Some notes
start_date: '2021-12-20'
status: approved
timeoff_days:
- day: '2021-12-20'
hours: 8
minutes: 480
- day: '2021-12-21'
hours: 8
minutes: 480
timeoff_type: paid_time_off
timezone: Asia/Kolkata
total_minutes: 960
properties:
data:
properties:
timeoff:
$ref: '#/components/schemas/Timeoff'
required:
- timeoff
type: object
required:
- data
title: TimeoffResponse
type: object
Date:
description: UTC date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
example: '2021-07-01'
format: date
title: Date
type: string
CancelTimeoffParams:
description: Cancel timeoff params
example:
cancel_reason: Business purposes
properties:
cancel_reason:
type: string
required:
- cancel_reason
title: CancelTimeoffParams
type: object
UpdateEmployeeTimeoffParams:
description: Update timeoff params
example:
edit_reason: Some edit reason
properties:
document:
$ref: '#/components/schemas/TimeoffDocumentParams'
edit_reason:
description: The reason for the update. Required when updating the time off data but not changing the status.
type: string
end_date:
$ref: '#/components/schemas/Date'
leave_policy_variant_id:
nullable: false
type: string
notes:
type: string
start_date:
$ref: '#/components/schemas/Date'
timeoff_days:
items:
$ref: '#/components/schemas/TimeoffDaysParams'
type: array
timezone:
$ref: '#/components/schemas/Timezone'
required:
- edit_reason
title: UpdateEmployeeTimeoffParams
type: object
TimeoffDocumentParams:
description: Timeoff document params
example:
content: base64 encoded content
name: document.pdf
properties:
content:
description: The binary content of the file encoded with base64
type: string
name:
description: The file name of the document
type: string
required:
- content
- name
title: TimeoffDocumentParams
type: object
TimeoffType:
enum:
- time_off
- sick_leave
- public_holiday
- unpaid_leave
- extended_leave
- in_lieu_time
- maternity_leave
- paternity_leave
- parental_leave
- bereavement
- military_leave
- other
- paid_time_off
- custom_company_leave
- rtt
- casual_leave
- rol
- ex_festivita
example: sick_leave
title: TimeoffType
type: string
Timezone:
description: '[TZ identifier](https://www.iana.org/time-zones)'
example: Etc/UTC
title: Timezone
type: string
UnauthorizedResponse:
description: Returned when the request does not include valid authentication credentials. Ensure you are passing a valid OAuth2 access token or API token in the Authorization header.
example:
message: Unauthorized
properties:
message:
pattern: Unauthorized
type: string
required:
- message
title: UnauthorizedResponse
type: object
UnprocessableEntityResponse:
anyOf:
- properties:
errors:
type: object
required:
- errors
type: object
- properties:
message:
oneOf:
- type: string
- $ref: '#/components/schemas/ParameterError'
- items:
$ref: '#/components/schemas/ParameterError'
title: ParameterErrors
type: array
- $ref: '#/components/schemas/ActionError'
- items:
$ref: '#/components/schemas/ActionError'
title: ActionErrors
type: array
required:
- message
type: object
example:
errors:
some_field:
- is invalid
title: UnprocessableEntityResponse
type: object
TimeoffDaysParams:
description: Timeoff days params
example:
day: '2021-12-20'
hours: 8
properties:
day:
$ref: '#/components/schemas/Date'
hours:
type: integer
title: TimeoffDaysParams
type: object
BadRequestResponse:
description: Returned when the request is malformed or contains invalid parameters. The message may be a simple string or a structured object with a code and detailed message.
example:
message: invalid {resource}
oneOf:
- properties:
message:
description: A human-readable error message describing what was wrong with the request.
type: string
required:
- message
type: object
- properties:
message:
properties:
code:
type: string
message:
type: string
required:
- code
- message
type: object
type: object
title: BadRequestResponse
type: object
LeavePolicy:
additionalProperties: false
description: The leave policy associated with a time off request. Policies define the rules and entitlements for specific types of leave.
example:
leave_policy_variant_slug: 663e0b79-c893-45ff-a1b2-f6dcabc098b5
leave_type: sick_leave
name: Self-Care
properties:
leave_policy_variant_slug:
description: The unique identifier (slug) of the specific policy variant.
type: string
leave_type:
$ref: '#/components/schemas/TimeoffType'
name:
description: The display name of the leave policy (e.g., "Self-Care", "Annual Leave").
nullable: false
type: string
required:
- name
- leave_type
- leave_policy_variant_slug
title: LeavePolicy
type: object
ActionError:
properties:
action:
description: The action that lead to the error message.
type: string
code:
description: An error code that describes the nature of the error.
type: string
message:
description: A developer friendly error message that gives details on what the error was and how it may be remedied.
type: string
required:
- code
- message
- action
title: ActionError
type: object
NotFoundResponse:
description: Returned when the requested resource does not exist or is not accessible with the current authentication credentials.
example:
message: '{resource} not found'
properties:
message:
description: A message indicating which resource was not found.
pattern: Not Found
type: string
title: NotFoundResponse
type: object
File:
additionalProperties: false
description: A file associated with an employment, such as a contract, tax form, or identity document.
example:
id: 9880b711-file-id-ecf8f551bd78
inserted_at: '2021-07-15T18:18:17Z'
name: id.pdf
sub_type: personal_id
type: id
properties:
id:
description: The unique identifier (UUID) of the file.
type: string
inserted_at:
$ref: '#/components/schemas/DateTimeIso8601'
name:
description: The file name including extension (e.g., "id.pdf", "contract.pdf").
type: string
sub_type:
description: A more specific classification of the file within its type (e.g., "personal_id" within type "id", or "ir_35" within type "contract"). Null if no sub-type applies.
nullable: true
type: string
type:
description: The broad category of the file (e.g., "id", "contract", "tax_form").
type: string
required:
- id
- inserted_at
- name
- type
title: File
type: object
ListTimeoffResponse:
description: Response schema listing many timeoffs
example:
current_page: 1
timeoffs:
- automatic: false
document:
id: 9880b711-file-id-ecf8f551bd78
inserted_at: '2021-07-15T18:18:17Z'
name: id.pdf
sub_type: personal_id
type: id
employment_id: 5e55386e-4f4f-4def-92f4-bdc19a5ce77d
end_date: '2021-12-21'
id: 0073fcb5-b669-4e4a-b963-2a47744e75a1
leave_policy:
leave_policy_variant_slug: 663e0b79-c893-45ff-a1b2-f6dcabc098b5
leave_type: sick_leave
name: Self-Care
notes: Some notes
start_date: '2021-12-20'
status: approved
timeoff_days:
- day: '2021-12-20'
hours: 8
minutes: 480
- day: '2021-12-21'
hours: 8
minutes: 480
timeoff_type: paid_time_off
timezone: Asia/Kolkata
total_minutes: 960
total_count: 1
total_pages: 1
properties:
data:
properties:
current_page:
description: The current page among all of the total_pages
type: integer
timeoffs:
items:
$ref: '#/components/schemas/Timeoff'
type: array
total_count:
description: The total number of records in the result
type: integer
total_pages:
description: The total number of pages the user can go through
type: integer
type: object
title: ListTimeoffResponse
type: object
NullableApproverId:
description: 'The field matches the `id` of a user in the
Remote Platform that has permission to approve time off
requests. [Available users][] can be found fetching
the [List Company Manager][] endpoint.
[Available users]: https://support.remote.com/hc/en-us/articles/360054668651-Approving-Declining-time-off-requests#h_01G0014GZKZ3EMN6P7C99HAK55
[List Company Manager]: https://gateway.remote.com/v1/docs/openapi.html#tag/Company-Managers
'
example: 51546f60-dd71-4223-9312-4efede68a497
nullable: true
title: NullableApproverId
type: string
CreateEmployeeTimeoffParams:
description: Employee timeoff creation params
example:
end_date: '2021-12-21'
leave_policy_variant_id: paid_time_off
start_date: '2021-12-20'
timeoff_days:
- day: '2021-12-20'
hours: 8
- day: '2021-12-21'
hours: 8
timezone: Asia/Kolkata
properties:
document:
$ref: '#/components/schemas/TimeoffDocumentParams'
end_date:
$ref: '#/components/schemas/Date'
leave_policy_variant_id:
nullable: false
type: string
notes:
type: string
start_date:
$ref: '#/components/schemas/Date'
timeoff_days:
items:
$ref: '#/components/schemas/TimeoffDaysParams'
type: array
timezone:
$ref: '#/components/schemas/Timezone'
required:
- start_date
- end_date
- leave_policy_variant_id
- timezone
- timeoff_days
title: CreateEmployeeTimeoffParams
type: object
TimeoffDay:
description: A single day within a time off request, specifying the date and the number of hours taken off that day.
example:
day: '2021-01-01'
hours: 8
minutes: 480
properties:
day:
$ref: '#/components/schemas/Date'
hours:
description: The number of hours taken off on this day (e.g., 8 for a full day, 4 for a half day). For minute-precision durations (e.g., 7 hours 30 minutes), use `minutes`.
type: integer
minutes:
description: The number of minutes taken off on this day (e.g., 480 for a full 8-hour day, 450 for 7 hours 30 minutes). Minute-precision counterpart of `hours`.
maximum: 1440
minimum: 0
type: integer
required:
- day
- hours
- minutes
title: TimeoffDay
type: object
DateTimeIso8601:
description: 'UTC date time in [ISO 8601][] format.
[ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601
'
example: '2021-07-15T18:18:17Z'
format: date-time
title: DateTimeIso8601
type: string
Timeoff:
additionalProperties: false
description: A time off record for an employee, representing a period of leave (e.g., vacation, sick leave, parental leave).
example:
automatic: false
document:
id: 9880b711-file-id-ecf8f551bd78
inserted_at: '2021-07-15T18:18:17Z'
name: id.pdf
sub_type: personal_id
type: id
employment_id: 5e55386e-4f4f-4def-92f4-bdc19a5ce77d
end_date: '2021-12-21'
id: 0073fcb5-b669-4e4a-b963-2a47744e75a1
leave_policy:
leave_policy_variant_slug: 663e0b79-c893-45ff-a1b2-f6dcabc098b5
leave_type: sick_leave
name: Self-Care
notes: Some notes
start_date: '2021-12-20'
status: approved
timeoff_days:
- day: '2021-12-20'
hours: 8
minutes: 480
- day: '2021-12-21'
hours: 8
minutes: 480
timeoff_type: paid_time_off
timezone: Asia/Kolkata
total_minutes: 960
properties:
approved_at:
description: The timestamp when the time off was approved. Null if not yet approved.
format: date-time
nullable: true
type: string
approver_id:
$ref: '#/components/schemas/NullableApproverId'
automatic:
description: Whether this time off was automatically created by the system (e.g., public holidays) rather than requested by the employee.
type: boolean
cancel_reason:
description: The reason provided when the time off was cancelled. Null if not cancelled.
nullable: true
type: string
cancelled_at:
$ref: '#/components/schemas/NullableDateTime'
document:
$ref: '#/components/schemas/File'
employment_id:
description: The unique identifier (UUID) of the employment this time off belongs to.
type: string
end_date:
description: The last day of the time off period (ISO 8601 date).
format: date
type: string
id:
description: The unique identifier (UUID) of the time off record.
type: string
leave_policy:
$ref: '#/components/schemas/LeavePolicy'
leave_policy_variant_id:
description: UUID of the custom company leave policy variant associated with this time off. Null for standard leave types.
format: uuid
nullable: true
type: string
notes:
description: Optional notes provided by the employee when requesting the time off.
nullable: true
type: string
start_date:
description: The first day of the time off period (ISO 8601 date).
format: date
type: string
status:
description: 'The current status of a time off request.
- `requested`: The employee has submitted a time off request and it is awaiting approval.
- `approved`: The time off request has been approved by a manager.
- `cancelled`: The time off request was cancelled by the employee or an admin.
- `declined`: The time off request was declined by a manager.
- `taken`: The approved time off has been taken (the dates have passed).
- `cancel_requested`: The employee has requested cancellation of a previously approved time off, pending manager approval.
'
enum:
- requested
- approved
- cancelled
- declined
- taken
- cancel_requested
type: string
timeoff_days:
description: The individual days and hours within this time off period.
items:
$ref: '#/components/schemas/TimeoffDay'
type: array
timeoff_type:
$ref: '#/components/schemas/TimeoffType'
timezone:
$ref: '#/components/schemas/Timezone'
total_minutes:
description: The total number of minutes taken off across all `timeoff_days`. Always equals the sum of the per-day `minutes` values.
minimum: 0
type: integer
required:
- id
- employment_id
- status
- start_date
- end_date
- timeoff_days
- total_minutes
- timeoff_type
- leave_policy
- timezone
title: Timeoff
type: object
NullableDateTime:
description: Optional UTC date time in YYYY-MM-DDTHH:mm:ss format
example: '2021-07-15T18:18:17'
format: datetime
nullable: true
title: NullableDateTime
type: string
TooManyRequestsResponse:
description: Returned when the API rate limit has been exceeded (HTTP 429). Wait before retrying. Check the `Retry-After` response header for the recommended wait time.
example:
message: Too many requests
properties:
message:
pattern: Too many requests
type: string
title: TooManyRequestsResponse
type: object
securitySchemes:
BasicAuth:
description: 'Authenticate using the basic authentication for partners.
Use the CLIENT_ID as login and CLIENT_SECRET as password.
'
scheme: basic
type: http
ClientToken:
description: 'Authenticate a partner using only the the provided `client_token`.
This authentication method only allows accessing marketing endpoints.
'
scheme: bearer
type: http
CustomerAPIToken:
description: 'Authenticate using API Key generated by the customer in their Integration Settings page.
'
scheme: bearer
type: http
OAuth2:
description: 'Authenticate using OAuth 2.0 protocol.
'
flows:
authorizationCode:
authorizationUrl: /auth/oauth2/authorize
scopes:
company_department:read: company_department:read
webhook:write: webhook:write
magic_link:write: magic_link:write
offboarding:write: offboarding:write
custom_field:write: custom_field:write
address:write: address:write
expense:read: expense:read
employment:write: employment:write
identity_verification:write: identity_verification:write
timesheet:write: timesheet:write
travel_letter:write: travel_letter:write
incentive:read: incentive:read
personal_detail:read: personal_detail:read
invoices:write: invoices:write
work_authorization:write: work_authorization:write
timeoff:write: timeoff:write
company_structure:read: company_structure:read
benefit_renewal:write: benefit_renewal:write
benefit_offer:read: benefit_offer:read
employment_documents: employment_documents
onboarding:write: onboarding:write
payroll_run:read: payroll_run:read
risk_reserve:write: risk_reserve:write
invoices: invoices
resignation_letter:read: resignation_letter:read
resignation:read: resignation:read
convert_currency:read: convert_currency:read
employments: employments
probation_document:read: pr
# --- truncated at 32 KB (41 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/remote/refs/heads/main/openapi/remote-employee-time-off-api-openapi.yml