Needs the Leave field group’s Write switch. Requests leave in the employee’s name, through the portal’s own leave request: the balance and per-request caps are checked, days are counted on the person’s work pattern and public holidays, and the tenant’s leave approval chain decides. 202 awaiting_approval, or 201 approved when the chain has no steps. A refusal is 422 validation-failed with a code in errors: insufficient-balance, over-cap, overlap, not-offered, after-contract-end, no-working-days, invalid-dates, unknown-leave-type, no-balance-policy. Sick leave is refused (sick-leave-in-portal): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. ?validate_only=true answers what it would be and writes nothing. Fires leave_request.submitted.
Authorization: Bearer atk_live_… (a sandbox's keys are atk_test_…). Created in the API keys section of the Integrations settings; the secret is shown once.
Optional: the andteam user id or work email of the person this is requested by (the hiring manager in your ATS, say), instead of the key's requester. They are checked for the same permission over this employee; if the check fails the request is refused (requester-not-allowed), never put back on the key's requester.
Required string length: 1 - 320
Response
?validate_only=true: what the request would be. Nothing was written.
The approval chain, and who the current step resolves to.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"andteam","description":"The andteam API: your people, organisation, leave, pay and records, the changes other systems ask for, and signed webhooks.","colors":{"primary":"#00827B","light":"#30B3AB","dark":"#00827B"},"logo":{"light":"https://mintcdn.com/andteam/MVfTtzphnPhhxPa9/logo/andteam.svg?fit=max\u0026auto=format\u0026n=MVfTtzphnPhhxPa9\u0026q=85\u0026s=b11d93ffad90324a82a8c0d5d1a0c404","dark":"https://mintcdn.com/andteam/MVfTtzphnPhhxPa9/logo/andteam-dark.svg?fit=max\u0026auto=format\u0026n=MVfTtzphnPhhxPa9\u0026q=85\u0026s=b68c0b25cc90ff91d060372147b91013","href":"https://andteam.com"},"favicon":"https://mintcdn.com/andteam/MVfTtzphnPhhxPa9/logo/favicon.svg?fit=max\u0026auto=format\u0026n=MVfTtzphnPhhxPa9\u0026q=85\u0026s=5e85048315185eccf77ec4a1103b6ffc","api":{"openapi":"openapi.json","playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go"],"prefill":true}},"background":{"color":{"light":"#F7F7F8","dark":"#0F1419"}},"navbar":{"primary":{"type":"button","label":"Get an API key","href":"https://andteam.com"}},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"andteam","hasAudioNarration":false,"actualSubdomain":"andteam","customDomains":["docs.andteam.com"],"gitSource":{"type":"github","owner":"hellocrowd","repo":"-team-v3","deployBranch":"main","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":"","_id":"6af16e2a7af691b16ede1e0e"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af46cafec28eb92a90ad5d3","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Guides","count":59},{"language":"default","tag":"API reference","count":50},{"language":"default","tag":"Problem types","count":31},{"language":"default","tag":"Webhooks","count":16},{"language":"default","tag":"Get started","count":7},{"language":"default","tag":"Leave","count":6},{"language":"default","tag":"Concepts","count":5},{"language":"default","tag":"Job history","count":5},{"language":"default","tag":"Pay","count":5},{"language":"default","tag":"Directory","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/leave/request-leave-for-an-employee","slug":"/api-reference/leave/request-leave-for-an-employee","pageMetadata":{"title":"Request leave for an employee","description":"Needs the Leave field group's Write switch. Requests leave in the employee's name, through the portal's own leave request: the balance and per-request caps are checked, days are counted on the person's work pattern and public holidays, and the tenant's leave approval chain decides. 202 `awaiting_approval`, or 201 `approved` when the chain has no steps. A refusal is 422 `validation-failed` with a code in `errors`: `insufficient-balance`, `over-cap`, `overlap`, `not-offered`, `after-contract-end`, `no-working-days`, `invalid-dates`, `unknown-leave-type`, `no-balance-policy`. Sick leave is refused (`sick-leave-in-portal`): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. `?validate_only=true` answers what it would be and writes nothing. Fires `leave_request.submitted`.","deprecated":null,"version":null,"openapi":"/openapi.json post /employees/{id}/leave-requests","href":"/api-reference/leave/request-leave-for-an-employee","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Needs the Leave field group’s Write switch. Requests leave in the employee’s name, through the portal’s own leave request: the balance and per-request caps are checked, days are counted on the person’s work pattern and public holidays, and the tenant’s leave approval chain decides. 202 \", _jsx(_components.code, {\n children: \"awaiting_approval\"\n }), \", or 201 \", _jsx(_components.code, {\n children: \"approved\"\n }), \" when the chain has no steps. A refusal is 422 \", _jsx(_components.code, {\n children: \"validation-failed\"\n }), \" with a code in \", _jsx(_components.code, {\n children: \"errors\"\n }), \": \", _jsx(_components.code, {\n children: \"insufficient-balance\"\n }), \", \", _jsx(_components.code, {\n children: \"over-cap\"\n }), \", \", _jsx(_components.code, {\n children: \"overlap\"\n }), \", \", _jsx(_components.code, {\n children: \"not-offered\"\n }), \", \", _jsx(_components.code, {\n children: \"after-contract-end\"\n }), \", \", _jsx(_components.code, {\n children: \"no-working-days\"\n }), \", \", _jsx(_components.code, {\n children: \"invalid-dates\"\n }), \", \", _jsx(_components.code, {\n children: \"unknown-leave-type\"\n }), \", \", _jsx(_components.code, {\n children: \"no-balance-policy\"\n }), \". Sick leave is refused (\", _jsx(_components.code, {\n children: \"sick-leave-in-portal\"\n }), \"): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. \", _jsx(_components.code, {\n children: \"?validate_only=true\"\n }), \" answers what it would be and writes nothing. Fires \", _jsx(_components.code, {\n children: \"leave_request.submitted\"\n }), \".\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Request leave for an employee","description":"Needs the Leave field group's Write switch. Requests leave in the employee's name, through the portal's own leave request: the balance and per-request caps are checked, days are counted on the person's work pattern and public holidays, and the tenant's leave approval chain decides. 202 `awaiting_approval`, or 201 `approved` when the chain has no steps. A refusal is 422 `validation-failed` with a code in `errors`: `insufficient-balance`, `over-cap`, `overlap`, `not-offered`, `after-contract-end`, `no-working-days`, `invalid-dates`, `unknown-leave-type`, `no-balance-policy`. Sick leave is refused (`sick-leave-in-portal`): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. `?validate_only=true` answers what it would be and writes nothing. Fires `leave_request.submitted`.","deprecated":null,"version":null,"openapi":"/openapi.json post /employees/{id}/leave-requests","href":"/api-reference/leave/request-leave-for-an-employee","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"postEmployeesIdLeaveRequests","summary":"Request leave for an employee","tags":["Leave"],"description":"Needs the Leave field group's Write switch. Requests leave in the employee's name, through the portal's own leave request: the balance and per-request caps are checked, days are counted on the person's work pattern and public holidays, and the tenant's leave approval chain decides. 202 `awaiting_approval`, or 201 `approved` when the chain has no steps. A refusal is 422 `validation-failed` with a code in `errors`: `insufficient-balance`, `over-cap`, `overlap`, `not-offered`, `after-contract-end`, `no-working-days`, `invalid-dates`, `unknown-leave-type`, `no-balance-policy`. Sick leave is refused (`sick-leave-in-portal`): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. `?validate_only=true` answers what it would be and writes nothing. Fires `leave_request.submitted`.","parameters":["7b23b393-177f-41c3-809d-02b3b3b744b6","dd79d903-cefc-4a30-a71c-0c7ef111cea1","fe9b7df8-9df9-4905-8f69-77045688bb9d","0d826deb-9066-4d01-9a68-3716138dc6b9"],"requestBody":"dd43dd44-b1b7-48a3-9278-c7b0de2ef843","responses":{"200":"e0af5766-976f-4cb5-8450-d632c2063c6a","201":"c58e9741-0177-4285-affd-05c4bfec4ca0","202":"54fada85-f674-49d9-8492-fa3ae48d45ed","401":"a72bb02a-21df-463d-a9f5-1fcc9a53bb51","403":"140d906c-6b38-48cb-ae8b-09ac1fcf332c","404":"faddb99b-7fbe-4dcf-a077-12e7be962e4a","409":"d84208a0-8506-40a6-9a6c-aae4db2b0467","415":"61e2c0b0-d50e-408f-bbbd-4d1f6daa7740","422":"fc9fccbe-afe9-4c55-a2be-0dd8497c944f","429":"c964c15f-4c53-481f-ab59-13468226578d","500":"a9f37ab9-c9f3-4ec9-b802-5517797ff6d6"},"method":"post","type":"path","servers":["53173e53-73ef-4ae2-87b8-83a71010e39d"],"security":["8176f727-c71c-46ea-9693-90364dc198f4","0c7e1611-cf8c-415a-bf94-31afa5ec5942"],"path":"/employees/{id}/leave-requests","baseUrlOptions":["https://api.v3.andteam.com/v1"],"title":"Request leave for an employee","codeSamples":[],"requestExampleLanguages":["bash","python","javascript","go"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.leaveTypeId":"\u003cstring>","body.startDate":"2023-12-25","body.endDate":"2023-12-25","body.note":"\u003cstring>","body.requestedBy":"\u003cstring>"}]},"dependencies":{"parameters":{"7b23b393-177f-41c3-809d-02b3b3b744b6":{"name":"id","in":"path","required":true,"description":"The employee id.","schema":{"type":"string","isRequired":true,"description":"The employee id.","uniqueKey":"","typeLabel":"string"}},"dd79d903-cefc-4a30-a71c-0c7ef111cea1":{"name":"company_id","in":"query","description":"One of the key's companies.","schema":{"type":"string","description":"One of the key's companies.","uniqueKey":"","typeLabel":"string"}},"fe9b7df8-9df9-4905-8f69-77045688bb9d":{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique per request; reuse it only to retry the same request with the same body. Remembered 24 hours.","schema":{"type":"string","maxLength":255,"isRequired":true,"description":"Unique per request; reuse it only to retry the same request with the same body. Remembered 24 hours.","uniqueKey":"","typeLabel":"string"}},"0d826deb-9066-4d01-9a68-3716138dc6b9":{"name":"validate_only","in":"query","description":"`true`: answer 200 with what would happen (the approval steps and who they resolve to, the knock-ons), and write nothing.","schema":{"type":"boolean","description":"`true`: answer 200 with what would happen (the approval steps and who they resolve to, the knock-ons), and write nothing.","uniqueKey":"","typeLabel":"boolean"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaveTypeId":{"type":"string","minLength":1,"maxLength":100,"description":"One of `GET /v1/leave-types`. A sick type is refused (`sick-leave-in-portal`).","isRequired":true,"uniqueKey":"leaveTypeId","typeLabel":"string"},"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"The first day, inclusive.","isRequired":true,"uniqueKey":"startDate","typeLabel":"string\u003cdate>"},"endDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"The last day, inclusive. Equal to `startDate` for a single day.","isRequired":true,"uniqueKey":"endDate","typeLabel":"string\u003cdate>"},"partOfDay":{"description":"A half day: only with a single date, and only for a type counted in days.","type":"string","enum":["am","pm"],"uniqueKey":"partOfDay","typeLabel":"enum\u003cstring>"},"note":{"description":"Shown to the approver. Never returned by the API.","type":"string","minLength":1,"maxLength":1000,"uniqueKey":"note","typeLabel":"string"},"requestedBy":{"type":"string","minLength":1,"maxLength":320,"description":"Optional: the andteam user id or work email of the person this is requested by (the hiring manager in your ATS, say), instead of the key's requester. They are checked for the same permission over this employee; if the check fails the request is refused (requester-not-allowed), never put back on the key's requester.","uniqueKey":"requestedBy","typeLabel":"string"}},"required":["leaveTypeId","startDate","endDate"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"leaveTypeId":"\u003cstring>","startDate":"2023-12-25","endDate":"2023-12-25","note":"\u003cstring>","requestedBy":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"e0af5766-976f-4cb5-8450-d632c2063c6a":{"description":"`?validate_only=true`: what the request would be. Nothing was written.","headers":{"RateLimit-Limit":{"description":"Requests a minute allowed for the key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the tightest window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until that window resets.","schema":{"type":"integer"}},"Deprecation":{"description":"Present once this version is deprecated (RFC 9745).","schema":{"type":"string"}},"Sunset":{"description":"Present once this version has a shutdown date (RFC 8594).","schema":{"type":"string"}},"Idempotent-Replayed":{"description":"`true` when this is the stored answer to an earlier request with the same `Idempotency-Key`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"wouldBe":{"type":"string","enum":["awaiting_approval","approved"],"description":"`approved` when the leave approval chain has no steps.","isRequired":true,"uniqueKey":"wouldBe","typeLabel":"enum\u003cstring>"},"amount":{"type":"number","description":"What the request would use, in `unit`: working days, or hours for a type counted in hours.","isRequired":true,"uniqueKey":"amount","typeLabel":"number"},"unit":{"type":"string","enum":["days","hours"],"isRequired":true,"uniqueKey":"unit","typeLabel":"enum\u003cstring>"},"balanceAfter":{"oneOf":[{"description":"The balance left after this request, in `unit`. Only when andteam keeps the balance and the type has one; otherwise null.","type":"number","isRequired":true,"uniqueKey":"balanceAfter.oneOf.0","typeLabel":"number"},{"description":"The balance left after this request, in `unit`. Only when andteam keeps the balance and the type has one; otherwise null.","type":"null","isRequired":true,"uniqueKey":"balanceAfter.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"balanceAfter","typeLabel":"number | null"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"steps.items.[INDEX].id","typeLabel":"string"},"label":{"type":"string","isRequired":true,"uniqueKey":"steps.items.[INDEX].label","typeLabel":"string"},"approvers":{"type":"array","items":{"type":"string","uniqueKey":"steps.items.[INDEX].approvers.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"steps.items.[INDEX].approvers","typeLabel":"string[]"},"status":{"type":"string","enum":["waiting","current","approved","declined"],"isRequired":true,"uniqueKey":"steps.items.[INDEX].status","typeLabel":"enum\u003cstring>"}},"required":["id","label","approvers","status"],"additionalProperties":false,"uniqueKey":"steps.items.[INDEX]","typeLabel":"object"},"description":"The approval chain, and who the current step resolves to.","isRequired":true,"uniqueKey":"steps","typeLabel":"object[]"}},"required":["wouldBe","amount","unit","balanceAfter","steps"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"wouldBe":"awaiting_approval","amount":123,"unit":"days","balanceAfter":123,"steps":[{"id":"\u003cstring>","label":"\u003cstring>","approvers":["\u003cstring>"],"status":"waiting"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"c58e9741-0177-4285-affd-05c4bfec4ca0":{"description":"Made and approved at once: the leave approval chain has no steps.","headers":{"RateLimit-Limit":{"description":"Requests a minute allowed for the key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the tightest window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until that window resets.","schema":{"type":"integer"}},"Deprecation":{"description":"Present once this version is deprecated (RFC 9745).","schema":{"type":"string"}},"Sunset":{"description":"Present once this version has a shutdown date (RFC 8594).","schema":{"type":"string"}},"Idempotent-Replayed":{"description":"`true` when this is the stored answer to an earlier request with the same `Idempotency-Key`.","schema":{"type":"string"}},"Location":{"description":"The created resource.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"employeeId":{"type":"string","isRequired":true,"uniqueKey":"employeeId","typeLabel":"string"},"companyId":{"type":"string","isRequired":true,"uniqueKey":"companyId","typeLabel":"string"},"leaveTypeId":{"type":"string","isRequired":true,"uniqueKey":"leaveTypeId","typeLabel":"string"},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"startDate","typeLabel":"string"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"endDate","typeLabel":"string"},"partOfDay":{"oneOf":[{"type":"string","description":"A half day: `am` or `pm`. Null for whole days.","enum":["am","pm"],"isRequired":true,"uniqueKey":"partOfDay.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"A half day: `am` or `pm`. Null for whole days.","isRequired":true,"uniqueKey":"partOfDay.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"partOfDay","typeLabel":"enum\u003cstring> | null"},"amount":{"type":"number","description":"Working days, or hours for an hours type, as counted when the request was made.","isRequired":true,"uniqueKey":"amount","typeLabel":"number"},"unit":{"type":"string","enum":["days","hours"],"isRequired":true,"uniqueKey":"unit","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["awaiting_approval","approved","declined","withdrawn"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"decidedAt":{"oneOf":[{"type":"string","description":"The last approval or decline time, else the approval time. Null while the request awaits approval, or when nobody decided it. A request withdrawn after approval keeps its approval time.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","isRequired":true,"uniqueKey":"decidedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"The last approval or decline time, else the approval time. Null while the request awaits approval, or when nobody decided it. A request withdrawn after approval keeps its approval time.","isRequired":true,"uniqueKey":"decidedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"decidedAt","typeLabel":"string\u003cdate-time> | null"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string\u003cdate-time>"}},"required":["id","employeeId","companyId","leaveTypeId","startDate","endDate","partOfDay","amount","unit","status","decidedAt","updatedAt"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","employeeId":"\u003cstring>","companyId":"\u003cstring>","leaveTypeId":"\u003cstring>","startDate":"\u003cstring>","endDate":"\u003cstring>","partOfDay":"am","amount":123,"unit":"days","status":"awaiting_approval","decidedAt":"2023-11-07T05:31:56Z","updatedAt":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"54fada85-f674-49d9-8492-fa3ae48d45ed":{"description":"Made, and waiting for approval.","headers":{"RateLimit-Limit":{"description":"Requests a minute allowed for the key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the tightest window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until that window resets.","schema":{"type":"integer"}},"Deprecation":{"description":"Present once this version is deprecated (RFC 9745).","schema":{"type":"string"}},"Sunset":{"description":"Present once this version has a shutdown date (RFC 8594).","schema":{"type":"string"}},"Idempotent-Replayed":{"description":"`true` when this is the stored answer to an earlier request with the same `Idempotency-Key`.","schema":{"type":"string"}},"Location":{"description":"The created resource.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"employeeId":{"type":"string","isRequired":true,"uniqueKey":"employeeId","typeLabel":"string"},"companyId":{"type":"string","isRequired":true,"uniqueKey":"companyId","typeLabel":"string"},"leaveTypeId":{"type":"string","isRequired":true,"uniqueKey":"leaveTypeId","typeLabel":"string"},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"startDate","typeLabel":"string"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"endDate","typeLabel":"string"},"partOfDay":{"oneOf":[{"type":"string","description":"A half day: `am` or `pm`. Null for whole days.","enum":["am","pm"],"isRequired":true,"uniqueKey":"partOfDay.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"A half day: `am` or `pm`. Null for whole days.","isRequired":true,"uniqueKey":"partOfDay.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"partOfDay","typeLabel":"enum\u003cstring> | null"},"amount":{"type":"number","description":"Working days, or hours for an hours type, as counted when the request was made.","isRequired":true,"uniqueKey":"amount","typeLabel":"number"},"unit":{"type":"string","enum":["days","hours"],"isRequired":true,"uniqueKey":"unit","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["awaiting_approval","approved","declined","withdrawn"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"decidedAt":{"oneOf":[{"type":"string","description":"The last approval or decline time, else the approval time. Null while the request awaits approval, or when nobody decided it. A request withdrawn after approval keeps its approval time.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","isRequired":true,"uniqueKey":"decidedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"The last approval or decline time, else the approval time. Null while the request awaits approval, or when nobody decided it. A request withdrawn after approval keeps its approval time.","isRequired":true,"uniqueKey":"decidedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"decidedAt","typeLabel":"string\u003cdate-time> | null"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string\u003cdate-time>"}},"required":["id","employeeId","companyId","leaveTypeId","startDate","endDate","partOfDay","amount","unit","status","decidedAt","updatedAt"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","employeeId":"\u003cstring>","companyId":"\u003cstring>","leaveTypeId":"\u003cstring>","startDate":"\u003cstring>","endDate":"\u003cstring>","partOfDay":"am","amount":123,"unit":"days","status":"awaiting_approval","decidedAt":"2023-11-07T05:31:56Z","updatedAt":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"a72bb02a-21df-463d-a9f5-1fcc9a53bb51":{"description":"No valid key. Problem types: `missing-key`, `invalid-key`, `revoked-key`, `expired-key`, `rolled-key-expired`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"andteam\"","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A stable URL for the kind of problem: https://docs.andteam.com/api/problems/{slug}.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"errors":{"description":"validation-failed: every field that is wrong, at once.","type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer (RFC 6901) to the field in the request body, such as /candidate/personalEmail.","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"code":{"type":"string","description":"A stable code for the error, such as required, invalid, insufficient-balance.","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"required":["pointer","code","detail"],"additionalProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"fields":{"description":"field-locked: every field in the request the HRIS owns for this person.","type":"array","items":{"type":"string","uniqueKey":"fields.items.[INDEX]","typeLabel":"string"},"uniqueKey":"fields","typeLabel":"string[]"},"existingId":{"description":"pending-change-exists, duplicate-hire, possible-rehire: the id of the existing record.","type":"string","uniqueKey":"existingId","typeLabel":"string"},"step":{"description":"approval-chain-unresolvable: the step that resolves to nobody.","type":"string","uniqueKey":"step","typeLabel":"string"}},"required":["type","title","status"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":0,"detail":"\u003cstring>","instance":"\u003cstring>","errors":[{"pointer":"\u003cstring>","code":"\u003cstring>","detail":"\u003cstring>"}],"fields":["\u003cstring>"],"existingId":"\u003cstring>","step":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"140d906c-6b38-48cb-ae8b-09ac1fcf332c":{"description":"Not allowed. Problem types: `pending-approval`, `ip-not-allowed`, `field-group-required`, `company-not-allowed`, `write-not-allowed`, `requester-not-allowed`, `test-key-not-allowed`.","headers":{},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A stable URL for the kind of problem: https://docs.andteam.com/api/problems/{slug}.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"errors":{"description":"validation-failed: every field that is wrong, at once.","type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer (RFC 6901) to the field in the request body, such as /candidate/personalEmail.","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"code":{"type":"string","description":"A stable code for the error, such as required, invalid, insufficient-balance.","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"required":["pointer","code","detail"],"additionalProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"fields":{"description":"field-locked: every field in the request the HRIS owns for this person.","type":"array","items":{"type":"string","uniqueKey":"fields.items.[INDEX]","typeLabel":"string"},"uniqueKey":"fields","typeLabel":"string[]"},"existingId":{"description":"pending-change-exists, duplicate-hire, possible-rehire: the id of the existing record.","type":"string","uniqueKey":"existingId","typeLabel":"string"},"step":{"description":"approval-chain-unresolvable: the step that resolves to nobody.","type":"string","uniqueKey":"step","typeLabel":"string"}},"required":["type","title","status"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":0,"detail":"\u003cstring>","instance":"\u003cstring>","errors":[{"pointer":"\u003cstring>","code":"\u003cstring>","detail":"\u003cstring>"}],"fields":["\u003cstring>"],"existingId":"\u003cstring>","step":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"faddb99b-7fbe-4dcf-a077-12e7be962e4a":{"description":"Not found. Problem types: `not-found`.","headers":{},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A stable URL for the kind of problem: https://docs.andteam.com/api/problems/{slug}.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"errors":{"description":"validation-failed: every field that is wrong, at once.","type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer (RFC 6901) to the field in the request body, such as /candidate/personalEmail.","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"code":{"type":"string","description":"A stable code for the error, such as required, invalid, insufficient-balance.","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"required":["pointer","code","detail"],"additionalProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"fields":{"description":"field-locked: every field in the request the HRIS owns for this person.","type":"array","items":{"type":"string","uniqueKey":"fields.items.[INDEX]","typeLabel":"string"},"uniqueKey":"fields","typeLabel":"string[]"},"existingId":{"description":"pending-change-exists, duplicate-hire, possible-rehire: the id of the existing record.","type":"string","uniqueKey":"existingId","typeLabel":"string"},"step":{"description":"approval-chain-unresolvable: the step that resolves to nobody.","type":"string","uniqueKey":"step","typeLabel":"string"}},"required":["type","title","status"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":0,"detail":"\u003cstring>","instance":"\u003cstring>","errors":[{"pointer":"\u003cstring>","code":"\u003cstring>","detail":"\u003cstring>"}],"fields":["\u003cstring>"],"existingId":"\u003cstring>","step":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"d84208a0-8506-40a6-9a6c-aae4db2b0467":{"description":"Conflict. Problem types: `ambiguous-id`, `field-locked`, `approval-chain-unresolvable`, `pending-change-exists`, `duplicate-hire`, `possible-rehire`, `idempotency-in-progress`, `not-withdrawable`.","headers":{},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A stable URL for the kind of problem: https://docs.andteam.com/api/problems/{slug}.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"errors":{"description":"validation-failed: every field that is wrong, at once.","type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer (RFC 6901) to the field in the request body, such as /candidate/personalEmail.","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"code":{"type":"string","description":"A stable code for the error, such as required, invalid, insufficient-balance.","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"required":["pointer","code","detail"],"additionalProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"fields":{"description":"field-locked: every field in the request the HRIS owns for this person.","type":"array","items":{"type":"string","uniqueKey":"fields.items.[INDEX]","typeLabel":"string"},"uniqueKey":"fields","typeLabel":"string[]"},"existingId":{"description":"pending-change-exists, duplicate-hire, possible-rehire: the id of the existing record.","type":"string","uniqueKey":"existingId","typeLabel":"string"},"step":{"description":"approval-chain-unresolvable: the step that resolves to nobody.","type":"string","uniqueKey":"step","typeLabel":"string"}},"required":["type","title","status"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":0,"detail":"\u003cstring>","instance":"\u003cstring>","errors":[{"pointer":"\u003cstring>","code":"\u003cstring>","detail":"\u003cstring>"}],"fields":["\u003cstring>"],"existingId":"\u003cstring>","step":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"61e2c0b0-d50e-408f-bbbd-4d1f6daa7740":{"description":"Unsupported media type. Problem types: `unsupported-media-type`.","headers":{},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A stable URL for the kind of problem: https://docs.andteam.com/api/problems/{slug}.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"errors":{"description":"validation-failed: every field that is wrong, at once.","type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer (RFC 6901) to the field in the request body, such as /candidate/personalEmail.","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"code":{"type":"string","description":"A stable code for the error, such as required, invalid, insufficient-balance.","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"required":["pointer","code","detail"],"additionalProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"fields":{"description":"field-locked: every field in the request the HRIS owns for this person.","type":"array","items":{"type":"string","uniqueKey":"fields.items.[INDEX]","typeLabel":"string"},"uniqueKey":"fields","typeLabel":"string[]"},"existingId":{"description":"pending-change-exists, duplicate-hire, possible-rehire: the id of the existing record.","type":"string","uniqueKey":"existingId","typeLabel":"string"},"step":{"description":"approval-chain-unresolvable: the step that resolves to nobody.","type":"string","uniqueKey":"step","typeLabel":"string"}},"required":["type","title","status"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":0,"detail":"\u003cstring>","instance":"\u003cstring>","errors":[{"pointer":"\u003cstring>","code":"\u003cstring>","detail":"\u003cstring>"}],"fields":["\u003cstring>"],"existingId":"\u003cstring>","step":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"fc9fccbe-afe9-4c55-a2be-0dd8497c944f":{"description":"Not valid. Problem types: `validation-failed`, `idempotency-key-reused`.","headers":{},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A stable URL for the kind of problem: https://docs.andteam.com/api/problems/{slug}.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"errors":{"description":"validation-failed: every field that is wrong, at once.","type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer (RFC 6901) to the field in the request body, such as /candidate/personalEmail.","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"code":{"type":"string","description":"A stable code for the error, such as required, invalid, insufficient-balance.","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"required":["pointer","code","detail"],"additionalProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"fields":{"description":"field-locked: every field in the request the HRIS owns for this person.","type":"array","items":{"type":"string","uniqueKey":"fields.items.[INDEX]","typeLabel":"string"},"uniqueKey":"fields","typeLabel":"string[]"},"existingId":{"description":"pending-change-exists, duplicate-hire, possible-rehire: the id of the existing record.","type":"string","uniqueKey":"existingId","typeLabel":"string"},"step":{"description":"approval-chain-unresolvable: the step that resolves to nobody.","type":"string","uniqueKey":"step","typeLabel":"string"}},"required":["type","title","status"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":0,"detail":"\u003cstring>","instance":"\u003cstring>","errors":[{"pointer":"\u003cstring>","code":"\u003cstring>","detail":"\u003cstring>"}],"fields":["\u003cstring>"],"existingId":"\u003cstring>","step":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"c964c15f-4c53-481f-ab59-13468226578d":{"description":"Rate limited. Problem types: `rate-limited`.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A stable URL for the kind of problem: https://docs.andteam.com/api/problems/{slug}.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"errors":{"description":"validation-failed: every field that is wrong, at once.","type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer (RFC 6901) to the field in the request body, such as /candidate/personalEmail.","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"code":{"type":"string","description":"A stable code for the error, such as required, invalid, insufficient-balance.","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"required":["pointer","code","detail"],"additionalProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"fields":{"description":"field-locked: every field in the request the HRIS owns for this person.","type":"array","items":{"type":"string","uniqueKey":"fields.items.[INDEX]","typeLabel":"string"},"uniqueKey":"fields","typeLabel":"string[]"},"existingId":{"description":"pending-change-exists, duplicate-hire, possible-rehire: the id of the existing record.","type":"string","uniqueKey":"existingId","typeLabel":"string"},"step":{"description":"approval-chain-unresolvable: the step that resolves to nobody.","type":"string","uniqueKey":"step","typeLabel":"string"}},"required":["type","title","status"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":0,"detail":"\u003cstring>","instance":"\u003cstring>","errors":[{"pointer":"\u003cstring>","code":"\u003cstring>","detail":"\u003cstring>"}],"fields":["\u003cstring>"],"existingId":"\u003cstring>","step":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"a9f37ab9-c9f3-4ec9-b802-5517797ff6d6":{"description":"Server error. Problem types: `internal-error`.","headers":{},"content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A stable URL for the kind of problem: https://docs.andteam.com/api/problems/{slug}.","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"errors":{"description":"validation-failed: every field that is wrong, at once.","type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer (RFC 6901) to the field in the request body, such as /candidate/personalEmail.","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"code":{"type":"string","description":"A stable code for the error, such as required, invalid, insufficient-balance.","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"detail":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"required":["pointer","code","detail"],"additionalProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"},"fields":{"description":"field-locked: every field in the request the HRIS owns for this person.","type":"array","items":{"type":"string","uniqueKey":"fields.items.[INDEX]","typeLabel":"string"},"uniqueKey":"fields","typeLabel":"string[]"},"existingId":{"description":"pending-change-exists, duplicate-hire, possible-rehire: the id of the existing record.","type":"string","uniqueKey":"existingId","typeLabel":"string"},"step":{"description":"approval-chain-unresolvable: the step that resolves to nobody.","type":"string","uniqueKey":"step","typeLabel":"string"}},"required":["type","title","status"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":0,"detail":"\u003cstring>","instance":"\u003cstring>","errors":[{"pointer":"\u003cstring>","code":"\u003cstring>","detail":"\u003cstring>"}],"fields":["\u003cstring>"],"existingId":"\u003cstring>","step":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"8176f727-c71c-46ea-9693-90364dc198f4":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"atk_live_…","description":"`Authorization: Bearer atk_live_…` (a sandbox's keys are `atk_test_…`). Created in the API keys section of the Integrations settings; the secret is shown once.","scopes":[],"schemeName":"apiKey"}},"0c7e1611-cf8c-415a-bf94-31afa5ec5942":{"oauth":{"type":"oauth2","description":"For an app installed in many tenants: client credentials, a one-hour `ato_…` token per tenant.","flows":{"clientCredentials":{"tokenUrl":"https://api.v3.andteam.com/v1/oauth/token","scopes":{}}},"scopes":[],"schemeName":"oauth"}}},"servers":{"53173e53-73ef-4ae2-87b8-83a71010e39d":{"url":"https://api.v3.andteam.com/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"atk_live_…","description":"`Authorization: Bearer atk_live_…` (a sandbox's keys are `atk_test_…`). Created in the API keys section of the Integrations settings; the secret is shown once.","scopes":[],"schemeName":"apiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"`Authorization: Bearer atk_live_…` (a sandbox's keys are `atk_test_…`). Created in the API keys section of the Integrations settings; the secret is shown once.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKey","name":"Authorization"}],"title":"apiKey"},{"schemes":[{"scheme":{"type":"oauth2","description":"For an app installed in many tenants: client credentials, a one-hour `ato_…` token per tenant.","flows":{"clientCredentials":{"tokenUrl":"https://api.v3.andteam.com/v1/oauth/token","scopes":{}}},"scopes":[],"schemeName":"oauth"},"schema":{"title":"OAuth2 Auth","type":"string","isRequired":true,"description":"For an app installed in many tenants: client credentials, a one-hour `ato_…` token per tenant.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"oauth","name":"Authorization"}],"title":"oauth"}]},"originalFileLocation":"openapi.json"},"subdomain":"andteam","siteName":"andteam","title":"Request leave for an employee - andteam","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T08:45:03.343Z","originalFileLocation":"api-reference/leave/request-leave-for-an-employee.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Needs the Leave field group\u0026#x27;s Write switch. Requests leave in the employee\u0026#x27;s name, through the portal\u0026#x27;s own leave request: the balance and per-request caps are checked, days are counted on the person\u0026#x27;s work pattern and public holidays, and the tenant\u0026#x27;s leave approval chain decides. 202 awaiting_approval, or 201 approved when the chain has no steps. A refusal is 422 validation-failed with a code in errors: insufficient-balance, over-cap, overlap, not-offered, after-contract-end, no-working-days, invalid-dates, unknown-leave-type, no-balance-policy. Sick leave is refused (sick-leave-in-portal): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. ?validate_only=true answers what it would be and writes nothing. Fires leave_request.submitted.\">\u003cmeta data-mint-head name=\"application-name\" content=\"andteam\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Request leave for an employee - andteam\">\u003cmeta data-mint-head property=\"og:description\" content=\"Needs the Leave field group\u0026#x27;s Write switch. Requests leave in the employee\u0026#x27;s name, through the portal\u0026#x27;s own leave request: the balance and per-request caps are checked, days are counted on the person\u0026#x27;s work pattern and public holidays, and the tenant\u0026#x27;s leave approval chain decides. 202 awaiting_approval, or 201 approved when the chain has no steps. A refusal is 422 validation-failed with a code in errors: insufficient-balance, over-cap, overlap, not-offered, after-contract-end, no-working-days, invalid-dates, unknown-leave-type, no-balance-policy. Sick leave is refused (sick-leave-in-portal): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. ?validate_only=true answers what it would be and writes nothing. Fires leave_request.submitted.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"andteam\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://andteam.mintlify.site/_mintlify/api/og/v2?division=Leave\u0026amp;title=Request+leave+for+an+employee\u0026amp;description=Needs+the+Leave+field+group%27s+Write+switch.+Requests+leave+in+the+employee%27s+name%2C+through+the+portal%27s+own+leave+request%3A+the+balance+and+per-request+caps+are+\u0026amp;theme=823a7c0489dceecba2e0c789\u0026amp;signature=41cdd94465d481c94a70659d5ba57543c71c2a170fd8e01ab4f927c1e9a905ca\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Request leave for an employee - andteam\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Needs the Leave field group\u0026#x27;s Write switch. Requests leave in the employee\u0026#x27;s name, through the portal\u0026#x27;s own leave request: the balance and per-request caps are checked, days are counted on the person\u0026#x27;s work pattern and public holidays, and the tenant\u0026#x27;s leave approval chain decides. 202 awaiting_approval, or 201 approved when the chain has no steps. A refusal is 422 validation-failed with a code in errors: insufficient-balance, over-cap, overlap, not-offered, after-contract-end, no-working-days, invalid-dates, unknown-leave-type, no-balance-policy. Sick leave is refused (sick-leave-in-portal): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. ?validate_only=true answers what it would be and writes nothing. Fires leave_request.submitted.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://andteam.mintlify.site/_mintlify/api/og/v2?division=Leave\u0026amp;title=Request+leave+for+an+employee\u0026amp;description=Needs+the+Leave+field+group%27s+Write+switch.+Requests+leave+in+the+employee%27s+name%2C+through+the+portal%27s+own+leave+request%3A+the+balance+and+per-request+caps+are+\u0026amp;theme=823a7c0489dceecba2e0c789\u0026amp;signature=41cdd94465d481c94a70659d5ba57543c71c2a170fd8e01ab4f927c1e9a905ca\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/andteam/D1YWVRbXj0UYh9MI/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"andteam\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00827B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/leave/request-leave-for-an-employee.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.andteam.com/#organization\",\"name\":\"andteam\",\"url\":\"https://docs.andteam.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/andteam/MVfTtzphnPhhxPa9/logo/andteam.svg?fit=max\u0026auto=format\u0026n=MVfTtzphnPhhxPa9\u0026q=85\u0026s=b11d93ffad90324a82a8c0d5d1a0c404\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.andteam.com#website\",\"name\":\"andteam\",\"url\":\"https://docs.andteam.com\",\"publisher\":{\"@id\":\"https://docs.andteam.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee#webpage\",\"url\":\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee\",\"name\":\"Request leave for an employee\",\"description\":\"Needs the Leave field group's Write switch. Requests leave in the employee's name, through the portal's own leave request: the balance and per-request caps are checked, days are counted on the person's work pattern and public holidays, and the tenant's leave approval chain decides. 202 awaiting_approval, or 201 approved when the chain has no steps. A refusal is 422 validation-failed with a code in errors: insufficient-balance, over-cap, overlap, not-offered, after-contract-end, no-working-days, invalid-dates, unknown-leave-type, no-balance-policy. Sick leave is refused (sick-leave-in-portal): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. ?validate_only=true answers what it would be and writes nothing. Fires leave_request.submitted.\",\"dateModified\":\"2026-11-11T08:45:03.343Z\",\"isPartOf\":{\"@id\":\"https://docs.andteam.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Leave\",\"item\":\"https://docs.andteam.com/api-reference/leave/list-the-leave-types\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Request leave for an employee\",\"item\":\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee#apireference\",\"headline\":\"Request leave for an employee\",\"name\":\"Request leave for an employee\",\"description\":\"Needs the Leave field group's Write switch. Requests leave in the employee's name, through the portal's own leave request: the balance and per-request caps are checked, days are counted on the person's work pattern and public holidays, and the tenant's leave approval chain decides. 202 awaiting_approval, or 201 approved when the chain has no steps. A refusal is 422 validation-failed with a code in errors: insufficient-balance, over-cap, overlap, not-offered, after-contract-end, no-working-days, invalid-dates, unknown-leave-type, no-balance-policy. Sick leave is refused (sick-leave-in-portal): the sick note belongs in the portal. The employee is told which system made the request, and can withdraw it in the portal. ?validate_only=true answers what it would be and writes nothing. Fires leave_request.submitted.\",\"url\":\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee\",\"mainEntityOfPage\":{\"@id\":\"https://docs.andteam.com/api-reference/leave/request-leave-for-an-employee#webpage\"},\"dateModified\":\"2026-11-11T08:45:03.343Z\",\"publisher\":{\"@id\":\"https://docs.andteam.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.andteam.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"andteam\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"andteam\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/leave/request-leave-for-an-employee.md","siteName":"andteam","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Directory","pages":[{"title":"List employees","deprecated":null,"version":null,"openapi":"/openapi.json get /employees","href":"/api-reference/directory/list-employees"},{"title":"Get one employee","deprecated":null,"version":null,"openapi":"/openapi.json get /employees/{id}","href":"/api-reference/directory/get-one-employee"},{"title":"Change an employee's personal and contact details","deprecated":null,"version":null,"openapi":"/openapi.json patch /employees/{id}","href":"/api-reference/directory/change-an-employees-personal-and-contact-details"},{"title":"List published employee events","deprecated":null,"version":null,"openapi":"/openapi.json get /events","href":"/api-reference/directory/list-published-employee-events"}]},{"group":"Organisation","pages":[{"title":"List the key's companies","deprecated":null,"version":null,"openapi":"/openapi.json get /companies","href":"/api-reference/organisation/list-the-keys-companies"},{"title":"List the structure's units below Company","deprecated":null,"version":null,"openapi":"/openapi.json get /org-units","href":"/api-reference/organisation/list-the-structures-units-below-company"},{"title":"List locations","deprecated":null,"version":null,"openapi":"/openapi.json get /locations","href":"/api-reference/organisation/list-locations"},{"title":"List a lookup's values","deprecated":null,"version":null,"openapi":"/openapi.json get /lookups/{type}","href":"/api-reference/organisation/list-a-lookups-values"}]},{"group":"Positions","pages":[{"title":"List positions","deprecated":null,"version":null,"openapi":"/openapi.json get /positions","href":"/api-reference/positions/list-positions"}]},{"group":"Time off","pages":[{"title":"List absences that were approved: approved, or cancelled once withdrawn (dates only, never the leave type)","deprecated":null,"version":null,"openapi":"/openapi.json get /time-off","href":"/api-reference/time-off/list-absences-that-were-approved:-approved-or-cancelled-once-withdrawn-dates-only-never-the-leave-type"}]},{"group":"Job history","pages":[{"title":"A person's job history, newest first","deprecated":null,"version":null,"openapi":"/openapi.json get /employees/{id}/job-history","href":"/api-reference/job-history/a-persons-job-history-newest-first"},{"title":"List job-history entries across the key's companies","deprecated":null,"version":null,"openapi":"/openapi.json get /job-history","href":"/api-reference/job-history/list-job-history-entries-across-the-keys-companies"},{"title":"File a promotion, transfer or re-grade","deprecated":null,"version":null,"openapi":"/openapi.json post /employees/{id}/job-changes","href":"/api-reference/job-history/file-a-promotion-transfer-or-re-grade"},{"title":"Get a job change","deprecated":null,"version":null,"openapi":"/openapi.json get /job-changes/{id}","href":"/api-reference/job-history/get-a-job-change"},{"title":"Withdraw a pending job change","deprecated":null,"version":null,"openapi":"/openapi.json post /job-changes/{id}/withdraw","href":"/api-reference/job-history/withdraw-a-pending-job-change"}]},{"group":"Leave","pages":[{"title":"List the leave types","deprecated":null,"version":null,"openapi":"/openapi.json get /leave-types","href":"/api-reference/leave/list-the-leave-types"},{"title":"A person's leave balances","deprecated":null,"version":null,"openapi":"/openapi.json get /employees/{id}/leave-balances","href":"/api-reference/leave/a-persons-leave-balances"},{"title":"List leave requests (never a sick request)","deprecated":null,"version":null,"openapi":"/openapi.json get /leave-requests","href":"/api-reference/leave/list-leave-requests-never-a-sick-request"},{"title":"Get one leave request","description":"Needs the Leave field group. The same object as the list. A sick request, one outside the key's companies and one that does not exist are all 404 by design: a foreign id is never confirmed to exist.","deprecated":null,"version":null,"openapi":"/openapi.json get /leave-requests/{id}","href":"/api-reference/leave/get-one-leave-request"},{"title":"Request leave for an employee","deprecated":null,"version":null,"openapi":"/openapi.json post /employees/{id}/leave-requests","href":"/api-reference/leave/request-leave-for-an-employee"},{"title":"Withdraw a leave request this key made","description":"Needs the Leave field group's Write switch. Takes back a request this key made while it still awaits approval. Only the key that filed a request may withdraw it; anything else is 409 `not-withdrawable`. Fires `leave_request.decided` with status `withdrawn`.","deprecated":null,"version":null,"openapi":"/openapi.json post /leave-requests/{id}/withdraw","href":"/api-reference/leave/withdraw-a-leave-request-this-key-made"}]},{"group":"Certifications","pages":[{"title":"A person's current certifications","deprecated":null,"version":null,"openapi":"/openapi.json get /employees/{id}/certifications","href":"/api-reference/certifications/a-persons-current-certifications"}]},{"group":"Pay","pages":[{"title":"Get an employee's current pay package","deprecated":null,"version":null,"openapi":"/openapi.json get /employees/{id}/pay","href":"/api-reference/pay/get-an-employees-current-pay-package"},{"title":"List an employee's pay packages, newest first","deprecated":null,"version":null,"openapi":"/openapi.json get /employees/{id}/pay-history","href":"/api-reference/pay/list-an-employees-pay-packages-newest-first"},{"title":"File an increase, promotion or adjustment of pay","deprecated":null,"version":null,"openapi":"/openapi.json post /employees/{id}/pay-changes","href":"/api-reference/pay/file-an-increase-promotion-or-adjustment-of-pay"},{"title":"Get a pay change","deprecated":null,"version":null,"openapi":"/openapi.json get /pay-changes/{id}","href":"/api-reference/pay/get-a-pay-change"},{"title":"Withdraw a pending pay change","deprecated":null,"version":null,"openapi":"/openapi.json post /pay-changes/{id}/withdraw","href":"/api-reference/pay/withdraw-a-pending-pay-change"}]},{"group":"Performance","pages":[{"title":"List an employee's released final performance ratings","deprecated":null,"version":null,"openapi":"/openapi.json get /employees/{id}/performance-ratings","href":"/api-reference/performance/list-an-employees-released-final-performance-ratings"}]},{"group":"Documents","pages":[{"title":"List an employee's documents, newest first","deprecated":null,"version":null,"openapi":"/openapi.json get /employees/{id}/documents","href":"/api-reference/documents/list-an-employees-documents-newest-first"},{"title":"Download a document","deprecated":null,"version":null,"openapi":"/openapi.json get /documents/{id}/download","href":"/api-reference/documents/download-a-document"}]},{"group":"Hires","pages":[{"title":"File a new hire: a prefilled draft offer HR completes","deprecated":null,"version":null,"openapi":"/openapi.json post /hires","href":"/api-reference/hires/file-a-new-hire:-a-prefilled-draft-offer-hr-completes"},{"title":"Get one hire and its status","deprecated":null,"version":null,"openapi":"/openapi.json get /hires/{id}","href":"/api-reference/hires/get-one-hire-and-its-status"}]},{"group":"Authentication","pages":[{"title":"Get an access token (OAuth client credentials)","deprecated":null,"version":null,"openapi":"/openapi.json post /oauth/token","href":"/api-reference/authentication/get-an-access-token-oauth-client-credentials"}]},{"group":"Reference","pages":[{"title":"This document","deprecated":null,"version":null,"openapi":"/openapi.json get /openapi.json","href":"/api-reference/reference/this-document"}]},{"group":"Webhooks","pages":[{"title":"Employeehired","version":null,"deprecated":null,"openapi":"/openapi.json webhook employee.hired","href":"/api-reference/webhooks/employeehired"},{"title":"Employeestarted","version":null,"deprecated":null,"openapi":"/openapi.json webhook employee.started","href":"/api-reference/webhooks/employeestarted"},{"title":"Employeechanged","version":null,"deprecated":null,"openapi":"/openapi.json webhook employee.changed","href":"/api-reference/webhooks/employeechanged"},{"title":"Employeeleaving","version":null,"deprecated":null,"openapi":"/openapi.json webhook employee.leaving","href":"/api-reference/webhooks/employeeleaving"},{"title":"Employeeleft","version":null,"deprecated":null,"openapi":"/openapi.json webhook employee.left","href":"/api-reference/webhooks/employeeleft"},{"title":"Employeehire withdrawn","version":null,"deprecated":null,"openapi":"/openapi.json webhook employee.hire_withdrawn","href":"/api-reference/webhooks/employeehire_withdrawn"},{"title":"Employeetermination cancelled","version":null,"deprecated":null,"openapi":"/openapi.json webhook employee.termination_cancelled","href":"/api-reference/webhooks/employeetermination_cancelled"},{"title":"Hirestatus changed","version":null,"deprecated":null,"openapi":"/openapi.json webhook hire.status_changed","href":"/api-reference/webhooks/hirestatus_changed"},{"title":"Job changerequested","version":null,"deprecated":null,"openapi":"/openapi.json webhook job_change.requested","href":"/api-reference/webhooks/job_changerequested"},{"title":"Job changedecided","version":null,"deprecated":null,"openapi":"/openapi.json webhook job_change.decided","href":"/api-reference/webhooks/job_changedecided"},{"title":"Pay changerequested","version":null,"deprecated":null,"openapi":"/openapi.json webhook pay_change.requested","href":"/api-reference/webhooks/pay_changerequested"},{"title":"Pay changedecided","version":null,"deprecated":null,"openapi":"/openapi.json webhook pay_change.decided","href":"/api-reference/webhooks/pay_changedecided"},{"title":"Leave requestsubmitted","version":null,"deprecated":null,"openapi":"/openapi.json webhook leave_request.submitted","href":"/api-reference/webhooks/leave_requestsubmitted"},{"title":"Leave requestdecided","version":null,"deprecated":null,"openapi":"/openapi.json webhook leave_request.decided","href":"/api-reference/webhooks/leave_requestdecided"},{"title":"Performancerating released","version":null,"deprecated":null,"openapi":"/openapi.json webhook performance.rating_released","href":"/api-reference/webhooks/performancerating_released"},{"title":"Documentadded","version":null,"deprecated":null,"openapi":"/openapi.json webhook document.added","href":"/api-reference/webhooks/documentadded"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/api/changelog"}]}]},"basePath":"","title":"Request leave for an employee - andteam","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}