KLOKIN Leave API

The Leave API from KLOKIN — 12 operation(s) for leave.

GitHub OpenAPI

Operations 14

GET /leave/types List leave types #
GET /leave/requests List leave requests #
POST /leave/requests Submit a leave request (on behalf of an employee) #
POST /leave/requests/{id}/approve Approve a leave request #
POST /leave/requests/{id}/reject Reject a leave request #
POST /leave/requests/{id}/cancel Cancel a leave request #
GET /leave/balances Annual leave balances computed per the Labour Code #
GET /leave/employees/{employeeId} One employee's leave profile, balance by working year and corrections #
PUT /leave/profiles/{employeeId} Set the employee's leave profile #
POST /leave/adjustments Add a correction to an employee's annual leave balance #
DELETE /leave/adjustments/{id} Remove a correction #
GET /my/leave/balance Current employee's own annual leave balance (portal token) #
GET /my/leave Current employee's own leave requests (portal token) #
POST /my/leave Submit own leave request (portal token) #

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/klokin-io:klokin-io-leave-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

klokin-io-leave-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Klokin Leave API
  version: 1.0.0
  description: 'REST API for the Klokin employee time-tracking platform.


    ## Authentication

    Most endpoints accept a Bearer token in the `Authorization` header — either

    a JWT obtained from `POST /v1/auth/login`, or an organization API key

    (`klkn_…`) created on the "API raktai" admin page. API keys carry an

    explicit permission list; JWT users get their role''s permissions.


    ## Organization context

    Multi-tenant requests resolve the organization from the `X-Organization`

    header (organization domain). Super-admin JWTs may operate across

    organizations; everyone else is scoped to their own.


    ## Errors

    Errors return `{ "error": "" }` (messages are in Lithuanian) and,

    where applicable, a stable machine-readable `code` such as

    `PLAN_LIMIT_REACHED`, `PLAN_FEATURE_REQUIRED` or `RATE_LIMIT_EXCEEDED`.


    ## Rate limiting

    API-key requests are rate limited per minute by the organization''s plan:

    STARTAS 30, VERSLAS 60, PAŽENGĘS 300, ĮMONĖ unlimited. Every response

    carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`

    (seconds until the window resets). Exceeding the limit returns `429` with a

    `Retry-After` header and `code: RATE_LIMIT_EXCEEDED`. The admin dashboard

    (JWT) is not subject to these limits.


    ## Versioning

    The API is versioned in the path (`/v1`). Backwards-incompatible changes

    ship under a new version; additive changes may appear within `/v1`.'
servers:
- url: /v1
security:
- bearerAuth: []
tags:
- name: Leave
paths:
  /leave/types:
    get:
      tags:
      - Leave
      summary: List leave types
      description: Requires `leave.read`.
      responses:
        '200':
          description: Leave types
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    name:
                      type: string
                    code:
                      type: string
                      description: LT tabelis code
                    isPaid:
                      type: boolean
                    requiresApproval:
                      type: boolean
      operationId: getLeaveTypes
      x-operation-id-source: derived
  /leave/requests:
    get:
      tags:
      - Leave
      summary: List leave requests
      description: Requires `leave.read`.
      parameters:
      - name: status
        in: query
        schema:
          type: string
          enum:
          - pending
          - approved
          - rejected
          - cancelled
      - name: employeeId
        in: query
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Leave requests
      operationId: getLeaveRequests
      x-operation-id-source: derived
    post:
      tags:
      - Leave
      summary: Submit a leave request (on behalf of an employee)
      description: Requires `leave.request`. Working days are computed from the calendar.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - employeeId
              - leaveTypeId
              - startDate
              - endDate
              properties:
                employeeId:
                  type: string
                  format: uuid
                leaveTypeId:
                  type: string
                  format: uuid
                startDate:
                  type: string
                  format: date
                endDate:
                  type: string
                  format: date
                comment:
                  type: string
      responses:
        '201':
          description: Created
      operationId: postLeaveRequests
      x-operation-id-source: derived
  /leave/requests/{id}/approve:
    post:
      tags:
      - Leave
      summary: Approve a leave request
      description: 'Requires `leave.approve`. Notifies the employee. Over the annual leave balance or the parent days allowance it answers 409 `LEAVE_LIMIT`; send `{ confirmOverBalance: true }` to approve anyway (audited).'
      parameters:
      - $ref: '#/components/parameters/IdPath'
      responses:
        '200':
          description: Approved
      operationId: postLeaveRequestsByIdApprove
      x-operation-id-source: derived
  /leave/requests/{id}/reject:
    post:
      tags:
      - Leave
      summary: Reject a leave request
      description: Requires `leave.approve`.
      parameters:
      - $ref: '#/components/parameters/IdPath'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
      responses:
        '200':
          description: Rejected
      operationId: postLeaveRequestsByIdReject
      x-operation-id-source: derived
  /leave/requests/{id}/cancel:
    post:
      tags:
      - Leave
      summary: Cancel a leave request
      parameters:
      - $ref: '#/components/parameters/IdPath'
      responses:
        '200':
          description: Cancelled
      operationId: postLeaveRequestsByIdCancel
      x-operation-id-source: derived
  /leave/balances:
    get:
      tags:
      - Leave
      summary: Annual leave balances computed per the Labour Code
      description: 'Requires `leave.read`. Per employee in scope: yearly length (DK 126, 138; Government resolution No. 496), accrual in the working year (DK 127 str. 2–4 d.), approved and pending leave, corrections, days past the lapse date (DK 127 str. 5 d.; reported only, never written off automatically) and what is still available. `longPartTaken`: a part of at least 10 working days in this working year (DK 128 str. 1 d.).'
      parameters:
      - name: asOf
        in: query
        schema:
          type: string
          format: date
      responses:
        '200':
          description: '{ asOf, minLongPartDays, balances[] }'
      operationId: getLeaveBalances
      x-operation-id-source: derived
  /leave/employees/{employeeId}:
    get:
      tags:
      - Leave
      summary: One employee's leave profile, balance by working year and corrections
      parameters:
      - name: employeeId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: asOf
        in: query
        schema:
          type: string
          format: date
      responses:
        '200':
          description: Leave detail
      operationId: getLeaveEmployeesByEmployeeId
      x-operation-id-source: derived
  /leave/profiles/{employeeId}:
    put:
      tags:
      - Leave
      summary: Set the employee's leave profile
      description: Requires `leave.manage`. Setting or clearing a sensitive extended-leave basis (single_parent, disabled) also requires `protected_status.manage`.
      parameters:
      - name: employeeId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workWeek:
                  type: string
                  enum:
                  - five
                  - six
                  - other
                extendedBasis:
                  type: string
                  nullable: true
                  enum:
                  - single_parent
                  - disabled
                  - category
                extendedDays:
                  type: number
                  nullable: true
                  description: '''category'': days from the annex of resolution 496'
                additionalBasis:
                  type: string
                  enum:
                  - none
                  - seniority
                  - conditions
                  - mobile
                conditionsDays:
                  type: integer
                  nullable: true
                  minimum: 1
                  maximum: 5
                preferAdditional:
                  type: boolean
                contractExtraDays:
                  type: number
                serviceStart:
                  type: string
                  format: date
                  nullable: true
                openingDate:
                  type: string
                  format: date
                openingDays:
                  type: number
                parentDaysPerMonth:
                  type: integer
                  nullable: true
                  minimum: 0
                  maximum: 2
                parentDaysQuarterly:
                  type: boolean
      responses:
        '200':
          description: Updated leave detail
      operationId: putLeaveProfilesByEmployeeId
      x-operation-id-source: derived
  /leave/adjustments:
    post:
      tags:
      - Leave
      summary: Add a correction to an employee's annual leave balance
      description: Requires `leave.manage`. Negative days lower the balance.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - employeeId
              - date
              - days
              - reason
              properties:
                employeeId:
                  type: string
                  format: uuid
                date:
                  type: string
                  format: date
                days:
                  type: number
                reason:
                  type: string
      responses:
        '201':
          description: Created
      operationId: postLeaveAdjustments
      x-operation-id-source: derived
  /leave/adjustments/{id}:
    delete:
      tags:
      - Leave
      summary: Remove a correction
      parameters:
      - $ref: '#/components/parameters/IdPath'
      responses:
        '200':
          description: Removed
      operationId: deleteLeaveAdjustmentsById
      x-operation-id-source: derived
  /my/leave/balance:
    get:
      tags:
      - Leave
      summary: Current employee's own annual leave balance (portal token)
      responses:
        '200':
          description: Balance
      operationId: getMyLeaveBalance
      x-operation-id-source: derived
  /my/leave:
    get:
      tags:
      - Leave
      summary: Current employee's own leave requests (portal token)
      responses:
        '200':
          description: Requests
      operationId: getMyLeave
      x-operation-id-source: derived
    post:
      tags:
      - Leave
      summary: Submit own leave request (portal token)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - leaveTypeId
              - startDate
              - endDate
              properties:
                leaveTypeId:
                  type: string
                  format: uuid
                startDate:
                  type: string
                  format: date
                endDate:
                  type: string
                  format: date
                comment:
                  type: string
      responses:
        '201':
          description: Created
      operationId: postMyLeave
      x-operation-id-source: derived
components:
  parameters:
    IdPath:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Admin JWT from POST /v1/auth/login, or a `klkn_…` API key.