[{"data":1,"prerenderedAt":2046},["ShallowReactive",2],{"navigation":3,"\u002Fapi\u002Fguides\u002Fleave":547,"\u002Fapi\u002Fguides\u002Fleave-surround":2041},[4,28,62,92,117,146,253,292,325,349,385,421,459,488],{"title":5,"path":6,"stem":7,"children":8,"icon":27},"Getting Started","\u002Fgetting-started","1.getting-started\u002F1.index",[9,12,17,22],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-house",{"title":13,"path":14,"stem":15,"icon":16},"Usage","\u002Fgetting-started\u002Fusage","1.getting-started\u002F3.usage","i-lucide-sliders",{"title":18,"path":19,"stem":20,"icon":21},"Signing in on the mobile app","\u002Fgetting-started\u002Fmobile-app-sign-in","1.getting-started\u002F4.mobile-app-sign-in","i-lucide-smartphone",{"title":23,"path":24,"stem":25,"icon":26},"Running without email","\u002Fgetting-started\u002Frunning-without-email","1.getting-started\u002F5.running-without-email","i-lucide-mail-x",false,{"title":29,"icon":27,"path":30,"stem":31,"children":32,"page":27},"Security & Privacy","\u002Fsecurity","10.security",[33,38,43,47,52,57],{"title":34,"path":35,"stem":36,"icon":37},"Security Overview","\u002Fsecurity\u002Foverview","10.security\u002F1.overview","i-lucide-shield-check",{"title":39,"path":40,"stem":41,"icon":42},"Authentication","\u002Fsecurity\u002Fauthentication","10.security\u002F2.authentication","i-lucide-log-in",{"title":44,"path":45,"stem":46,"icon":21},"Two-Factor & Devices","\u002Fsecurity\u002Ftwo-factor-and-devices","10.security\u002F3.two-factor-and-devices",{"title":48,"path":49,"stem":50,"icon":51},"Audit & Monitoring","\u002Fsecurity\u002Faudit-and-monitoring","10.security\u002F4.audit-and-monitoring","i-lucide-scroll-text",{"title":53,"path":54,"stem":55,"icon":56},"Account Deletion & Privacy","\u002Fsecurity\u002Faccount-deletion-and-privacy","10.security\u002F5.account-deletion-and-privacy","i-lucide-user-x",{"title":58,"path":59,"stem":60,"icon":61},"Roles & Permissions","\u002Fsecurity\u002Froles-and-permissions","10.security\u002F6.roles-and-permissions","i-lucide-key-round",{"title":63,"icon":27,"path":64,"stem":65,"children":66,"page":27},"Billing & Plans","\u002Fbilling","11.billing",[67,72,77,82,87],{"title":68,"path":69,"stem":70,"icon":71},"Plans","\u002Fbilling\u002Fplans","11.billing\u002F1.plans","i-lucide-credit-card",{"title":73,"path":74,"stem":75,"icon":76},"Limits & Usage","\u002Fbilling\u002Flimits-and-usage","11.billing\u002F2.limits-and-usage","i-lucide-gauge",{"title":78,"path":79,"stem":80,"icon":81},"Managing Your Subscription","\u002Fbilling\u002Fmanaging-your-subscription","11.billing\u002F3.managing-your-subscription","i-lucide-receipt",{"title":83,"path":84,"stem":85,"icon":86},"Add-ons","\u002Fbilling\u002Fadd-ons","11.billing\u002F4.add-ons","i-lucide-puzzle",{"title":88,"path":89,"stem":90,"icon":91},"Integrations","\u002Fbilling\u002Fintegrations","11.billing\u002F5.integrations","i-lucide-plug",{"title":93,"icon":27,"path":94,"stem":95,"children":96,"page":27},"Settings","\u002Fsettings","12.settings",[97,101,105,109,113],{"title":98,"path":99,"stem":100},"General","\u002Fsettings\u002Fgeneral","12.settings\u002F1.general",{"title":102,"path":103,"stem":104},"Leave Types","\u002Fsettings\u002Fleavetype","12.settings\u002F2.leaveType",{"title":106,"path":107,"stem":108},"Carry Forward","\u002Fsettings\u002Fcarryforward","12.settings\u002F3.carryForward",{"title":110,"path":111,"stem":112},"Department Management","\u002Fsettings\u002Fdepartments","12.settings\u002F4.departments",{"title":114,"path":115,"stem":116},"Public Holidays","\u002Fsettings\u002Fpublicholiday","12.settings\u002F5.publicholiday",{"title":118,"path":119,"stem":120,"children":121,"page":27},"Mcp","\u002Fmcp","13.mcp",[122,127,131,136,141],{"title":123,"path":124,"stem":125,"icon":126},"Overview","\u002Fmcp\u002Foverview","13.mcp\u002F1.overview","i-lucide-bot",{"title":128,"path":129,"stem":130,"icon":91},"Connecting","\u002Fmcp\u002Fconnecting","13.mcp\u002F2.connecting",{"title":132,"path":133,"stem":134,"icon":135},"Tools Reference","\u002Fmcp\u002Ftools","13.mcp\u002F3.tools","i-lucide-wrench",{"title":137,"path":138,"stem":139,"icon":140},"Security","\u002Fmcp\u002Fsecurity","13.mcp\u002F4.security","i-lucide-shield",{"title":142,"path":143,"stem":144,"icon":145},"Integrating Your Own MCP Client","\u002Fmcp\u002Fcustom-client","13.mcp\u002F5.custom-client","i-lucide-code",{"title":147,"icon":27,"path":148,"stem":149,"children":150,"page":27},"Public API","\u002Fapi","14.api",[151,156,160,164,169,174,179,183,208,238,243,248],{"title":152,"path":153,"stem":154,"icon":155},"API Overview","\u002Fapi\u002Foverview","14.api\u002F1.overview","i-lucide-code-xml",{"title":5,"path":157,"stem":158,"icon":159},"\u002Fapi\u002Fgetting-started","14.api\u002F2.getting-started","i-lucide-rocket",{"title":161,"path":162,"stem":163,"icon":61},"Authentication & Tokens","\u002Fapi\u002Fauthentication","14.api\u002F3.authentication",{"title":165,"path":166,"stem":167,"icon":168},"API Roles & Scopes","\u002Fapi\u002Froles-and-scopes","14.api\u002F4.roles-and-scopes","i-lucide-layers",{"title":170,"path":171,"stem":172,"icon":173},"Requests & Responses","\u002Fapi\u002Frequests-and-responses","14.api\u002F5.requests-and-responses","i-lucide-arrow-left-right",{"title":175,"path":176,"stem":177,"icon":178},"Errors","\u002Fapi\u002Ferrors","14.api\u002F6.errors","i-lucide-circle-alert",{"title":180,"path":181,"stem":182,"icon":76},"Rate Limits","\u002Fapi\u002Frate-limits","14.api\u002F7.rate-limits",{"title":184,"icon":185,"path":186,"stem":187,"children":188,"page":27},"Guides","i-lucide-book-marked","\u002Fapi\u002Fguides","14.api\u002F8.guides",[189,194,199,204],{"title":190,"path":191,"stem":192,"icon":193},"People","\u002Fapi\u002Fguides\u002Fpeople","14.api\u002F8.guides\u002F1.people","i-lucide-users",{"title":195,"path":196,"stem":197,"icon":198},"Leave","\u002Fapi\u002Fguides\u002Fleave","14.api\u002F8.guides\u002F2.leave","i-lucide-calendar-days",{"title":200,"path":201,"stem":202,"icon":203},"Time","\u002Fapi\u002Fguides\u002Ftime","14.api\u002F8.guides\u002F3.time","i-lucide-clock",{"title":205,"path":206,"stem":207,"icon":81},"Expenses & Documents","\u002Fapi\u002Fguides\u002Fexpenses-and-documents","14.api\u002F8.guides\u002F4.expenses-and-documents",{"title":209,"icon":210,"path":211,"stem":212,"children":213,"page":27},"Webhooks","i-lucide-webhook","\u002Fapi\u002Fwebhooks","14.api\u002F9.webhooks",[214,218,223,228,233],{"title":215,"path":216,"stem":217,"icon":210},"Webhooks Overview","\u002Fapi\u002Fwebhooks\u002Foverview","14.api\u002F9.webhooks\u002F1.overview",{"title":219,"path":220,"stem":221,"icon":222},"Events Reference","\u002Fapi\u002Fwebhooks\u002Fevents","14.api\u002F9.webhooks\u002F2.events","i-lucide-list",{"title":224,"path":225,"stem":226,"icon":227},"Verifying Signatures","\u002Fapi\u002Fwebhooks\u002Fverifying-signatures","14.api\u002F9.webhooks\u002F3.verifying-signatures","i-lucide-badge-check",{"title":229,"path":230,"stem":231,"icon":232},"Retries & Failures","\u002Fapi\u002Fwebhooks\u002Fretries-and-failures","14.api\u002F9.webhooks\u002F4.retries-and-failures","i-lucide-refresh-cw",{"title":234,"path":235,"stem":236,"icon":237},"Best Practices","\u002Fapi\u002Fwebhooks\u002Fbest-practices","14.api\u002F9.webhooks\u002F5.best-practices","i-lucide-list-checks",{"title":239,"path":240,"stem":241,"icon":242},"Postman & OpenAPI","\u002Fapi\u002Fpostman-and-openapi","14.api\u002F91.postman-and-openapi","i-lucide-file-json",{"title":244,"path":245,"stem":246,"icon":247},"Versioning & Changes","\u002Fapi\u002Fversioning","14.api\u002F92.versioning","i-lucide-git-branch",{"title":249,"path":250,"stem":251,"icon":252},"API Reference","\u002Fapi\u002Freference","14.api\u002F93.reference","i-lucide-book-open",{"title":254,"icon":27,"path":255,"stem":256,"children":257,"page":27},"Data Import & Migration","\u002Fdata-import","2.data-import",[258,262,267,272,277,282,287],{"title":123,"path":259,"stem":260,"icon":261},"\u002Fdata-import\u002Foverview","2.data-import\u002F1.overview","i-lucide-database",{"title":263,"path":264,"stem":265,"icon":266},"Importing a File","\u002Fdata-import\u002Fimporting-a-file","2.data-import\u002F2.importing-a-file","i-lucide-file-up",{"title":268,"path":269,"stem":270,"icon":271},"Supported Platforms","\u002Fdata-import\u002Fsupported-platforms","2.data-import\u002F3.supported-platforms","i-lucide-layout-grid",{"title":273,"path":274,"stem":275,"icon":276},"Direct Connections","\u002Fdata-import\u002Fdirect-connections","2.data-import\u002F4.direct-connections","i-lucide-plug-zap",{"title":278,"path":279,"stem":280,"icon":281},"Custom Templates","\u002Fdata-import\u002Fcustom-templates","2.data-import\u002F5.custom-templates","i-lucide-layout-template",{"title":283,"path":284,"stem":285,"icon":286},"Rollback & Import History","\u002Fdata-import\u002Frollback-and-history","2.data-import\u002F6.rollback-and-history","i-lucide-undo-2",{"title":288,"path":289,"stem":290,"icon":291},"Troubleshooting","\u002Fdata-import\u002Ftroubleshooting","2.data-import\u002F7.troubleshooting","i-lucide-life-buoy",{"title":293,"icon":27,"path":294,"stem":295,"children":296,"page":27},"Leave Management","\u002Fleave-management","3.leave-management",[297,302,307,312,316,321],{"title":298,"path":299,"stem":300,"icon":301},"Leave Management Overview","\u002Fleave-management\u002Foverview","3.leave-management\u002F1.overview","i-lucide-palmtree",{"title":303,"path":304,"stem":305,"icon":306},"Requesting Leave","\u002Fleave-management\u002Frequesting-leave","3.leave-management\u002F2.requesting-leave","i-lucide-calendar-plus",{"title":308,"path":309,"stem":310,"icon":311},"Leave Balances","\u002Fleave-management\u002Fleave-balances","3.leave-management\u002F3.leave-balances","i-lucide-wallet",{"title":313,"path":314,"stem":315,"icon":193},"Group Booking","\u002Fleave-management\u002Fgroup-booking","3.leave-management\u002F4.group-booking",{"title":317,"path":318,"stem":319,"icon":320},"Editing and Cancelling Leave","\u002Fleave-management\u002Fediting-and-cancelling","3.leave-management\u002F5.editing-and-cancelling","i-lucide-pencil",{"title":322,"path":323,"stem":324,"icon":291},"Leave Troubleshooting","\u002Fleave-management\u002Ftroubleshooting","3.leave-management\u002F6.troubleshooting",{"title":326,"icon":27,"path":327,"stem":328,"children":329,"page":27},"Approvals","\u002Fapprovals","4.approvals",[330,335,340,344],{"title":331,"path":332,"stem":333,"icon":334},"Approvals Overview","\u002Fapprovals\u002Foverview","4.approvals\u002F1.overview","i-lucide-check-check",{"title":336,"path":337,"stem":338,"icon":339},"Leave Approvals","\u002Fapprovals\u002Fleave-approvals","4.approvals\u002F2.leave-approvals","i-lucide-calendar-check",{"title":341,"path":342,"stem":343,"icon":81},"Expense Approvals","\u002Fapprovals\u002Fexpense-approvals","4.approvals\u002F3.expense-approvals",{"title":345,"path":346,"stem":347,"icon":348},"Time Approvals","\u002Fapprovals\u002Ftime-approvals","4.approvals\u002F4.time-approvals","i-lucide-clock-9",{"title":350,"icon":27,"path":351,"stem":352,"children":353,"page":27},"Time tracking & monitoring","\u002Ftime-tracking","5.Time Tracking",[354,359,364,369,373,377,381],{"title":355,"path":356,"stem":357,"icon":358},"Clocking In & Location","\u002Ftime-tracking\u002Fclock-in-and-location","5.Time Tracking\u002F5.clock-in-and-location","i-lucide-map-pin",{"title":360,"path":361,"stem":362,"icon":363},"Overtime & Pay-Period Lockdown","\u002Ftime-tracking\u002Fovertime-and-lockdown","5.Time Tracking\u002F6.overtime-and-lockdown","i-lucide-lock",{"title":365,"path":366,"stem":367,"icon":368},"Geofencing","\u002Ftime-tracking\u002Fgeofencing","5.Time Tracking\u002F7.geofencing","i-lucide-map",{"title":370,"path":371,"stem":372},"Time & Projects","\u002Ftime-tracking\u002Ftimeandprojects","5.Time Tracking\u002FTime&Projects",{"title":374,"path":375,"stem":376},"Time Tracking","\u002Ftime-tracking\u002Ftime-tracking","5.Time Tracking\u002FTime-tracking",{"title":378,"path":379,"stem":380},"Timeboard","\u002Ftime-tracking\u002Ftimeboard","5.Time Tracking\u002FTimeBoard",{"title":382,"path":383,"stem":384},"Timesheets","\u002Ftime-tracking\u002Ftimesheets","5.Time Tracking\u002FTimesheets",{"title":386,"icon":27,"path":387,"stem":388,"children":389,"page":27},"Expenses","\u002Fexpenses","6.expenses",[390,394,398,402,406,411,416],{"title":391,"path":392,"stem":393},"Expense Claims","\u002Fexpenses\u002Foverview","6.expenses\u002F1.overview",{"title":395,"path":396,"stem":397},"Add & Manage Purchases","\u002Fexpenses\u002Fpurchases","6.expenses\u002F2.purchases",{"title":399,"path":400,"stem":401},"Travel & Mileage Entry","\u002Fexpenses\u002Ftravelentries","6.expenses\u002F3.travelentries",{"title":403,"path":404,"stem":405,"icon":71},"Company Card Expenses","\u002Fexpenses\u002Fcompany-cards","6.expenses\u002F4.company-cards",{"title":407,"path":408,"stem":409,"icon":410},"Per Diems","\u002Fexpenses\u002Fper-diems","6.expenses\u002F5.per-diems","i-lucide-utensils",{"title":412,"path":413,"stem":414,"icon":415},"Receipt Scanning","\u002Fexpenses\u002Freceipt-scanning","6.expenses\u002F6.receipt-scanning","i-lucide-scan-line",{"title":417,"path":418,"stem":419,"icon":420},"Statuses & Submission","\u002Fexpenses\u002Fstatuses-and-submission","6.expenses\u002F7.statuses-and-submission","i-lucide-git-pull-request-arrow",{"title":422,"icon":27,"path":423,"stem":424,"children":425,"page":27},"Documents & E-Signatures","\u002Fdocuments","7.documents",[426,430,435,440,445,449,454],{"title":123,"path":427,"stem":428,"icon":429},"\u002Fdocuments\u002Foverview","7.documents\u002F1.overview","i-lucide-folder-open",{"title":431,"path":432,"stem":433,"icon":434},"Uploading Documents","\u002Fdocuments\u002Fuploading","7.documents\u002F2.uploading","i-lucide-upload",{"title":436,"path":437,"stem":438,"icon":439},"E-Signatures","\u002Fdocuments\u002Fe-signatures","7.documents\u002F3.e-signatures","i-lucide-pen-tool",{"title":441,"path":442,"stem":443,"icon":444},"Audit Trail & Certificate","\u002Fdocuments\u002Faudit-trail","7.documents\u002F4.audit-trail","i-lucide-file-check",{"title":446,"path":447,"stem":448,"icon":281},"Templates & Bulk Send","\u002Fdocuments\u002Ftemplates-and-bulk-send","7.documents\u002F5.templates-and-bulk-send",{"title":450,"path":451,"stem":452,"icon":453},"Onboarding","\u002Fdocuments\u002Fonboarding","7.documents\u002F6.onboarding","i-lucide-user-plus",{"title":455,"path":456,"stem":457,"icon":458},"Offboarding","\u002Fdocuments\u002Foffboarding","7.documents\u002F7.offboarding","i-lucide-user-minus",{"title":460,"icon":27,"path":461,"stem":462,"children":463,"page":27},"People & HR","\u002Fpeople","8.people",[464,468,473,478,483],{"title":465,"path":466,"stem":467,"icon":193},"Directory & Profiles","\u002Fpeople\u002Fdirectory-and-profiles","8.people\u002F1.directory-and-profiles",{"title":469,"path":470,"stem":471,"icon":472},"Managing Users","\u002Fpeople\u002Fmanaging-users","8.people\u002F2.managing-users","i-lucide-user-cog",{"title":474,"path":475,"stem":476,"icon":477},"HR Records","\u002Fpeople\u002Fhr-records","8.people\u002F3.hr-records","i-lucide-folder-archive",{"title":479,"path":480,"stem":481,"icon":482},"Performance","\u002Fpeople\u002Fperformance","8.people\u002F4.performance","i-lucide-target",{"title":484,"path":485,"stem":486,"icon":487},"Training","\u002Fpeople\u002Ftraining","8.people\u002F5.training","i-lucide-graduation-cap",{"title":489,"icon":27,"path":490,"stem":491,"children":492,"page":27},"Features","\u002Ffeatures","9.features",[493,497,501,505,510,515,519,523,527,531,535,539,543],{"title":494,"path":495,"stem":496,"icon":11},"Home","\u002Ffeatures\u002Fhome","9.features\u002F1.home",{"title":498,"path":499,"stem":500},"Email Configuration (SMTP)","\u002Ffeatures\u002Femail-configuration","9.features\u002F10.email-configuration",{"title":502,"path":503,"stem":504},"SMTP troubleshoot","\u002Ffeatures\u002Fsmtp-troubleshoot","9.features\u002F11.smtp-troubleshoot",{"title":506,"path":507,"stem":508,"icon":509},"Notifications","\u002Ffeatures\u002Fnotifications","9.features\u002F12.notifications","i-lucide-bell",{"title":511,"path":512,"stem":513,"icon":514},"Reports","\u002Ffeatures\u002Freports","9.features\u002F13.reports","i-lucide-bar-chart-3",{"title":516,"path":517,"stem":518},"Dashboard","\u002Ffeatures\u002Fdashboard","9.features\u002F2.dashboard",{"title":520,"path":521,"stem":522},"Calendar & Leave Overview","\u002Ffeatures\u002Fcalendar","9.features\u002F3.calendar",{"title":524,"path":525,"stem":526},"Calendar Integration","\u002Ffeatures\u002Fcalendar-integration","9.features\u002F4.calendar-integration",{"title":528,"path":529,"stem":530},"Schedules","\u002Ffeatures\u002Fschedules","9.features\u002F5.schedules",{"title":532,"path":533,"stem":534},"Project Management","\u002Ffeatures\u002Fprojects","9.features\u002F6.projects",{"title":536,"path":537,"stem":538},"Expense Settings","\u002Ffeatures\u002Fexpense-settings","9.features\u002F7.expense-settings",{"title":540,"path":541,"stem":542},"Auth0 SSO Integration","\u002Ffeatures\u002Fauth0-integration","9.features\u002F8.auth0-integration",{"title":544,"path":545,"stem":546},"Password & Authentication Policy","\u002Ffeatures\u002Fpolicies","9.features\u002F9.policies",{"id":548,"title":195,"body":549,"description":2034,"extension":2035,"links":2036,"meta":2037,"navigation":2038,"path":196,"seo":2039,"stem":197,"__hash__":2040},"docs\u002F14.api\u002F8.guides\u002F2.leave.md",{"type":550,"value":551,"toc":2023},"minimark",[552,561,564,569,667,684,688,691,713,720,742,746,796,825,1217,1252,1259,1263,1361,1422,1447,1457,1461,1516,1519,1580,1590,1596,1600,1655,1668,1697,1700,1728,1740,1750,1754,1784,1810,1836,1842,1846,1918,1967,1973,1977,2019],[553,554,555,556,560],"p",{},"This guide covers the leave side of the API: what can be booked, who is away, how much allowance is left, and the approval flow. Every parameter and field is in the ",[557,558,249],"a",{"href":559},"\u002Fapi\u002Freference#tag\u002Fleaves",".",[553,562,563],{},"Leave written through the API follows exactly the same rules as leave booked in the app: notice periods, balances, overlaps, locked dates, holidays, approval chains, notifications and calendar sync all apply.",[565,566,568],"h2",{"id":567},"scopes-for-this-area","Scopes for this area",[570,571,572,588],"table",{},[573,574,575],"thead",{},[576,577,578,582,585],"tr",{},[579,580,581],"th",{},"Task",[579,583,584],{},"Scope",[579,586,587],{},"Lowest owner role",[589,590,591,606,618,630,643,655],"tbody",{},[576,592,593,597,603],{},[594,595,596],"td",{},"Read leave types",[594,598,599],{},[600,601,602],"code",{},"leave_types:read",[594,604,605],{},"Employee",[576,607,608,611,616],{},[594,609,610],{},"Read leave requests",[594,612,613],{},[600,614,615],{},"leaves:read",[594,617,605],{},[576,619,620,623,628],{},[594,621,622],{},"Book and cancel leave",[594,624,625],{},[600,626,627],{},"leaves:write",[594,629,605],{},[576,631,632,635,640],{},[594,633,634],{},"Approve and reject requests",[594,636,637],{},[600,638,639],{},"leaves:approve",[594,641,642],{},"Department Head",[576,644,645,648,653],{},[594,646,647],{},"Read balances",[594,649,650],{},[600,651,652],{},"leave_balances:read",[594,654,605],{},[576,656,657,660,665],{},[594,658,659],{},"Read public holidays and locked dates",[594,661,662],{},[600,663,664],{},"holidays:read",[594,666,605],{},[553,668,669,670,674,675,678,679,683],{},"The ",[671,672,673],"strong",{},"Leave sync"," and ",[671,676,677],{},"Leave management"," ",[557,680,682],{"href":681},"\u002Fapi\u002Froles-and-scopes#built-in-templates","templates"," bundle these scopes.",[565,685,687],{"id":686},"whose-leave-a-token-can-see","Whose leave a token can see",[553,689,690],{},"A token sees the leave its owner sees in the app:",[692,693,694,701,707],"ul",{},[695,696,697,700],"li",{},[671,698,699],{},"Their own"," leave, always.",[695,702,703,706],{},[671,704,705],{},"Anyone whose personal calendar the owner may open."," That is everyone, unless your organization restricts calendars; then it is the owner's direct reports and, for a Department Head, the people in their departments. Administrators and Executives can open everyone's.",[695,708,709,712],{},[671,710,711],{},"What the team calendar shows them:"," pending and approved leave across the organization, or only their own department when your organization hides other departments.",[553,714,715,716,719],{},"A leave the owner cannot see answers ",[600,717,718],{},"404 NOT_FOUND",", the same as an id that does not exist.",[553,721,722,725,726,729,730,733,734,737,738,741],{},[671,723,724],{},"Private leave types"," are redacted unless the owner may see their details: the person themselves, Administrators, Executives, and the Department Head of the person's department, as in the app. For everyone else the leave type appears as ",[600,727,728],{},"\"name\": \"Private\""," and the reason and other free text are ",[600,731,732],{},"null",". The dates still show, so availability stays correct. On ",[600,735,736],{},"GET \u002Fleave-types",", a private type is masked the same way unless the owner is a Department Head, Administrator or Executive; its ",[600,739,740],{},"id"," still books it.",[565,743,745],{"id":744},"find-out-who-is-away","Find out who is away",[747,748,753],"pre",{"className":749,"code":750,"language":751,"meta":752,"style":752},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl \"https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleaves?status=APPROVED&start_date=2026-08-01&end_date=2026-08-31&limit=100\" \\\n  -H \"Authorization: Bearer $BOOKYOURPTO_TOKEN\"\n","bash","",[600,754,755,779],{"__ignoreMap":752},[756,757,760,764,768,772,775],"span",{"class":758,"line":759},"line",1,[756,761,763],{"class":762},"sBMFI","curl",[756,765,767],{"class":766},"sMK4o"," \"",[756,769,771],{"class":770},"sfazB","https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleaves?status=APPROVED&start_date=2026-08-01&end_date=2026-08-31&limit=100",[756,773,774],{"class":766},"\"",[756,776,778],{"class":777},"sTEyZ"," \\\n",[756,780,782,785,787,790,793],{"class":758,"line":781},2,[756,783,784],{"class":770},"  -H",[756,786,767],{"class":766},[756,788,789],{"class":770},"Authorization: Bearer ",[756,791,792],{"class":777},"$BOOKYOURPTO_TOKEN",[756,794,795],{"class":766},"\"\n",[553,797,798,674,801,804,805,808,809,811,812,814,815,818,819,674,822,560],{},[600,799,800],{},"start_date",[600,802,803],{},"end_date"," select leave that ",[671,806,807],{},"overlaps"," the period: leave ending on or after ",[600,810,800],{}," and starting on or before ",[600,813,803],{},". Results are ordered by start date. Filter further with ",[600,816,817],{},"user_id",", ",[600,820,821],{},"status",[600,823,824],{},"leave_type_id",[747,826,830],{"className":827,"code":828,"language":829,"meta":752,"style":752},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"data\": [\n    {\n      \"id\": \"cmlve0hmarsh2026080300\",\n      \"user_id\": \"cmusr0lenafischer000000\",\n      \"leave_type\": { \"id\": \"cmlvt0annual00000000000\", \"name\": \"Annual Leave\", \"code\": \"ANNUAL\", \"color\": \"#3b82f6\", \"is_private\": false },\n      \"status\": \"APPROVED\",\n      \"start_date\": \"2026-08-03\",\n      \"end_date\": \"2026-08-07\",\n      \"start_half\": \"FULL_DAY\",\n      \"end_half\": \"FULL_DAY\",\n      \"total_days\": 5,\n      \"...\": \"more fields\"\n    }\n  ],\n  \"meta\": { \"request_id\": \"...\", \"has_more\": false, \"next_cursor\": null }\n}\n","json",[600,831,832,837,854,860,882,902,1004,1024,1044,1064,1085,1105,1122,1141,1147,1153,1211],{"__ignoreMap":752},[756,833,834],{"class":758,"line":759},[756,835,836],{"class":766},"{\n",[756,838,839,842,846,848,851],{"class":758,"line":781},[756,840,841],{"class":766},"  \"",[756,843,845],{"class":844},"spNyl","data",[756,847,774],{"class":766},[756,849,850],{"class":766},":",[756,852,853],{"class":766}," [\n",[756,855,857],{"class":758,"line":856},3,[756,858,859],{"class":766},"    {\n",[756,861,863,866,868,870,872,874,877,879],{"class":758,"line":862},4,[756,864,865],{"class":766},"      \"",[756,867,740],{"class":762},[756,869,774],{"class":766},[756,871,850],{"class":766},[756,873,767],{"class":766},[756,875,876],{"class":770},"cmlve0hmarsh2026080300",[756,878,774],{"class":766},[756,880,881],{"class":766},",\n",[756,883,885,887,889,891,893,895,898,900],{"class":758,"line":884},5,[756,886,865],{"class":766},[756,888,817],{"class":762},[756,890,774],{"class":766},[756,892,850],{"class":766},[756,894,767],{"class":766},[756,896,897],{"class":770},"cmusr0lenafischer000000",[756,899,774],{"class":766},[756,901,881],{"class":766},[756,903,905,907,910,912,914,917,919,922,924,926,928,931,933,936,938,941,943,945,947,950,952,954,956,958,960,962,964,967,969,971,973,976,978,980,982,985,987,989,991,994,996,998,1001],{"class":758,"line":904},6,[756,906,865],{"class":766},[756,908,909],{"class":762},"leave_type",[756,911,774],{"class":766},[756,913,850],{"class":766},[756,915,916],{"class":766}," {",[756,918,767],{"class":766},[756,920,740],{"class":921},"sbssI",[756,923,774],{"class":766},[756,925,850],{"class":766},[756,927,767],{"class":766},[756,929,930],{"class":770},"cmlvt0annual00000000000",[756,932,774],{"class":766},[756,934,935],{"class":766},",",[756,937,767],{"class":766},[756,939,940],{"class":921},"name",[756,942,774],{"class":766},[756,944,850],{"class":766},[756,946,767],{"class":766},[756,948,949],{"class":770},"Annual Leave",[756,951,774],{"class":766},[756,953,935],{"class":766},[756,955,767],{"class":766},[756,957,600],{"class":921},[756,959,774],{"class":766},[756,961,850],{"class":766},[756,963,767],{"class":766},[756,965,966],{"class":770},"ANNUAL",[756,968,774],{"class":766},[756,970,935],{"class":766},[756,972,767],{"class":766},[756,974,975],{"class":921},"color",[756,977,774],{"class":766},[756,979,850],{"class":766},[756,981,767],{"class":766},[756,983,984],{"class":770},"#3b82f6",[756,986,774],{"class":766},[756,988,935],{"class":766},[756,990,767],{"class":766},[756,992,993],{"class":921},"is_private",[756,995,774],{"class":766},[756,997,850],{"class":766},[756,999,1000],{"class":766}," false",[756,1002,1003],{"class":766}," },\n",[756,1005,1007,1009,1011,1013,1015,1017,1020,1022],{"class":758,"line":1006},7,[756,1008,865],{"class":766},[756,1010,821],{"class":762},[756,1012,774],{"class":766},[756,1014,850],{"class":766},[756,1016,767],{"class":766},[756,1018,1019],{"class":770},"APPROVED",[756,1021,774],{"class":766},[756,1023,881],{"class":766},[756,1025,1027,1029,1031,1033,1035,1037,1040,1042],{"class":758,"line":1026},8,[756,1028,865],{"class":766},[756,1030,800],{"class":762},[756,1032,774],{"class":766},[756,1034,850],{"class":766},[756,1036,767],{"class":766},[756,1038,1039],{"class":770},"2026-08-03",[756,1041,774],{"class":766},[756,1043,881],{"class":766},[756,1045,1047,1049,1051,1053,1055,1057,1060,1062],{"class":758,"line":1046},9,[756,1048,865],{"class":766},[756,1050,803],{"class":762},[756,1052,774],{"class":766},[756,1054,850],{"class":766},[756,1056,767],{"class":766},[756,1058,1059],{"class":770},"2026-08-07",[756,1061,774],{"class":766},[756,1063,881],{"class":766},[756,1065,1067,1069,1072,1074,1076,1078,1081,1083],{"class":758,"line":1066},10,[756,1068,865],{"class":766},[756,1070,1071],{"class":762},"start_half",[756,1073,774],{"class":766},[756,1075,850],{"class":766},[756,1077,767],{"class":766},[756,1079,1080],{"class":770},"FULL_DAY",[756,1082,774],{"class":766},[756,1084,881],{"class":766},[756,1086,1088,1090,1093,1095,1097,1099,1101,1103],{"class":758,"line":1087},11,[756,1089,865],{"class":766},[756,1091,1092],{"class":762},"end_half",[756,1094,774],{"class":766},[756,1096,850],{"class":766},[756,1098,767],{"class":766},[756,1100,1080],{"class":770},[756,1102,774],{"class":766},[756,1104,881],{"class":766},[756,1106,1108,1110,1113,1115,1117,1120],{"class":758,"line":1107},12,[756,1109,865],{"class":766},[756,1111,1112],{"class":762},"total_days",[756,1114,774],{"class":766},[756,1116,850],{"class":766},[756,1118,1119],{"class":921}," 5",[756,1121,881],{"class":766},[756,1123,1125,1127,1130,1132,1134,1136,1139],{"class":758,"line":1124},13,[756,1126,865],{"class":766},[756,1128,1129],{"class":762},"...",[756,1131,774],{"class":766},[756,1133,850],{"class":766},[756,1135,767],{"class":766},[756,1137,1138],{"class":770},"more fields",[756,1140,795],{"class":766},[756,1142,1144],{"class":758,"line":1143},14,[756,1145,1146],{"class":766},"    }\n",[756,1148,1150],{"class":758,"line":1149},15,[756,1151,1152],{"class":766},"  ],\n",[756,1154,1156,1158,1161,1163,1165,1167,1169,1172,1174,1176,1178,1180,1182,1184,1186,1189,1191,1193,1196,1198,1201,1203,1205,1208],{"class":758,"line":1155},16,[756,1157,841],{"class":766},[756,1159,1160],{"class":844},"meta",[756,1162,774],{"class":766},[756,1164,850],{"class":766},[756,1166,916],{"class":766},[756,1168,767],{"class":766},[756,1170,1171],{"class":762},"request_id",[756,1173,774],{"class":766},[756,1175,850],{"class":766},[756,1177,767],{"class":766},[756,1179,1129],{"class":770},[756,1181,774],{"class":766},[756,1183,935],{"class":766},[756,1185,767],{"class":766},[756,1187,1188],{"class":762},"has_more",[756,1190,774],{"class":766},[756,1192,850],{"class":766},[756,1194,1195],{"class":766}," false,",[756,1197,767],{"class":766},[756,1199,1200],{"class":762},"next_cursor",[756,1202,774],{"class":766},[756,1204,850],{"class":766},[756,1206,1207],{"class":766}," null",[756,1209,1210],{"class":766}," }\n",[756,1212,1214],{"class":758,"line":1213},17,[756,1215,1216],{"class":766},"}\n",[553,1218,1219,674,1221,1223,1224,1226,1227,1229,1230,674,1232,1234,1235,1238,1239,1242,1243,818,1246,674,1249,560],{},[600,1220,800],{},[600,1222,803],{}," are calendar days, inclusive. A leave from ",[600,1225,1039],{}," to ",[600,1228,1059],{}," covers both of those days, whatever timezone you read it in. ",[600,1231,1071],{},[600,1233,1092],{}," say whether the first and last day are full days or a ",[600,1236,1237],{},"FIRST_HALF"," \u002F ",[600,1240,1241],{},"SECOND_HALF",". Leave booked in hours has ",[600,1244,1245],{},"start_time",[600,1247,1248],{},"end_time",[600,1250,1251],{},"total_hours",[553,1253,1254,1255,560],{},"Reference: ",[557,1256,1258],{"href":1257},"\u002Fapi\u002Freference#tag\u002Fleaves\u002FGET\u002Fleaves","List leave requests",[565,1260,1262],{"id":1261},"book-leave","Book leave",[747,1264,1266],{"className":749,"code":1265,"language":751,"meta":752,"style":752},"curl -X POST https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleaves \\\n  -H \"Authorization: Bearer $BOOKYOURPTO_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Idempotency-Key: 4a7d2c19-8e3f-4b60-a2d5-9c1e7f3b8a46\" \\\n  -d '{\n    \"leave_type_id\": \"cmlvt0annual00000000000\",\n    \"start_date\": \"2026-08-03\",\n    \"end_date\": \"2026-08-07\",\n    \"reason\": \"Family trip to Tofino\"\n  }'\n",[600,1267,1268,1283,1297,1310,1323,1333,1338,1343,1348,1353],{"__ignoreMap":752},[756,1269,1270,1272,1275,1278,1281],{"class":758,"line":759},[756,1271,763],{"class":762},[756,1273,1274],{"class":770}," -X",[756,1276,1277],{"class":770}," POST",[756,1279,1280],{"class":770}," https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleaves",[756,1282,778],{"class":777},[756,1284,1285,1287,1289,1291,1293,1295],{"class":758,"line":781},[756,1286,784],{"class":770},[756,1288,767],{"class":766},[756,1290,789],{"class":770},[756,1292,792],{"class":777},[756,1294,774],{"class":766},[756,1296,778],{"class":777},[756,1298,1299,1301,1303,1306,1308],{"class":758,"line":856},[756,1300,784],{"class":770},[756,1302,767],{"class":766},[756,1304,1305],{"class":770},"Content-Type: application\u002Fjson",[756,1307,774],{"class":766},[756,1309,778],{"class":777},[756,1311,1312,1314,1316,1319,1321],{"class":758,"line":862},[756,1313,784],{"class":770},[756,1315,767],{"class":766},[756,1317,1318],{"class":770},"Idempotency-Key: 4a7d2c19-8e3f-4b60-a2d5-9c1e7f3b8a46",[756,1320,774],{"class":766},[756,1322,778],{"class":777},[756,1324,1325,1328,1331],{"class":758,"line":884},[756,1326,1327],{"class":770},"  -d",[756,1329,1330],{"class":766}," '",[756,1332,836],{"class":770},[756,1334,1335],{"class":758,"line":904},[756,1336,1337],{"class":770},"    \"leave_type_id\": \"cmlvt0annual00000000000\",\n",[756,1339,1340],{"class":758,"line":1006},[756,1341,1342],{"class":770},"    \"start_date\": \"2026-08-03\",\n",[756,1344,1345],{"class":758,"line":1026},[756,1346,1347],{"class":770},"    \"end_date\": \"2026-08-07\",\n",[756,1349,1350],{"class":758,"line":1046},[756,1351,1352],{"class":770},"    \"reason\": \"Family trip to Tofino\"\n",[756,1354,1355,1358],{"class":758,"line":1066},[756,1356,1357],{"class":770},"  }",[756,1359,1360],{"class":766},"'\n",[692,1362,1363,1369,1391,1394,1401,1415],{},[695,1364,1365,1366,1368],{},"Without ",[600,1367,817],{}," the leave is for the token's owner. Booking for someone else needs an owner who is an Administrator or Executive, or that person's Department Head.",[695,1370,1371,1372,1374,1375,1226,1377,1374,1379,1381,1382,674,1384,1386,1387,1390],{},"Half days: set ",[600,1373,1071],{}," or ",[600,1376,1092],{},[600,1378,1237],{},[600,1380,1241],{},", where the leave type allows half days. For leave in hours on a single day, send ",[600,1383,1245],{},[600,1385,1248],{}," as ",[600,1388,1389],{},"HH:MM","; it is priced against the person's schedule.",[695,1392,1393],{},"Weekends, the person's public holidays and half days are taken out of the day count. Minimum notice is counted from today on the person's own calendar.",[695,1395,1396,1397,1400],{},"Overlapping requests, locked dates, insufficient balance and too little notice are refused with ",[600,1398,1399],{},"422 VALIDATION_FAILED",", and the message says why. Show it to the person rather than retrying.",[695,1402,1403,1404,1407,1408,1411,1412,1414],{},"The answer is ",[600,1405,1406],{},"201"," with the new request. It is ",[600,1409,1410],{},"PENDING"," when its type needs approval, and ",[600,1413,1019],{}," straight away when the type needs none, when the person is an Executive, or when it is booked for them by an Administrator, an Executive or the Department Head of their department.",[695,1416,1417,1418,1421],{},"It raises ",[600,1419,1420],{},"leave.requested",", whatever the status.",[553,1423,1424,1425,1427,1428,1431,1432,818,1435,818,1438,818,1441,674,1444,560],{},"Get the ",[600,1426,824],{}," from ",[600,1429,1430],{},"GET \u002Fleave-types?active=true",", which also returns each type's rules: ",[600,1433,1434],{},"allow_half_days",[600,1436,1437],{},"allow_hourly",[600,1439,1440],{},"min_days_notice",[600,1442,1443],{},"max_days_per_request",[600,1445,1446],{},"requires_approval",[553,1448,1254,1449,818,1453,560],{},[557,1450,1452],{"href":1451},"\u002Fapi\u002Freference#tag\u002Fleaves\u002FPOST\u002Fleaves","Request leave",[557,1454,1456],{"href":1455},"\u002Fapi\u002Freference#tag\u002Fleave-types\u002FGET\u002Fleave-types","List leave types",[565,1458,1460],{"id":1459},"cancel-leave","Cancel leave",[747,1462,1464],{"className":749,"code":1463,"language":751,"meta":752,"style":752},"curl -X POST https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleaves\u002Fcmlve0hmarsh2026080300\u002Fcancel \\\n  -H \"Authorization: Bearer $BOOKYOURPTO_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"reason\": \"Trip postponed to September.\" }'\n",[600,1465,1466,1479,1493,1505],{"__ignoreMap":752},[756,1467,1468,1470,1472,1474,1477],{"class":758,"line":759},[756,1469,763],{"class":762},[756,1471,1274],{"class":770},[756,1473,1277],{"class":770},[756,1475,1476],{"class":770}," https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleaves\u002Fcmlve0hmarsh2026080300\u002Fcancel",[756,1478,778],{"class":777},[756,1480,1481,1483,1485,1487,1489,1491],{"class":758,"line":781},[756,1482,784],{"class":770},[756,1484,767],{"class":766},[756,1486,789],{"class":770},[756,1488,792],{"class":777},[756,1490,774],{"class":766},[756,1492,778],{"class":777},[756,1494,1495,1497,1499,1501,1503],{"class":758,"line":856},[756,1496,784],{"class":770},[756,1498,767],{"class":766},[756,1500,1305],{"class":770},[756,1502,774],{"class":766},[756,1504,778],{"class":777},[756,1506,1507,1509,1511,1514],{"class":758,"line":862},[756,1508,1327],{"class":770},[756,1510,1330],{"class":766},[756,1512,1513],{"class":770},"{ \"reason\": \"Trip postponed to September.\" }",[756,1515,1360],{"class":766},[553,1517,1518],{},"What happens depends on who asks and on the leave's state:",[570,1520,1521,1534],{},[573,1522,1523],{},[576,1524,1525,1528,1531],{},[579,1526,1527],{},"Owner",[579,1529,1530],{},"Pending leave",[579,1532,1533],{},"Approved leave",[589,1535,1536,1561,1571],{},[576,1537,1538,1541,1548],{},[594,1539,1540],{},"The person whose leave it is",[594,1542,1543,1544,1547],{},"Withdrawn (",[600,1545,1546],{},"CANCELLED","), until it starts",[594,1549,1550,1551,1554,1555,818,1557,1560],{},"A ",[671,1552,1553],{},"cancellation request"," is filed: the leave stays ",[600,1556,1019],{},[600,1558,1559],{},"cancellation_requested_at"," is set, and an approver decides",[576,1562,1563,1566,1569],{},[594,1564,1565],{},"Their Department Head",[594,1567,1568],{},"Cancelled",[594,1570,1568],{},[576,1572,1573,1576,1578],{},[594,1574,1575],{},"Administrator or Executive",[594,1577,1568],{},[594,1579,1568],{},[553,1581,1582,1583,1586,1587,560],{},"A direct cancellation raises ",[600,1584,1585],{},"leave.cancelled","; a cancellation request raises ",[600,1588,1589],{},"leave.cancellation_requested",[553,1591,1254,1592,560],{},[557,1593,1595],{"href":1594},"\u002Fapi\u002Freference#tag\u002Fleaves\u002FPOST\u002Fleaves\u002F%7Bid%7D\u002Fcancel","Cancel a leave",[565,1597,1599],{"id":1598},"approve-or-reject","Approve or reject",[747,1601,1603],{"className":749,"code":1602,"language":751,"meta":752,"style":752},"curl -X POST https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleaves\u002Fcmlve0hmarsh2026080300\u002Fapprove \\\n  -H \"Authorization: Bearer $BOOKYOURPTO_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"comment\": \"Enjoy the trip.\" }'\n",[600,1604,1605,1618,1632,1644],{"__ignoreMap":752},[756,1606,1607,1609,1611,1613,1616],{"class":758,"line":759},[756,1608,763],{"class":762},[756,1610,1274],{"class":770},[756,1612,1277],{"class":770},[756,1614,1615],{"class":770}," https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleaves\u002Fcmlve0hmarsh2026080300\u002Fapprove",[756,1617,778],{"class":777},[756,1619,1620,1622,1624,1626,1628,1630],{"class":758,"line":781},[756,1621,784],{"class":770},[756,1623,767],{"class":766},[756,1625,789],{"class":770},[756,1627,792],{"class":777},[756,1629,774],{"class":766},[756,1631,778],{"class":777},[756,1633,1634,1636,1638,1640,1642],{"class":758,"line":856},[756,1635,784],{"class":770},[756,1637,767],{"class":766},[756,1639,1305],{"class":770},[756,1641,774],{"class":766},[756,1643,778],{"class":777},[756,1645,1646,1648,1650,1653],{"class":758,"line":862},[756,1647,1327],{"class":770},[756,1649,1330],{"class":766},[756,1651,1652],{"class":770},"{ \"comment\": \"Enjoy the trip.\" }",[756,1654,1360],{"class":766},[553,1656,1657,674,1660,1663,1664,1667],{},[600,1658,1659],{},"\u002Fapprove",[600,1661,1662],{},"\u002Freject"," (with an optional ",[600,1665,1666],{},"reason",") work on two things:",[692,1669,1670,1685],{},[695,1671,1672,1673,1676,1677,1680,1681,1684],{},"a ",[671,1674,1675],{},"pending request",": approving raises ",[600,1678,1679],{},"leave.approved",", rejecting raises ",[600,1682,1683],{},"leave.rejected",";",[695,1686,1687,1688,1691,1692,1694,1695,560],{},"an ",[671,1689,1690],{},"approved leave with a cancellation request",": approving the cancellation cancels the leave and raises ",[600,1693,1585],{},"; rejecting it keeps the leave ",[600,1696,1019],{},[553,1698,1699],{},"Rules:",[692,1701,1702,1708,1714,1720,1725],{},[695,1703,1704,1705,1707],{},"Needs ",[600,1706,639],{},", so the owner must be a Department Head or above.",[695,1709,1710,1711,560],{},"Nobody decides their own leave, whatever their role: ",[600,1712,1713],{},"403 FORBIDDEN",[695,1715,1716,1717,1719],{},"A Department Head decides only within the departments they head or manage. Outside them the answer is ",[600,1718,1713],{},", checked before anything else, so the response does not reveal whether the request was already decided.",[695,1721,1722,1723,560],{},"A leave in any other state, for example already approved with no cancellation request, answers ",[600,1724,1399],{},[695,1726,1727],{},"The person is notified and their connected calendars are updated, as in the app.",[553,1729,1730,1731,1734,1735,674,1737,1739],{},"To build an approval queue, list ",[600,1732,1733],{},"GET \u002Fleaves?status=PENDING"," with a Department Head's or Administrator's token. Subscribe to ",[600,1736,1420],{},[600,1738,1589],{}," to hear about new items as they arrive.",[553,1741,1254,1742,818,1746,560],{},[557,1743,1745],{"href":1744},"\u002Fapi\u002Freference#tag\u002Fleaves\u002FPOST\u002Fleaves\u002F%7Bid%7D\u002Fapprove","Approve",[557,1747,1749],{"href":1748},"\u002Fapi\u002Freference#tag\u002Fleaves\u002FPOST\u002Fleaves\u002F%7Bid%7D\u002Freject","Reject",[565,1751,1753],{"id":1752},"read-a-balance","Read a balance",[747,1755,1757],{"className":749,"code":1756,"language":751,"meta":752,"style":752},"curl \"https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleave-balances?user_id=cmusr0lenafischer000000&year=2026\" \\\n  -H \"Authorization: Bearer $BOOKYOURPTO_TOKEN\"\n",[600,1758,1759,1772],{"__ignoreMap":752},[756,1760,1761,1763,1765,1768,1770],{"class":758,"line":759},[756,1762,763],{"class":762},[756,1764,767],{"class":766},[756,1766,1767],{"class":770},"https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fleave-balances?user_id=cmusr0lenafischer000000&year=2026",[756,1769,774],{"class":766},[756,1771,778],{"class":777},[756,1773,1774,1776,1778,1780,1782],{"class":758,"line":781},[756,1775,784],{"class":770},[756,1777,767],{"class":766},[756,1779,789],{"class":770},[756,1781,792],{"class":777},[756,1783,795],{"class":766},[553,1785,1786,1787,1790,1791,1794,1795,1798,1799,1802,1803,674,1806,1809],{},"The answer is one object with the figures the app's calendar shows for that fiscal year: an ",[600,1788,1789],{},"annual"," and a ",[600,1792,1793],{},"sick"," summary (allowance, used, remaining, plus base allowance and carry-over for annual), a ",[600,1796,1797],{},"leave_types"," list per deductible type, and ",[600,1800,1801],{},"non_deductible"," for types that do not draw from a balance. ",[600,1804,1805],{},"fiscal_period_start",[600,1807,1808],{},"fiscal_period_end"," give the year's boundaries.",[692,1811,1812,1821,1826],{},[695,1813,1365,1814,1816,1817,1820],{},[600,1815,817],{},", the owner's own balance. Without ",[600,1818,1819],{},"year",", the current fiscal year on the person's calendar.",[695,1822,1823,1824,560],{},"Another person's balance follows the calendar rule above. Anyone the owner may not see answers ",[600,1825,718],{},[695,1827,1828,1829,1832,1833,560],{},"This endpoint is not paginated and returns one person per request. To export balances for everyone, walk ",[600,1830,1831],{},"GET \u002Fusers"," and request each person's balance, keeping within the ",[557,1834,1835],{"href":181},"rate limits",[553,1837,1254,1838,560],{},[557,1839,1841],{"href":1840},"\u002Fapi\u002Freference#tag\u002Fleave-balances\u002FGET\u002Fleave-balances","Get a leave balance",[565,1843,1845],{"id":1844},"holidays-and-locked-dates","Holidays and locked dates",[747,1847,1849],{"className":749,"code":1848,"language":751,"meta":752,"style":752},"# The organization's holidays for a year\ncurl \"https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fpublic-holidays?year=2026\" \\\n  -H \"Authorization: Bearer $BOOKYOURPTO_TOKEN\"\n\n# One person's holiday calendar (their holiday country and overrides)\ncurl \"https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fpublic-holidays?year=2026&user_id=cmusr0lenafischer000000\" \\\n  -H \"Authorization: Bearer $BOOKYOURPTO_TOKEN\"\n",[600,1850,1851,1857,1870,1882,1888,1893,1906],{"__ignoreMap":752},[756,1852,1853],{"class":758,"line":759},[756,1854,1856],{"class":1855},"sHwdD","# The organization's holidays for a year\n",[756,1858,1859,1861,1863,1866,1868],{"class":758,"line":781},[756,1860,763],{"class":762},[756,1862,767],{"class":766},[756,1864,1865],{"class":770},"https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fpublic-holidays?year=2026",[756,1867,774],{"class":766},[756,1869,778],{"class":777},[756,1871,1872,1874,1876,1878,1880],{"class":758,"line":856},[756,1873,784],{"class":770},[756,1875,767],{"class":766},[756,1877,789],{"class":770},[756,1879,792],{"class":777},[756,1881,795],{"class":766},[756,1883,1884],{"class":758,"line":862},[756,1885,1887],{"emptyLinePlaceholder":1886},true,"\n",[756,1889,1890],{"class":758,"line":884},[756,1891,1892],{"class":1855},"# One person's holiday calendar (their holiday country and overrides)\n",[756,1894,1895,1897,1899,1902,1904],{"class":758,"line":904},[756,1896,763],{"class":762},[756,1898,767],{"class":766},[756,1900,1901],{"class":770},"https:\u002F\u002Fapp.bookyourpto.com\u002Fapi\u002Fv1\u002Fpublic-holidays?year=2026&user_id=cmusr0lenafischer000000",[756,1903,774],{"class":766},[756,1905,778],{"class":777},[756,1907,1908,1910,1912,1914,1916],{"class":758,"line":1006},[756,1909,784],{"class":770},[756,1911,767],{"class":766},[756,1913,789],{"class":770},[756,1915,792],{"class":777},[756,1917,795],{"class":766},[692,1919,1920,1941,1947],{},[695,1921,1922,1923,1926,1927,1930,1931,818,1934,1937,1938,560],{},"The whole year comes back in one page. Each holiday's ",[600,1924,1925],{},"date"," is a calendar day; ",[600,1928,1929],{},"source"," says where it came from: ",[600,1932,1933],{},"organization",[600,1935,1936],{},"personal_country"," (the person's own holiday country) or ",[600,1939,1940],{},"personal_override",[695,1942,1943,1944,1946],{},"With ",[600,1945,817],{},", you get that person's calendar when the owner may see it: the person themselves, Administrators, Executives and their Department Head. Anyone else gets the organization's holidays.",[695,1948,1949,1952,1953,818,1956,818,1959,1962,1963,674,1965,560],{},[600,1950,1951],{},"GET \u002Flocked-dates"," lists periods when leave cannot be booked, for everyone, for some departments or for some people (",[600,1954,1955],{},"scope",[600,1957,1958],{},"department_ids",[600,1960,1961],{},"user_ids","). Filter with ",[600,1964,800],{},[600,1966,803],{},[553,1968,1254,1969,560],{},[557,1970,1972],{"href":1971},"\u002Fapi\u002Freference#tag\u002Fholidays","Holidays",[565,1974,1976],{"id":1975},"gotchas","Gotchas",[692,1978,1979,1992,2001,2007,2013],{},[695,1980,1981,678,1984,1987,1988,560],{},[671,1982,1983],{},"Do not convert calendar days through a timezone.",[600,1985,1986],{},"2026-07-01"," is July 1 for everyone. Parsing it as a timestamp in a timezone west of UTC turns it into June 30. See ",[557,1989,1991],{"href":1990},"\u002Fapi\u002Frequests-and-responses#dates-and-times","Dates and times",[695,1993,1994,2000],{},[671,1995,1550,1996,1999],{},[600,1997,1998],{},"422"," on booking is an answer, not a fault."," It carries the reason the app would show: not enough balance, too little notice, an overlap or a locked date.",[695,2002,2003,2006],{},[671,2004,2005],{},"Leave booked for someone else is usually approved at once."," Booking for another person as an Administrator, an Executive or their Department Head creates the leave already approved, as in the app.",[695,2008,2009,2012],{},[671,2010,2011],{},"Your own requests cannot be decided through the API",", even by an Executive. Use a token owned by the approver.",[695,2014,2015,2018],{},[671,2016,2017],{},"Every page of a leave list is recorded as an export"," in the audit log. Use webhooks for change notifications rather than polling.",[2020,2021,2022],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":752,"searchDepth":759,"depth":781,"links":2024},[2025,2026,2027,2028,2029,2030,2031,2032,2033],{"id":567,"depth":781,"text":568},{"id":686,"depth":781,"text":687},{"id":744,"depth":781,"text":745},{"id":1261,"depth":781,"text":1262},{"id":1459,"depth":781,"text":1460},{"id":1598,"depth":781,"text":1599},{"id":1752,"depth":781,"text":1753},{"id":1844,"depth":781,"text":1845},{"id":1975,"depth":781,"text":1976},"Read leave types, requests, balances, public holidays and locked dates, book and cancel leave, and approve or reject requests through the API, with the visibility rules that apply.","md",null,{},{"icon":198},{"title":195,"description":2034},"FGR1DYiB_jNUAZnoBepKXO4svf94os28aM2Q7OLBJD8",[2042,2044],{"title":190,"path":191,"stem":192,"description":2043,"icon":193,"children":-1},"Sync the employee directory, add and update people, manage departments and teams, and read HR records such as training, equipment, benefits and compensation through the API.",{"title":200,"path":201,"stem":202,"description":2045,"icon":203,"children":-1},"Export time entries and timesheets for payroll, record and correct hours, approve time, and read projects, tasks, clients and shift schedules through the API.",1791906545999]