For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Resources
Log inGet a demo
Get startedAPI referenceImplementation
Get startedAPI referenceImplementation
    • Overview
          • The TimeOff object
          • GET/time-off
          • POST/time-off
          • GET/time-off/{id}
          • GET/time-off/meta/post
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsTime off

/time-off

Beta
POST
/hris/v1/time-off
POST
/api/hris/v1/time-off
$curl -X POST https://api.merge.dev/api/hris/v1/time-off \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": {}
>}'
201Created
1{
2 "model": {
3 "id": "91b2b905-e866-40c8-8be2-efe53827a0aa",
4 "remote_id": "19202938",
5 "created_at": "2021-09-15T00:00:00Z",
6 "modified_at": "2021-10-16T00:00:00Z",
7 "employee": "d2f972d0-2526-434b-9409-4c3b468e08f0",
8 "approver": "9efbc633-3387-4306-aa55-e2c635e6bb4f",
9 "status": "APPROVED",
10 "employee_note": "Moving into the new apartment Kendall Roy gave me!",
11 "units": "DAYS",
12 "amount": 3,
13 "request_type": "VACATION",
14 "start_time": "2020-11-10T00:00:00Z",
15 "end_time": "2020-11-17T00:00:00Z",
16 "remote_was_deleted": true,
17 "field_mappings": {
18 "organization_defined_targets": {
19 "custom_key": "custom_value"
20 },
21 "linked_account_defined_targets": {
22 "custom_key": "custom_value"
23 }
24 },
25 "remote_data": [
26 {
27 "path": "/leave",
28 "data": null
29 }
30 ]
31 },
32 "warnings": [
33 {
34 "title": "Unrecognized Field",
35 "detail": "An unrecognized field, age, was passed in with request data.",
36 "problem_type": "UNRECOGNIZED_FIELD",
37 "source": {
38 "pointer": "/age"
39 },
40 "block_merge_link": true,
41 "raw_error": "string",
42 "error_code": 1
43 }
44 ],
45 "errors": [
46 {
47 "title": "Missing Required Field",
48 "detail": "custom_fields is a required field on model.",
49 "problem_type": "MISSING_REQUIRED_FIELD",
50 "source": {
51 "pointer": "/model/custom_fields"
52 },
53 "block_merge_link": true,
54 "raw_error": "string",
55 "error_code": 1
56 }
57 ],
58 "logs": [
59 {
60 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
61 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
62 "log_summary": {
63 "url": "www.exampleintegration.com/api/v1/exampleapi",
64 "method": "POST",
65 "status_code": 200
66 }
67 }
68 ]
69}

Creates a TimeOff object with the given values.

Field support by integration

See all supported fields

Use the /linked-accounts endpoint to pull platform support information

Was this page helpful?
Previous

/time-off

Next

/time-off/{id}

Built with

Authentication

AuthorizationBearer

Token-based authentication with required prefix “Bearer”

Headers

X-Account-TokenstringRequired
Token identifying the end user.

Query parameters

is_debug_modebooleanOptional

Whether to include debug fields (such as log file links) in the response.

run_asyncbooleanOptional

Whether or not third-party updates should be run asynchronously.

Request

This endpoint expects an object.
modelobjectRequired

Description

The TimeOff object is used to represent all employees’ Time Off entries.

Usage Example

Fetch from the LIST TimeOffs endpoint and filter by ID to show all time off requests.

Response

modelobject

Description

The TimeOff object is used to represent all employees’ Time Off entries.

Usage Example

Fetch from the LIST TimeOffs endpoint and filter by ID to show all time off requests.

warningslist of objects
errorslist of objects
logslist of objects