Fivexer Leave API

The leave API from Fivexer — 10 operation(s) for leave.

Operations 11

GET /v1/leave/policy-sets List leave policy sets #
PUT /v1/leave/policy-sets Create or update leave policy sets #
DELETE /v1/leave/policy-sets/{id} Archive a leave policy set #
GET /v1/leave/packs List leave packs #
POST /v1/leave/packs/{id}/apply Apply a leave pack #
GET /v1/leave/rules/explain Explain the leave rules for a type #
GET /v1/leave/notices List year-end leave notices #
GET /v1/leave/carry-requests List carry-over requests #
POST /v1/leave/notices/{id}/told Record that a manager told the person #
POST /v1/leave/carry-requests/{id}/approve Approve a carry-over request #
POST /v1/leave/carry-requests/{id}/deny Decline a carry-over request #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/5xer-com:5xer-com-leave-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

5xer-com-leave-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Fivexer Platform Leave API
  description: 'Routing-as-a-service: create workers and tasks, the platform matches continuously. `/v1` authenticates with a workspace API key (`Authorization: Bearer sk_...`); `/console` with a session token from `/auth`; `/admin` with the operator token.'
  version: 0.1.0
servers:
- url: https://5xer.com
  description: This deployment
tags:
- name: leave
paths:
  /v1/leave/policy-sets:
    get:
      summary: List leave policy sets
      tags:
      - leave
      parameters:
      - schema:
          type: string
          maxLength: 40
        in: query
        name: status
        required: false
      security:
      - apiKey: []
      responses:
        '200':
          description: Default Response
      operationId: getV1LeavePolicySets
      x-operation-id-source: derived
    put:
      summary: Create or update leave policy sets
      tags:
      - leave
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - sets
              properties:
                sets:
                  type: array
                  minItems: 1
                  maxItems: 200
                  items:
                    type: object
                    additionalProperties: false
                    required:
                    - name
                    - scopeKind
                    - rules
                    properties:
                      id:
                        type: string
                        maxLength: 64
                      revision:
                        type: integer
                        minimum: 0
                      name:
                        type: string
                        minLength: 1
                        maxLength: 120
                      scopeKind:
                        type: string
                        enum:
                        - jurisdiction
                        - workspace
                        - site
                        - team
                        - agreement
                      scopeIds:
                        type: array
                        maxItems: 500
                        items:
                          type: string
                          minLength: 1
                          maxLength: 128
                      leaveTypeId:
                        type:
                        - string
                        - 'null'
                        maxLength: 64
                      category:
                        type:
                        - string
                        - 'null'
                        enum:
                        - annual
                        - sick
                        - parental
                        - care
                        - unpaid
                        - toil
                        - other
                        - null
                      rules:
                        type: object
                      effectiveFrom:
                        type:
                        - string
                        - 'null'
                        pattern: ^\d{4}-\d{2}-\d{2}$
                      effectiveTo:
                        type:
                        - string
                        - 'null'
                        pattern: ^\d{4}-\d{2}-\d{2}$
                      priority:
                        type: integer
                        minimum: 0
                        maximum: 1000
                      status:
                        type: string
                        enum:
                        - active
                        - draft
                        - archived
      security:
      - apiKey: []
      responses:
        '200':
          description: Default Response
      operationId: putV1LeavePolicySets
      x-operation-id-source: derived
  /v1/leave/policy-sets/{id}:
    delete:
      summary: Archive a leave policy set
      tags:
      - leave
      parameters:
      - schema:
          type: integer
          minimum: 0
        in: query
        name: revision
        required: true
      - schema:
          type: string
        in: path
        name: id
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: Default Response
      operationId: deleteV1LeavePolicySetsById
      x-operation-id-source: derived
  /v1/leave/packs:
    get:
      summary: List leave packs
      tags:
      - leave
      security:
      - apiKey: []
      responses:
        '200':
          description: Default Response
      operationId: getV1LeavePacks
      x-operation-id-source: derived
  /v1/leave/packs/{id}/apply:
    post:
      summary: Apply a leave pack
      tags:
      - leave
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
      operationId: postV1LeavePacksByIdApply
      x-operation-id-source: derived
  /v1/leave/rules/explain:
    get:
      summary: Explain the leave rules for a type
      tags:
      - leave
      parameters:
      - schema:
          type: string
          minLength: 1
          maxLength: 64
        in: query
        name: leaveTypeId
        required: true
      - schema:
          type: string
          minLength: 1
          maxLength: 128
        in: query
        name: workerId
        required: false
      - schema:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        in: query
        name: onDate
        required: false
      security:
      - apiKey: []
      responses:
        '200':
          description: Default Response
      operationId: getV1LeaveRulesExplain
      x-operation-id-source: derived
  /v1/leave/notices:
    get:
      summary: List year-end leave notices
      tags:
      - leave
      description: 'Who was told how much leave is left and by when, on which channels, and whether they opened it. Each notice has a `status`: `sent`, `unsent` (nobody got it yet), or `due` — due within the lead days with leave that would go, but not written yet (no `id`). The first page starts with the `due` ones, soonest first, at most `limit` of them, and `dueTotal` counts them all; ask with `workerId` for one person. With `held=true`, the expiries that did not happen because nobody was told. With `askManager=true`, the notices a manager was asked to give by hand (the person has no app login or email), each with `days` in the person’s own working week.'
      parameters:
      - schema:
          type: string
          minLength: 1
          maxLength: 128
        in: query
        name: workerId
        required: false
      - schema:
          type: string
          minLength: 1
          maxLength: 64
        in: query
        name: leaveTypeId
        required: false
      - schema:
          type: boolean
        in: query
        name: held
        required: false
      - schema:
          type: boolean
        in: query
        name: askManager
        required: false
      - schema:
          type: string
          maxLength: 200
        in: query
        name: cursor
        required: false
      - schema:
          type: integer
          minimum: 1
          maximum: 200
        in: query
        name: limit
        required: false
      security:
      - apiKey: []
      responses:
        '200':
          description: Default Response
      operationId: getV1LeaveNotices
      x-operation-id-source: derived
  /v1/leave/carry-requests:
    get:
      summary: List carry-over requests
      tags:
      - leave
      description: Requests from workers to carry leave over into next year, oldest first. `status` is a comma list of pending, approved and denied. A request still pending on the last day of its leave year is declined.
      parameters:
      - schema:
          type: string
          maxLength: 40
        in: query
        name: status
        required: false
      - schema:
          type: string
          minLength: 1
          maxLength: 128
        in: query
        name: workerId
        required: false
      - schema:
          type: string
          maxLength: 200
        in: query
        name: cursor
        required: false
      - schema:
          type: integer
          minimum: 1
          maximum: 200
        in: query
        name: limit
        required: false
      security:
      - apiKey: []
      responses:
        '200':
          description: Default Response
      operationId: getV1LeaveCarryRequests
      x-operation-id-source: derived
  /v1/leave/notices/{id}/told:
    post:
      summary: Record that a manager told the person
      tags:
      - leave
      description: 'For a person no notice can reach (no app login or email), once their manager was asked: the manager told them, so the notice counts as sent, on channel `manager`, now. Where the law lets leave expire only after a notice, the expiry then goes ahead at the next pass. Audited. 409 `notice_already_sent` when it already went out, `notice_not_asked` when no manager was asked to pass it on.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties: {}
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
      operationId: postV1LeaveNoticesByIdTold
      x-operation-id-source: derived
  /v1/leave/carry-requests/{id}/approve:
    post:
      summary: Approve a carry-over request
      tags:
      - leave
      description: The approval is the written agreement on record. Refused with 409 `carry_year_closed` on or after the last day of the leave year the request is about.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                note:
                  type:
                  - string
                  - 'null'
                  maxLength: 512
                revision:
                  type: integer
                  minimum: 0
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
      operationId: postV1LeaveCarryRequestsByIdApprove
      x-operation-id-source: derived
  /v1/leave/carry-requests/{id}/deny:
    post:
      summary: Decline a carry-over request
      tags:
      - leave
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                note:
                  type:
                  - string
                  - 'null'
                  maxLength: 512
                revision:
                  type: integer
                  minimum: 0
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      responses:
        '200':
          description: Default Response
      operationId: postV1LeaveCarryRequestsByIdDeny
      x-operation-id-source: derived
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Workspace API key (sk_test_/sk_live_)
    session:
      type: http
      scheme: bearer
      description: Console session token (st_...)
    adminToken:
      type: http
      scheme: bearer
      description: Operator ADMIN_TOKEN
    workerToken:
      type: http
      scheme: bearer
      description: Worker session token (wt_...)
    supervisorToken:
      type: http
      scheme: bearer
      description: Supervisor session token (sv_...), scoped to one workspace and optionally one team