10 years of TIMEOFF.GURUSee the story →

API for developers

Your leave data, in every system that needs it

A REST API that returns JSON. Send leave requests to payroll, sync absences with your ERP or feed them into BI reports, without exports by hand.

The API is included in the Standard and Enterprise plans. Pricing →

Version
2.4.0
Base URL
https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api
Authentication
TimeOffApiKey: …
Format
REST · JSON · GET

What teams build with it

  • Payroll

    Pull the month’s approved leave before the payroll run, with days, hours and leave type.

    leaveRequestByMonth →
  • Daily sync

    Once a day, pick up the requests that were approved, cancelled or changed, and update your ERP or access control.

    leaveRequestsInProgress →
  • Reports and BI

    Combine leave balances, leave types and requests with your other HR data in Power BI or another tool.

    balanceReport →

Quick start

  1. Get an API key

    Your TIMEOFF.GURU administrator issues the key. Keep it on your server and never put it in a browser or a mobile app.

  2. Send it in a header

    Every request carries the key in the TimeOffApiKey header. All methods are GET and return JSON.

  3. Make your first call

    Replace {instance} with your instance name and try the leave requests for a month.

bash
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/leaves/leaveRequestByMonth?year=2026&month=10" \
  -H "TimeOffApiKey: YOUR_API_KEY"

Reference

Configuration

Organizations and leave types set up in your instance.

List organizations

GET/configuration/organizations

Returns the organizations in your instance: name, full name, company ID (Bulstat), address, city and country.

Parameters

No parameters.

Responses

  • 200Success
  • 401The API key is missing or invalid
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/configuration/organizations" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "organizations": [
    {
      "country": "string",
      "unid": "string",
      "address": "string",
      "deleted": "string",
      "city": "string",
      "name": "string",
      "fullName": "string",
      "bulstat": "string"
    }
  ],
  "success": true
}

List leave types

GET/configuration/leaveTypes

Returns the configured leave types: name in Bulgarian and English, short name, whether the leave is paid, whether it is deducted from the balance, whether it is active and whether it needs an attachment.

Parameters

NameTypeDescription
organizationIdoptionalstringOrganization ID. Needed only if your instance has more than one configuration.

Responses

  • 200Success
  • 401The API key is missing or invalid
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/configuration/leaveTypes" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "leaveTypes": [
    {
      "id": 0,
      "uuid": "string",
      "name": {
        "default": "string",
        "bg": "string",
        "en": "string"
      },
      "shortName": "string",
      "notes": {
        "default": "string",
        "bg": "string",
        "en": "string"
      },
      "paid": true,
      "deduct": true,
      "active": true,
      "attachFile": true,
      "kind": "string"
    }
  ],
  "success": true
}

Reference

Leaves

Leave requests, planned leaves and the changes in them.

Get a leave request

GET/leaves/leaveRequestByUnid

Returns one leave request: dates, leave type, days or hours, status, approver and the full status history (who did what and when).

Parameters

NameTypeDescription
unidrequiredstringUnique ID (UNID) of the leave request.

Responses

  • 200Success
  • 401The API key is missing or invalid
  • 404Not found
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/leaves/leaveRequestByUnid?unid=REQUEST_UNID" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "requestInfo": {
    "date": "string",
    "periodMode": "string",
    "unid": "string",
    "usedYears": {
      "year": {
        "days": 0,
        "hours": 0
      }
    },
    "endDate": "string",
    "kind": "string",
    "substitutes": {},
    "statusLog": [
      {
        "date": "string",
        "reason": "string",
        "approveComment": "string",
        "effectiveEmployee": {
          "id": "string",
          "name": "string"
        },
        "employee": {
          "id": "string",
          "name": "string"
        },
        "status": "string"
      }
    ],
    "approvedBy": {
      "employee_id": "string"
    },
    "description": "string",
    "dates": [
      "string"
    ],
    "type": "string",
    "hoursRange": "string",
    "requestor": "string",
    "email": "string",
    "employeeNumber": "string",
    "rejectReason": "string",
    "leaveType": "string",
    "days": 0,
    "typeId": 0,
    "startDate": "string",
    "hoursAmount": 0,
    "status": "string"
  },
  "success": true
}

Leave requests of an employee

GET/leaves/leaveRequestsByEmployee

Returns all leave requests created by the employee.

Parameters

NameTypeDescription
employeeIdrequiredstringEmployee ID.

Responses

  • 200Success
  • 401The API key is missing or invalid
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/leaves/leaveRequestsByEmployee?employeeId=EMPLOYEE_ID" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "requests": [
    {
      "date": "string",
      "periodMode": "string",
      "unid": "string",
      "usedYears": {
        "year": {
          "days": 0,
          "hours": 0
        }
      },
      "endDate": "string",
      "kind": "string",
      "substitutes": {},
      "statusLog": [
        {
          "date": "string",
          "reason": "string",
          "approveComment": "string",
          "effectiveEmployee": {
            "id": "string",
            "name": "string"
          },
          "employee": {
            "id": "string",
            "name": "string"
          },
          "status": "string"
        }
      ],
      "approvedBy": {
        "employee_id": "string"
      },
      "description": "string",
      "dates": [
        "string"
      ],
      "type": "string",
      "hoursRange": "string",
      "requestor": "string",
      "email": "string",
      "employeeNumber": "string",
      "rejectReason": "string",
      "leaveType": "string",
      "days": 0,
      "typeId": 0,
      "startDate": "string",
      "hoursAmount": 0,
      "status": "string"
    }
  ],
  "success": true
}

Leave requests for a month

GET/leaves/leaveRequestByMonth

Returns the leave requests in the given month. Requests in status Rejected, Canceled or Current are not included. A good fit for the monthly payroll run.

Parameters

NameTypeDescription
yearrequirednumberYear of the leave period.
monthrequirednumberMonth of the leave period.

Responses

  • 200Success
  • 401The API key is missing or invalid
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/leaves/leaveRequestByMonth?year=2026&month=10" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "requests": [
    {
      "date": "string",
      "periodMode": "string",
      "unid": "string",
      "usedYears": {
        "year": {
          "days": 0,
          "hours": 0
        }
      },
      "endDate": "string",
      "kind": "string",
      "substitutes": {},
      "statusLog": [
        {
          "date": "string",
          "reason": "string",
          "approveComment": "string",
          "effectiveEmployee": {
            "id": "string",
            "name": "string"
          },
          "employee": {
            "id": "string",
            "name": "string"
          },
          "status": "string"
        }
      ],
      "approvedBy": {
        "employee_id": "string"
      },
      "description": "string",
      "dates": [
        "string"
      ],
      "type": "string",
      "hoursRange": "string",
      "requestor": "string",
      "email": "string",
      "employeeNumber": "string",
      "rejectReason": "string",
      "leaveType": "string",
      "days": 0,
      "typeId": 0,
      "startDate": "string",
      "hoursAmount": 0,
      "status": "string"
    }
  ],
  "success": true
}

All leave requests for a month

GET/leaves/allLeaveRequestByMonth

Like the previous method, but returns requests in every status.

Parameters

NameTypeDescription
yearrequirednumberYear of the leave period.
monthrequirednumberMonth of the leave period.

Responses

  • 200Success
  • 401The API key is missing or invalid
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/leaves/allLeaveRequestByMonth?year=2026&month=10" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "requests": [
    {
      "date": "string",
      "periodMode": "string",
      "unid": "string",
      "usedYears": {
        "year": {
          "days": 0,
          "hours": 0
        }
      },
      "endDate": "string",
      "kind": "string",
      "substitutes": {},
      "statusLog": [
        {
          "date": "string",
          "reason": "string",
          "approveComment": "string",
          "effectiveEmployee": {
            "id": "string",
            "name": "string"
          },
          "employee": {
            "id": "string",
            "name": "string"
          },
          "status": "string"
        }
      ],
      "approvedBy": {
        "employee_id": "string"
      },
      "description": "string",
      "dates": [
        "string"
      ],
      "type": "string",
      "hoursRange": "string",
      "requestor": "string",
      "email": "string",
      "employeeNumber": "string",
      "rejectReason": "string",
      "leaveType": "string",
      "days": 0,
      "typeId": 0,
      "startDate": "string",
      "hoursAmount": 0,
      "status": "string"
    }
  ],
  "success": true
}

Planned leaves of an employee

GET/leaves/plannedLeaves

Returns the leaves the employee has planned: start and end date, number of days and the list of dates.

Parameters

NameTypeDescription
employeeIdrequiredstringEmployee ID.

Responses

  • 200Success
  • 401The API key is missing or invalid
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/leaves/plannedLeaves?employeeId=EMPLOYEE_ID" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "planned": [
    {
      "endDate": "string",
      "days": 0,
      "dates": [
        "string"
      ],
      "startDate": "string"
    }
  ],
  "success": true
}

Changes in leave requests

GET/leaves/leaveRequestsInProgress

Returns leave requests grouped by what is happening to them: accepted, current, cancelled, modified and archived. Covers the current day by default. A good fit for a daily sync with payroll, ERP or access control.

Parameters

NameTypeDescription
daysBackoptionalnumberHow many days back to look. Applies only to cancelled, modified and archived requests.
excludeoptionalstringGroups to leave out: accepted, current, cancelled, modified, archived. To exclude several, concatenate them.

Responses

  • 200Success
  • 401The API key is missing or invalid
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/leaves/leaveRequestsInProgress" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "acceptedRequests": [
    {
      "date": "string",
      "timestamp": "string",
      "periodMode": "string",
      "unid": "string",
      "endDate": "string",
      "kind": "string",
      "substitutes": {},
      "approvedBy": {},
      "description": "string",
      "employeeId": "string",
      "dates": [
        "string"
      ],
      "type": "string",
      "requestor": "string",
      "hoursRange": "string",
      "rejectReason": "string",
      "leaveType": "string",
      "days": 0,
      "typeId": 0,
      "email": "string",
      "startDate": "string",
      "hoursAmount": 0,
      "status": "string"
    }
  ],
  "currentRequests": [
    {
      "date": "string",
      "timestamp": "string",
      "periodMode": "string",
      "unid": "string",
      "endDate": "string",
      "kind": "string",
      "substitutes": {},
      "approvedBy": {},
      "description": "string",
      "employeeId": "string",
      "dates": [
        "string"
      ],
      "type": "string",
      "requestor": "string",
      "hoursRange": "string",
      "rejectReason": "string",
      "leaveType": "string",
      "days": 0,
      "typeId": 0,
      "email": "string",
      "startDate": "string",
      "hoursAmount": 0,
      "status": "string"
    }
  ],
  "cancelledRequests": [
    {
      "date": "string",
      "timestamp": "string",
      "periodMode": "string",
      "unid": "string",
      "endDate": "string",
      "kind": "string",
      "substitutes": {},
      "approvedBy": {},
      "description": "string",
      "employeeId": "string",
      "dates": [
        "string"
      ],
      "type": "string",
      "requestor": "string",
      "hoursRange": "string",
      "rejectReason": "string",
      "leaveType": "string",
      "days": 0,
      "typeId": 0,
      "email": "string",
      "startDate": "string",
      "hoursAmount": 0,
      "status": "string"
    }
  ],
  "modifiedRequests": [
    {
      "date": "string",
      "timestamp": "string",
      "periodMode": "string",
      "unid": "string",
      "endDate": "string",
      "kind": "string",
      "substitutes": {},
      "approvedBy": {},
      "description": "string",
      "employeeId": "string",
      "dates": [
        "string"
      ],
      "type": "string",
      "requestor": "string",
      "hoursRange": "string",
      "rejectReason": "string",
      "leaveType": "string",
      "days": 0,
      "typeId": 0,
      "email": "string",
      "startDate": "string",
      "hoursAmount": 0,
      "status": "string"
    }
  ],
  "archivedRequests": [
    {
      "date": "string",
      "timestamp": "string",
      "periodMode": "string",
      "unid": "string",
      "endDate": "string",
      "kind": "string",
      "substitutes": {},
      "approvedBy": {},
      "description": "string",
      "employeeId": "string",
      "dates": [
        "string"
      ],
      "type": "string",
      "requestor": "string",
      "hoursRange": "string",
      "rejectReason": "string",
      "leaveType": "string",
      "days": 0,
      "typeId": 0,
      "email": "string",
      "startDate": "string",
      "hoursAmount": 0,
      "status": "string"
    }
  ],
  "success": true
}

Reference

Employees

Employee details and compensations.

Get an employee

GET/employees/employeeById

Returns the name, number, organization, department, working hours, e-mail and phone of an employee.

Parameters

NameTypeDescription
employeeIdrequiredstringEmployee ID.

Responses

  • 200Success
  • 401The API key is missing or invalid
  • 403This part of the API (employees or reports) is not enabled in your instance
  • 404Not found
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/employees/employeeById?employeeId=EMPLOYEE_ID" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "employee": {
    "organization": "string",
    "name": "string",
    "id": "string",
    "department": "string",
    "workingHours": 0,
    "number": "string",
    "email": "string",
    "phone": "string"
  },
  "success": true
}

List employees of an organization

GET/employees/employees

Returns the employees of one organization who are active and have a TIMEOFF.GURU user account. Give one of unid, name or fullName (from List organizations); without any of them the list is empty.

Parameters

NameTypeDescription
unidoptionalstringUNID of the organization.
nameoptionalstringName of the organization.
fullNameoptionalstringFull name of the organization.

Responses

  • 200Success
  • 401The API key is missing or invalid
  • 403This part of the API (employees or reports) is not enabled in your instance
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/employees/employees?name=ORGANIZATION_NAME" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "employees": [
    {
      "organization": "string",
      "name": "string",
      "id": "string",
      "department": "string",
      "workingHours": 0,
      "number": "string",
      "email": "string",
      "phone": "string"
    }
  ],
  "success": true
}

List all employees

GET/employees/all

Returns the employees of all organizations at once, with the same details as List employees of an organization. By default only employees with an active user account are included.

Parameters

NameTypeDescription
activeOnlyoptionalbooleantrue (default): only employees with an active user account. false: also employees without an active user account.

Responses

  • 200Success
  • 401The API key is missing or invalid
  • 403This part of the API (employees or reports) is not enabled in your instance
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/employees/all" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "employees": [
    {
      "organization": "string",
      "name": "string",
      "id": "string",
      "department": "string",
      "workingHours": 0,
      "number": "string",
      "email": "string",
      "phone": "string"
    }
  ],
  "success": true
}

Compensations of an employee

GET/employees/compensationsByEmployee

Returns the compensations recorded for the employee: date, description, days and status.

Parameters

NameTypeDescription
employeeIdrequiredstringEmployee ID.

Responses

  • 200Success
  • 401The API key is missing or invalid
  • 403This part of the API (employees or reports) is not enabled in your instance
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/employees/compensationsByEmployee?employeeId=EMPLOYEE_ID" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "compensations": [
    {
      "date": "string",
      "unid": "string",
      "description": "string",
      "days": 0,
      "status": "string"
    }
  ],
  "success": true
}

Reference

Reports

The leave balance and the compensations balance of all employees, the same data as the reports in TIMEOFF.GURU.

Leave balance

GET/reports/balance

Returns the paid leave balance of every employee, the same data as the Leave balance report: the balance on the given date and today, requested and remaining leave, and the balance by year. All amounts are in days and hours. totals adds them up for all employees.

Parameters

NameTypeDescription
dateoptionalstringDate of the balance, in the format dd.MM.yyyy (for example 31.12.2026). Without it, today is used. Any other format returns 400.
forOrganizationsoptionalstringOrganizations to include, separated by ; (unid or name from List organizations). Without it, all organizations are included.

Responses

  • 200Success
  • 400A parameter is invalid, for example a date in the wrong format
  • 401The API key is missing or invalid
  • 403This part of the API (employees or reports) is not enabled in your instance
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/reports/balance?date=31.12.2026" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "date": "string",
  "employees": [
    {
      "id": "string",
      "number": "string",
      "name": "string",
      "organization": "string",
      "workingHours": 0,
      "balanceTillDate": {
        "days": 0,
        "hours": 0
      },
      "balanceTillToday": {
        "days": 0,
        "hours": 0
      },
      "requested": {
        "days": 0,
        "hours": 0
      },
      "remaining": {
        "days": 0,
        "hours": 0
      },
      "balanceByYear": {
        "<key>": {
          "days": 0,
          "hours": 0
        }
      }
    }
  ],
  "totals": {
    "balanceTillDate": {
      "days": 0,
      "hours": 0
    },
    "balanceTillToday": {
      "days": 0,
      "hours": 0
    },
    "requested": {
      "days": 0,
      "hours": 0
    },
    "remaining": {
      "days": 0,
      "hours": 0
    }
  },
  "success": true
}

Compensations balance

GET/reports/compensationsBalance

Returns the current compensations (days off in lieu) balance of every employee with a user account, the same data as the Bonus days balance report: unused, used, paid and requested days. It does not depend on a date. totals adds them up for all employees.

Parameters

NameTypeDescription
forOrganizationsoptionalstringOrganizations to include, separated by ; (unid or name from List organizations). Without it, all organizations are included.

Responses

  • 200Success
  • 401The API key is missing or invalid
  • 403This part of the API (employees or reports) is not enabled in your instance
Example request
curl "https://timeoff.guru/to/{instance}/timeoff.nsf/xsp/resources/api/reports/compensationsBalance" \
  -H "TimeOffApiKey: YOUR_API_KEY"
Response structureValues show the data type.
{
  "employees": [
    {
      "id": "string",
      "number": "string",
      "name": "string",
      "organization": "string",
      "department": "string",
      "job": "string",
      "unused": 0,
      "used": 0,
      "paid": 0,
      "requested": 0
    }
  ],
  "totals": {
    "unused": 0,
    "used": 0,
    "paid": 0,
    "requested": 0
  },
  "success": true
}

Response codes

Every response has a success field. Check the HTTP status first:

  • 200Success
  • 400A parameter is invalid, for example a date in the wrong format
  • 401The API key is missing or invalid
  • 403This part of the API (employees or reports) is not enabled in your instance
  • 404Not found

Need help with an integration?

Tell us which system you want to connect, and we will help you pick the right methods and data.

Write to support

TIMEOFF.GURU API 2.4.0 · Licence: Apache 2.0