Skip to main content

Enable API

Instructions on how to enable and retrieve data for establishing an API connection to external tools

Gregor Bercic avatar
Written by Gregor Bercic
Updated over a week ago

The AllHours application offers the possibility to input, export, or modify certain data via API calls.

The first step is to obtain a key that will allow access to the application.

  1. Open Settings/advanced

  2. Create new API key and assign a name of your choice

  3. Once the key is created, the Client ID and Client Secret are automatically generated. These will be required for access.

  4. The process is complete once the key is listed under the API section. You can delete it to revoke access or create multiple keys for different applications.

    💡 All currently supported API calls are available on the API4 website.

API Access and Example Use Case

The All Hours service uses a REST API (JSON), available at:

This site also provides documentation (Swagger) with a detailed description of query structures and data models.

To connect to an account, authentication is required. The system uses OAuth2 protocols.

Example Use Case: Retrieving Annual Leave Information

  1. First, retrieve the absence ID.

    This information is usually available within the application, but it can also be retrieved via an API query.

  2. Once you have the absence ID, you can perform an API call that returns:

    • the total annual leave,

    • annual leave for a specific time period,

    • leave data for a specific user.

  3. Status Codes (Absence Status Codes)

    Status code 0 means that the absence did not require approval and was automatically approved.

    0 = automatically approved absence (does not go through the approval workflow)

    1 = pending approval

    2 = approved absence

    3 = rejected absence

    4 = automatically approved, with a confirmation sent to other approvers

Did this answer your question?