HR-ON API

License: ISC

General

If you want to get started immediately with our API, we provide a Postman collection. All you need to do is import the collection through File -> Import -> Link in Postman. The collection contains most endpoints found here, including examples of retrieving and refreshing tokens.

Additionally, the collection contains a pre-request script that automatically handles retrieval and refreshing of tokens for all calls when testing through Postman, allowing you to start testing without having to setup authentication manually. In order to use the pre-request script, you need to fill out the client_id and client_secret environment variables in Postman.

Authentication

HR-ON's API is secured with OAuth 2.0. Any applications that wish to utilize the API must first be authenticated and authorized to do so. We follow the Authorization Framework protocol. To authenticate using OAuth2, follow these steps:

  1. Obtain Authorization Credentials

    • Make a POST request to the authorization server's token endpoint (https://auth.hr-on.com/oauth2/token).
    • Include your client ID and client secret in the request.
    • Set the grant_type to client_credentials.
    • The server will respond with an access token, a refresh token, and information related to the token.
  2. Use the Access Token

    • Include the access token in the Authorization header of your API requests.
    • Example:
      GET /company
      Host: https://api.hr-on.com/v1/staff
      Authorization: Bearer your_access_token_here
      
  3. Refresh the Access Token (if applicable)

    • If your access token has expired, you can use the refresh token to obtain a fresh set of credentials.
    • Make a POST request to the token endpoint with the refresh token.
    • Set the grant_type to refresh_token.
    • The server will respond with a new set of credentials.

Example credentials request:

POST /token
Host: https://auth.hr-on.com/oauth2
Content-Type: application/json

Body: {
  "grant_type": "client_credentials",
  "client_id": "your_client_id",
  "client_secret": "your_client_secret"
}

Example credentials response:

{
  "access_token": "your_access_token_here",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "your_refresh_token_here"
}

Example refresh token request:

POST /token
Host: https://auth.hr-on.com/oauth2
Content-Type: application/json

Body: {
  "grant_type": "refresh_token",
  "refresh_token": "your_refresh_token_here"
}

Reporting a problem

If you encounter an issue with the API, please contact us at support@hr-on.com with the following information:

  1. What is the problem?

    • Describe exactly what is wrong.
  2. What endpoint was called?

    • Include the full endpoint path and request type (GET, POST, etc.).
    • Include any path/query parameters used.
    • Include the request body, if one was used.
  3. When did you experience the error?

    • Provide the exact timestamp if possible, otherwise a rough date is fine.
  4. Was the error a one-off or is it recurring?

  5. What error message did you receive, if any?

Reports like "API is broken, please fix", with no additional info, will be disregarded.

Webhooks

Webhooks are a way for HR-ON Staff to notify your application when certain events occur. To see more information about webhooks, see our Webhook documentation.

Absence

What is an Absence?

An absence represents a period an employee is away, e.g. vacation, sick leave, or a doctor's visit.

Absence is not to be confused with time registration - a time registration tracks when an employee works, absence tracks when they don't.

Full day vs. partial day

The fullDay flag determines how startDate/endDate are interpreted:

  • fullDay: true - the absence spans whole calendar days (e.g. vacation). startDate/endDate are treated as dates.
  • fullDay: false - the absence spans part of a day (e.g. a doctor's visit). startDate/endDate are treated as timestamps.

Absence types

Absence types (/v1/staff/absences/types) describe the category of an absence, e.g. "Vacation", "Sick leave". Every absence references one via typeId. Types also carry a mustBeApproved flag indicating whether absences of that type require approval.

Approval

approvedAt, deniedAt, and approvedOrDeniedBy are read-only fields on an absence. Once an absence has been approved, it can no longer be edited or deleted outright; deleting it instead creates a deletion request that follows the same approval flow.

CreateAbsence

Creates a new absence from the given input.

Authorizations:
JWT
Request Body schema: application/json
employeeId
required
string <uuid>

The UUID of the employee the absence belongs to

endDate
required
string <DateTime ISO 8601>

The end date of the absence

startDate
required
string <DateTime ISO 8601>

The start date of the absence

typeId
required
string <uuid>

The UUID of the absence type

fullDay
boolean

Whether the absence is full day or partial day. Defaults to true.

note
string

A note attached to the absence

Responses

Response Schema: application/json
required
object (Absence)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
  • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
  • "startDate": "string",
  • "endDate": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
    • "absenceType": "string",
    • "code": "string",
    • "startDate": "string",
    • "endDate": "string",
    • "fullDay": true,
    • "note": "string",
    • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    • "departmentIds": [
      • "string"
      ],
    • "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
    • "approvedAt": "string",
    • "deniedAt": "string",
    • "approvedOrDeniedBy": "9c9a3f5b-e865-40ee-85af-4206c41a17ef"
    }
}

CreateAbsenceType

Creates a new absence type from the given input.

Authorizations:
JWT
Request Body schema: application/json
color
required
string

The HEX color code used to represent the absence type (e.g., #FF5733)

name
required
string

The name of the absence type

code
string

An identification code for the absence type

description
string

The description of the absence type

Responses

Response Schema: application/json
required
object (AbsenceType)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string",
  • "color": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "code": "string",
    • "color": "string",
    • "description": "string",
    • "mustBeApproved": true
    }
}

DeleteAbsence

Deletes an existing absence. If the absence type requires approval and the absence was already approved, this creates a deletion request instead of deleting it outright.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the absence to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/absences/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteAbsenceType

Deletes an existing absence type.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the absence type to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/absences/types/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetAbsence

Fetches a specific absence given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the absence

Responses

Response Schema: application/json
absenceType
required
string

The type of absence

approvedAt
required
string or null <DateTime ISO 8601>

The date and time when the absence was approved

approvedOrDeniedBy
required
string or null <uuid>

The UUID of the employee that approved or denied the absence

code
required
string

The code of the absence

createdBy
required
string <uuid>

The UUID of the employee that created the absence

deniedAt
required
string or null <DateTime ISO 8601>

The date and time when the absence was denied

departmentIds
required
Array of strings

The UUIDs of the departments the absence is related to

employeeId
required
string <uuid>

The UUID of the employee the absence belongs to

endDate
required
string <DateTime ISO 8601>

The end date of the absence

fullDay
required
boolean

If the absence is full day or partial day

id
required
string <uuid>

The UUID of the absence

note
required
string

The note of the absence

startDate
required
string <DateTime ISO 8601>

The start date of the absence

typeId
required
string <uuid>

The UUID of the absence type

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/absences/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
  • "absenceType": "string",
  • "code": "string",
  • "startDate": "string",
  • "endDate": "string",
  • "fullDay": true,
  • "note": "string",
  • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
  • "departmentIds": [
    • "string"
    ],
  • "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
  • "approvedAt": "string",
  • "deniedAt": "string",
  • "approvedOrDeniedBy": "9c9a3f5b-e865-40ee-85af-4206c41a17ef"
}

GetAbsences

Fetches absences in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
fromDate
string <date-time>

Fetch absences with a start date greater than or equal to this date.

offset
integer <int32>

Specifies the amount of items to skip before selection.

order
string
Enum: "ASC" "DESC"

Specifies the ordering of items. Defaults to ASC (ascending).

orderBy
string
Enum: "absenceType" "approvedAt" "approvedOrDeniedBy" "createdBy" "deniedAt" "employeeId" "endDate" "fullDay" "name" "startDate"

Specifies which attribute to order items by. Defaults to name.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

toDate
string <date-time>

Fetch absences with an end date less than or equal to this date.

Responses

Response Schema: application/json
required
Array of objects (Absence)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/absences?fromDate=SOME_STRING_VALUE&toDate=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&order=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
      • "absenceType": "string",
      • "code": "string",
      • "startDate": "string",
      • "endDate": "string",
      • "fullDay": true,
      • "note": "string",
      • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
      • "departmentIds": [
        • "string"
        ],
      • "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
      • "approvedAt": "string",
      • "deniedAt": "string",
      • "approvedOrDeniedBy": "9c9a3f5b-e865-40ee-85af-4206c41a17ef"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetAbsenceType

Fetches a specific absence type given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the absence type

Responses

Response Schema: application/json
color
required
string

The HEX color code used to represent the absence type (e.g., #FF5733)

id
required
string <uuid>

The UUID of the absence type

mustBeApproved
required
boolean

Whether absences of this type require approval before they are considered final

name
required
string

The name of the absence type

code
string

An identification code for the absence type

description
string

The description of the absence type

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/absences/types/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "code": "string",
  • "color": "string",
  • "description": "string",
  • "mustBeApproved": true
}

GetAbsenceTypes

Fetches absence types in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
code
string

Filter absence types by their identification code

offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (AbsenceType)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/absences/types?code=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "code": "string",
      • "color": "string",
      • "description": "string",
      • "mustBeApproved": true
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetEmployeeAbsences

Fetches absences for a specific employee. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
path Parameters
id
required
string
query Parameters
fromDate
string <date-time>

Fetch absences with a start date greater than or equal to this date.

offset
integer <int32>

Specifies the amount of items to skip before selection.

order
string
Enum: "ASC" "DESC"

Specifies the ordering of items. Defaults to ASC (ascending).

orderBy
string

Specifies which attribute to order items by. Defaults to name.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

toDate
string <date-time>

Fetch absences with an end date less than or equal to this date.

Responses

Response Schema: application/json
required
Array of objects (Absence)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/absences/employee/%7Bid%7D?fromDate=SOME_STRING_VALUE&toDate=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&order=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
      • "absenceType": "string",
      • "code": "string",
      • "startDate": "string",
      • "endDate": "string",
      • "fullDay": true,
      • "note": "string",
      • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
      • "departmentIds": [
        • "string"
        ],
      • "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
      • "approvedAt": "string",
      • "deniedAt": "string",
      • "approvedOrDeniedBy": "9c9a3f5b-e865-40ee-85af-4206c41a17ef"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateAbsence

Updates an existing absence. Absences that have already been approved can no longer be edited.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the absence that is going to be updated

Request Body schema: application/json
endDate
string <DateTime ISO 8601>

The end date of the absence

fullDay
boolean

Whether the absence is full day or partial day

note
string

A note attached to the absence

startDate
string <DateTime ISO 8601>

The start date of the absence

typeId
string <uuid>

The UUID of the absence type

Responses

Response Schema: application/json
required
object (Absence)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
    • "absenceType": "string",
    • "code": "string",
    • "startDate": "string",
    • "endDate": "string",
    • "fullDay": true,
    • "note": "string",
    • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    • "departmentIds": [
      • "string"
      ],
    • "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
    • "approvedAt": "string",
    • "deniedAt": "string",
    • "approvedOrDeniedBy": "9c9a3f5b-e865-40ee-85af-4206c41a17ef"
    }
}

UpdateAbsenceType

Updates an existing absence type.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the absence type that is going to be updated

Request Body schema: application/json
code
string or null

An identification code for the absence type

color
string

The HEX color code used to represent the absence type (e.g., #FF5733)

description
string or null

The description of the absence type

name
string

The name of the absence type

Responses

Response Schema: application/json
required
object (AbsenceType)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "code": "string",
    • "color": "string",
    • "description": "string",
    • "mustBeApproved": true
    }
}

Company

GetCompany

Fetches basic information about a company.

Authorizations:
JWT

Responses

Response Schema: application/json
address
required
string

The address of the company

availableLocales
required
Array of strings

The available_locales of the company

city
required
string

The city of the company

country
required
string

The country of the company

createdAt
required
string

The creation timestamp of the company

cvr
required
string

The cvr of the company

description
required
string

The description of the company

required
UUID (string) or string

The UUID of the company

locale
required
string

The locale of the company

logoUrl
required
string

The url of the company logo

name
required
string

The name of the company

postalCode
required
string

The postal_code of the company

updatedAt
required
string

The update timestamp of the company

url
required
string

The url of the company

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/company \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "url": "string",
  • "logoUrl": "string",
  • "createdAt": "string",
  • "updatedAt": "string",
  • "cvr": "string",
  • "locale": "string",
  • "availableLocales": [
    • "string"
    ],
  • "address": "string",
  • "city": "string",
  • "country": "string",
  • "postalCode": "string"
}

GetEmployeeCount

Fetches employee count from a company.

Authorizations:
JWT

Responses

Response Schema: application/json
number <double>

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/company/employeeCount \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
0
0

Competence

CreateCompetence

Creates a new competence from the given input.

Authorizations:
JWT
Request Body schema: application/json
categoryId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

name
required
string
canExpire
boolean
Default: false
canRemind
boolean
Default: false
description
string
expireInterval
string^(\d+)\s*(second|minute|hour|day|week|month|y...
Default: "1 year"

How long the competence is valid for, after being assigned.

reminderInterval
string^(\d+)\s*(second|minute|hour|day|week|month|y...
Default: "1 week"

How long before the expiration date a reminder should be sent.

Responses

Response Schema: application/json
required
object (Competence)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string",
  • "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0",
    • "canExpire": true,
    • "expireInterval": "1 week",
    • "canRemind": true,
    • "reminderInterval": "1 week",
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000"
    }
}

DeleteCompetence

Deletes an existing competence.

Authorizations:
JWT
path Parameters
id
required
string

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/competences/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetCompetence

Fetches a competence in your company.

Authorizations:
JWT
path Parameters
id
required
string

Responses

Response Schema: application/json
categoryId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

createdAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

description
required
string

The description of the competence

id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

name
required
string

The name of the competence

updatedAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

canExpire
boolean

Whether the competence can expire after being assigned.

canRemind
boolean

Whether the competence can send reminders about renewal.

expireInterval
string^(\d+)\s*(second|minute|hour|day|week|month|y...

After how long should the competence expire after being assigned.

reminderInterval
string^(\d+)\s*(second|minute|hour|day|week|month|y...

How long before the competence expires should a reminder be sent. For example, "1 week" means that the reminder should be sent 1 week before the competence expires.

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/competences/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0",
  • "canExpire": true,
  • "expireInterval": "1 week",
  • "canRemind": true,
  • "reminderInterval": "1 week",
  • "createdAt": "2022-09-27 18:00:00.000",
  • "updatedAt": "2022-09-27 18:00:00.000"
}

GetCompetences

Fetches competences in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
offset
number <double>
size
number <double>

Responses

Response Schema: application/json
required
Array of objects (Competence)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/competences?size=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "description": "string",
      • "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0",
      • "canExpire": true,
      • "expireInterval": "1 week",
      • "canRemind": true,
      • "reminderInterval": "1 week",
      • "createdAt": "2022-09-27 18:00:00.000",
      • "updatedAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateCompetence

Updates an existing competence.

Authorizations:
JWT
path Parameters
id
required
string
Request Body schema: application/json
canExpire
boolean
canRemind
boolean
categoryId
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

description
string
expireInterval
string (Interval) ^(\d+)\s*(second|minute|hour|day|week|month|y...

A string representing a time interval.

name
string
reminderInterval
string (Interval) ^(\d+)\s*(second|minute|hour|day|week|month|y...

A string representing a time interval.

Responses

Response Schema: application/json
required
object (Competence)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0",
    • "canExpire": true,
    • "expireInterval": "1 week",
    • "canRemind": true,
    • "reminderInterval": "1 week",
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000"
    }
}

Competence Category

CreateCompetenceCategory

Creates a new competence category from the given input.

Authorizations:
JWT
Request Body schema: application/json
name
required
string

Responses

Response Schema: application/json
required
object (CompetenceCategory)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string"
    }
}

DeleteCompetenceCategory

Deletes an existing competence category.

Authorizations:
JWT
path Parameters
id
required
string

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/competenceCategories/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetCompetenceCategories

Fetches competence categories in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
offset
number <double>
size
number <double>

Responses

Response Schema: application/json
required
Array of objects (CompetenceCategory)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/competenceCategories?size=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetCompetenceCategory

Fetches a competence category in your company.

Authorizations:
JWT
path Parameters
id
required
string

Responses

Response Schema: application/json
id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

name
required
string

The name of the competence category

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/competenceCategories/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string"
}

UpdateCompetenceCategory

Updates an existing competence category.

Authorizations:
JWT
path Parameters
id
required
string
Request Body schema: application/json
name
string

Responses

Response Schema: application/json
required
object (CompetenceCategory)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string"
    }
}

CustomField

Used for custom fields related to employees.

CreateCustomField

Creates a new custom field from the given input.

Authorizations:
JWT
Request Body schema: application/json
fieldType
required
string (FieldType)
Enum: "agreement" "checkbox" "country" "date" "employee" "multiselect" "number" "rating" "select" "text" "textarea"
name
required
string

The name of the custom field

customId
string or null

A custom id that can be used instead of the auto-generated ID

defaultValue
string

The default value of the custom field

description
string

The description of the custom field

fieldGroup
string

The name of the field group that the custom field belongs to

Array of objects (CreateCustomFieldOptionInput)

An array of options that specify which values can be chosen for the custom field.

order
integer <int32>

The placement of the custom field in its field group relative to the order of other fields Defaults to 0.

required
boolean

Whether or not this field has to be supplied. Defaults to false

sensitive
boolean

Whether or not this field is sensitive. Defaults to false

Responses

Response Schema: application/json
required
object (CustomField)

The various fields contained in the parent custom field. Only used for fields of type 'table'.

success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string",
  • "fieldType": "agreement"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "fieldType": "agreement",
    • "defaultValue": "string",
    • "required": true,
    • "sensitive": true,
    • "options": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "value": "string",
        • "order": 0
        }
      ],
    • "fieldGroup": "string",
    • "order": 0,
    • "setup": { },
    • "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
    • "customId": "string"
    }
}

DeleteCustomField

Deletes an existing custom field.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the custom field to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/customFields/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetCustomField

Fetches a specific custom field given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the custom field

Responses

Response Schema: application/json
fieldType
required
string (FieldType)
Enum: "agreement" "checkbox" "country" "date" "employee" "multiselect" "number" "rating" "select" "text" "textarea"
required
UUID (string) or string

The ID of the custom field or the custom ID if set

name
required
string

The name of the custom field

customId
string

The custom ID of the field

defaultValue
string

The default value of the custom field

description
string

The description of the custom field

fieldGroup
string

The name of the field group that the custom field belongs to

fieldId
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

Array of objects (CustomFieldOption)

An array of options that specify which values can be chosen for the custom field.

order
number <double>

The placement of the custom field in its field group relative to the order of other fields

required
boolean

Whether or not this field has to be supplied

sensitive
boolean

Whether or not this field is sensitive

setup
object (CustomField) Recursive

The various fields contained in the parent custom field. Only used for fields of type 'table'.

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/customFields/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "fieldType": "agreement",
  • "defaultValue": "string",
  • "required": true,
  • "sensitive": true,
  • "options": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "value": "string",
      • "order": 0
      }
    ],
  • "fieldGroup": "string",
  • "order": 0,
  • "setup": { },
  • "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
  • "customId": "string"
}

GetCustomFields

Fetches custom fields in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (CustomField)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/customFields?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "description": "string",
      • "fieldType": "agreement",
      • "defaultValue": "string",
      • "required": true,
      • "sensitive": true,
      • "options": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "value": "string",
          • "order": 0
          }
        ],
      • "fieldGroup": "string",
      • "order": 0,
      • "setup": { },
      • "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
      • "customId": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateCustomField

Updates an existing custom field.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the custom field that is going to be updated

Request Body schema: application/json
customId
string or null

A custom id that can be used instead of the auto-generated ID

defaultValue
string or null

The default value of the custom field

description
string or null

The description of the custom field

fieldGroup
string or null

The name of the field group that the custom field belongs to

fieldType
string or null
Deprecated
Enum: "agreement" "checkbox" "country" "date" "employee" "multiselect" "number" "rating" "select" "text" "textarea"

This property is deprecated and has no effect.

name
string

The name of the custom field

Array of objects (UpdateCustomFieldOptionInput)

An array of options that specify which values can be chosen for the custom field.

order
integer <int32>

The placement of the custom field in its field group relative to the order of other fields

required
boolean

Whether or not this field has to be supplied

sensitive
boolean

Whether or not this field is sensitive

Responses

Response Schema: application/json
required
object (CustomField)

The various fields contained in the parent custom field. Only used for fields of type 'table'.

success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "fieldType": "agreement",
    • "defaultValue": "string",
    • "required": true,
    • "sensitive": true,
    • "options": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "value": "string",
        • "order": 0
        }
      ],
    • "fieldGroup": "string",
    • "order": 0,
    • "setup": { },
    • "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
    • "customId": "string"
    }
}

Department

CreateDepartment

Creates a new department from the given input.

Authorizations:
JWT
Request Body schema: application/json
name
required
string

The name of the department

address
string

The address of the department

city
string

The city of the department

country
string

The country of the department.

customId
string

A custom id that can be used instead of the auto-generated ID

cvr
string

The cvr number of the department

departmentType
string

The name of the department's type

description
string

The description of the department

ean
string

The EAN number of the department

email
string

The email used to contact the department

mainDepartment
boolean

Whether or not this department is the main department

parentDepartmentId
string

The id of the parent department that this department belongs to

phone
string

The phone number used to contact the department

pNumber
string

The p-number of the department

postalCode
string

The postal code of the department

Responses

Response Schema: application/json
required
object (Department)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "mainDepartment": true,
    • "parentDepartment": {
      • "name": "string",
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      },
    • "name": "string",
    • "description": "string",
    • "ean": "string",
    • "phone": "string",
    • "email": "string",
    • "address": "string",
    • "city": "string",
    • "postalCode": "string",
    • "country": "string",
    • "cvr": "string",
    • "pNumber": "string",
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000",
    • "departmentType": "string",
    • "departmentCode": "string",
    • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
    • "customId": "string"
    }
}

CreateDepartmentCustomField

Creates a new custom field from the given input.

Authorizations:
JWT
Request Body schema: application/json
fieldType
required
string (FieldType)
Enum: "agreement" "checkbox" "country" "date" "employee" "multiselect" "number" "rating" "select" "text" "textarea"
name
required
string

The name of the custom field

string or Array of strings or object

The default value of the custom field

departmentTypes
Array of strings

The ids of the type of department this custom field is associated with

description
string

The description of the custom field

Array of objects (CreateDepartmentCustomFieldOptionInput)

An array of options that specify which values can be chosen for the custom field.

order
integer <int32>

The placement of the custom field in its field group relative to the order of other fields Defaults to 0.

required
boolean

Whether or not this field has to be supplied. Defaults to false

Responses

Response Schema: application/json
required
object (DepartmentCustomField)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string",
  • "fieldType": "agreement"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "fieldType": "agreement",
    • "defaultValue": "string",
    • "required": true,
    • "options": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "value": "string",
        • "order": 0
        }
      ],
    • "order": 0,
    • "departmentTypes": [
      • "string"
      ],
    • "createdAt": "string",
    • "updatedAt": "string"
    }
}

DeleteDepartment

Deletes an existing department.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the department to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/departments/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteDepartmentCustomField

Deletes an existing custom field.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the custom field to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/departments/customFields/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetDepartment

Fetches a specific department given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the department

Responses

Response Schema: application/json
address
required
string

The address where the department resides

city
required
string

The city where the department resides

country
required
string

The country where the department resides

createdAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

customId
required
string

The custom id of the department

cvr
required
string

The CVR number of the department

departmentCode
required
string

The identification code of the department

departmentId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

departmentType
required
string

The type of the department

description
required
string

The description of the department

ean
required
string

The ean number of the department

email
required
string

The email used to contact the department

required
UUID (string) or string

UUID of the department or its custom id if set

mainDepartment
required
boolean

Whether or not the department is the main department in its hierarchy

name
required
string

The name of the department

required
object

An object containing the id and name of the parent department

phone
required
string

The phone number used to contact the department

pNumber
required
string

The P number of the department

postalCode
required
string

The postal code where the department resides

updatedAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/departments/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "mainDepartment": true,
  • "parentDepartment": {
    • "name": "string",
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    },
  • "name": "string",
  • "description": "string",
  • "ean": "string",
  • "phone": "string",
  • "email": "string",
  • "address": "string",
  • "city": "string",
  • "postalCode": "string",
  • "country": "string",
  • "cvr": "string",
  • "pNumber": "string",
  • "createdAt": "2022-09-27 18:00:00.000",
  • "updatedAt": "2022-09-27 18:00:00.000",
  • "departmentType": "string",
  • "departmentCode": "string",
  • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
  • "customId": "string"
}

GetDepartmentCustomField

Fetches a specific custom field given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the custom field

Responses

Response Schema: application/json
createdAt
required
string

The time the custom field was created

departmentTypes
required
Array of strings

The type of department this custom field is associated with

fieldType
required
string (FieldType)
Enum: "agreement" "checkbox" "country" "date" "employee" "multiselect" "number" "rating" "select" "text" "textarea"
required
UUID (string) or string

The UUID of the custom field

name
required
string

The name of the custom field

updatedAt
required
string

The time the custom field was last updated

string or Array of strings

The default value of the custom field

description
string

The description of the custom field

Array of objects (DepartmentCustomFieldOption)

An array of options that specify which values can be chosen for the custom field.

order
number <double>

The placement of the custom field in its field group relative to the order of other fields

required
boolean

Whether or not this field has to be supplied

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/departments/customFields/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "fieldType": "agreement",
  • "defaultValue": "string",
  • "required": true,
  • "options": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "value": "string",
      • "order": 0
      }
    ],
  • "order": 0,
  • "departmentTypes": [
    • "string"
    ],
  • "createdAt": "string",
  • "updatedAt": "string"
}

GetDepartmentCustomFieldEntries

Fetches department custom field entries.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the department

query Parameters
size
number <double>
timestamp
string

Responses

Response Schema: application/json
required
Array of objects (DepartmentCustomFieldEntry)
required
object (NextPageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/departments/%7Bid%7D/customFields?size=SOME_NUMBER_VALUE&timestamp=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "customFieldId": "string",
      • "fieldType": "agreement",
      • "value": "string",
      • "createdAt": "string",
      • "updatedAt": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "nextPage": 0
    }
}

GetDepartmentCustomFieldEntry

Fetches a specific custom field entry given a custom field ID.

Authorizations:
JWT
path Parameters
customFieldId
required
string

The UUID of the custom field

id
required
string

The UUID of the department

Responses

Response Schema: application/json
createdAt
required
string

The time the custom field entry was created

customFieldId
required
string

The ID of the custom field

fieldType
required
string (FieldType)
Enum: "agreement" "checkbox" "country" "date" "employee" "multiselect" "number" "rating" "select" "text" "textarea"
updatedAt
required
string

The time the custom field entry was last updated

required
string or Array of strings or Record_string.string_ (object)

The value of the custom field entry

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/departments/%7Bid%7D/customfields/%7BcustomFieldId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "customFieldId": "string",
  • "fieldType": "agreement",
  • "value": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

GetDepartmentCustomFields

Fetches department custom field setup.

Authorizations:
JWT
query Parameters
size
number <double>
timestamp
string

Responses

Response Schema: application/json
required
Array of objects (DepartmentCustomField)
required
object (NextPageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/departments/customFields?size=SOME_NUMBER_VALUE&timestamp=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "description": "string",
      • "fieldType": "agreement",
      • "defaultValue": "string",
      • "required": true,
      • "options": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "value": "string",
          • "order": 0
          }
        ],
      • "order": 0,
      • "departmentTypes": [
        • "string"
        ],
      • "createdAt": "string",
      • "updatedAt": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "nextPage": 0
    }
}

GetDepartments

Fetches departments in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
departmentCode
string

The identification code of the department.

offset
integer <int32>

Specifies the amount of items to skip before selection.

order
string
Enum: "ASC" "DESC"

Specifies the ordering of items. Defaults to ASC (ascending).

orderBy
string
Enum: "createdAt" "departmentType" "name" "postalCode" "updatedAt"

Specifies which attribute to order items by. Defaults to name.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (Department)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/departments?departmentCode=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&order=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "mainDepartment": true,
      • "parentDepartment": {
        • "name": "string",
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        },
      • "name": "string",
      • "description": "string",
      • "ean": "string",
      • "phone": "string",
      • "email": "string",
      • "address": "string",
      • "city": "string",
      • "postalCode": "string",
      • "country": "string",
      • "cvr": "string",
      • "pNumber": "string",
      • "createdAt": "2022-09-27 18:00:00.000",
      • "updatedAt": "2022-09-27 18:00:00.000",
      • "departmentType": "string",
      • "departmentCode": "string",
      • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
      • "customId": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateDepartment

Updates an existing department.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the department that is going to be updated

Request Body schema: application/json
address
string or null

The address of the department

city
string or null

The city of the department

country
string or null

The country of the department.

customId
string or null

A custom id that can be used instead of the auto-generated ID

cvr
string or null

The cvr number of the department

departmentType
string or null

The name of the department's type

description
string or null

The description of the department

ean
string or null

The ean number of the department

email
string or null

The email used to contact the department

mainDepartment
boolean

Whether or not this department is the main department

name
string or null

The name of the department

parentDepartmentId
string or null

The id of the parent department that this department belongs to

phone
string or null

The phone number used to contact the department

pNumber
string or null

The p-number of the department

postalCode
string or null

The postal code of the department

Responses

Response Schema: application/json
required
object (Department)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "mainDepartment": true,
    • "parentDepartment": {
      • "name": "string",
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      },
    • "name": "string",
    • "description": "string",
    • "ean": "string",
    • "phone": "string",
    • "email": "string",
    • "address": "string",
    • "city": "string",
    • "postalCode": "string",
    • "country": "string",
    • "cvr": "string",
    • "pNumber": "string",
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000",
    • "departmentType": "string",
    • "departmentCode": "string",
    • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
    • "customId": "string"
    }
}

UpdateDepartmentCustomField

Updates an existing custom field.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the custom field that is going to be updated

Request Body schema: application/json
string or Array of strings or object

The default value of the custom field

departmentTypes
Array of strings <uuid> (UUID)

The ids of the type of department this custom field is associated with

description
string or null

The description of the custom field

name
string

The name of the custom field

Array of objects (UpdateDepartmentCustomFieldOptionInput)

An array of options that specify which values can be chosen for the custom field.

order
integer <int32>

The placement of the custom field in its field group relative to the order of other fields

required
boolean

Whether or not this field has to be supplied

Responses

Response Schema: application/json
required
object (DepartmentCustomField)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "fieldType": "agreement",
    • "defaultValue": "string",
    • "required": true,
    • "options": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "value": "string",
        • "order": 0
        }
      ],
    • "order": 0,
    • "departmentTypes": [
      • "string"
      ],
    • "createdAt": "string",
    • "updatedAt": "string"
    }
}

UpdateDepartmentCustomFieldEntry

Updates the value of a custom field for the department.

Authorizations:
JWT
path Parameters
customFieldId
required
string

The UUID of the custom field

id
required
string

The UUID of the department

Request Body schema: application/json
(string or null) or (Array of strings or null) or (object or null)

The value of the custom field. If custom field has options, the value must match the name of the selected option. If field type is multi select, multiple values can be provided in an array. If field type is link, the value must be an object with a url and text property.

Responses

Response Schema: application/json
required
object (DepartmentCustomFieldEntry)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "customFieldId": "string",
    • "fieldType": "agreement",
    • "value": "string",
    • "createdAt": "string",
    • "updatedAt": "string"
    }
}

Document

CreateDocumentTemplate

Creates a new DocumentTemplate from the given input.

Authorizations:
JWT
Request Body schema: application/json
name
required
string

The name of the document template

customId
string

A custom id that can be used instead of the auto-generated ID

dateFormat
string
Enum: "20-07-2021" "20/07/2021" "2021-07-20" "July 20, 2021"

The format of dates in the document template

description
string

The description of the document template

documentType
string

The document type of the document template

language
string
Enum: "da_DK" "en_US"

The format of dates in the document template

Responses

Response Schema: application/json
required
object (DocumentTemplate)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "documentType": "string",
    • "language": "string",
    • "dateFormat": "string",
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000"
    }
}

DeleteDocumentTemplate

Deletes an existing DocumentTemplate.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the DocumentTemplate to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/documentTemplates/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetDocument

Fetches a specific document.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the document

Responses

Response Schema: application/json
createdAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

fileExtension
required
string

The extension of the file

fileName
required
string

The name of the file

folderId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

content
string
Deprecated

Deprecated: Use the URL to handle the content of the file.

documentType
string

The document type that has been assigned to the file

expiresAt
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

object

The ID and name of the employee that the document belongs to. Not returned if fetching documents for a specific employee.

placeholders
object

Object containing placeholders used in the creation of the document

remindAt
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

Array of objects (Signer)

Array of the employees that can sign the document.

url
string

URL for handling content of file. URL expires 20 minutes after generation.

Not generated when bulk fetching documents, like in GetDocuments, only when fetching a single document, like in GetDocument.

When generated from a creation request, like UploadEmployeeDocument, then you can use a PUT request to the URL to upload the file content.

When generated from a fetch request, like GetEmployeeDocument, then you can use a GET request to the URL to download the file content.

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/documents/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "documentType": "string",
  • "fileName": "string",
  • "fileExtension": "string",
  • "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",
  • "content": "string",
  • "url": "string",
  • "owner": {
    • "name": "string",
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    },
  • "placeholders": {
    • "property1": "string",
    • "property2": "string"
    },
  • "signers": [
    • {
      • "id": "string",
      • "name": "string",
      • "email": "string",
      • "owner": true,
      • "signed": true,
      • "signedAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "createdAt": "2022-09-27 18:00:00.000",
  • "remindAt": "2022-09-27 18:00:00.000",
  • "expiresAt": "2022-09-27 18:00:00.000"
}

GetDocumentFolder

Fetches a specific company wide document folder.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the document folder

Responses

Response Schema: application/json
id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

name
required
string

The name of the folder

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/documentFolders/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string"
}

GetDocumentFolders

Fetches company wide document folders, meaning it does not fetch document folders that are specific to a single employee.

Authorizations:
JWT
query Parameters
offset
number <double>
size
number <double>

Responses

Response Schema: application/json
required
Array of objects (DocumentFolder)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/documentFolders?size=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetDocuments

Fetches documents for the company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
createdAt
string
offset
integer <int32>

Specifies the amount of items to skip before selection.

operator
string
Enum: "equal" "greater" "greaterEqual" "less" "lessEqual" "like" "notEqual"
Example: operator=equal

Sets which operator should be used for filtering.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (Document)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/documents?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&createdAt=SOME_STRING_VALUE&operator=equal' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "documentType": "string",
      • "fileName": "string",
      • "fileExtension": "string",
      • "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",
      • "content": "string",
      • "url": "string",
      • "owner": {
        • "name": "string",
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        },
      • "placeholders": {
        • "property1": "string",
        • "property2": "string"
        },
      • "signers": [
        • {
          • "id": "string",
          • "name": "string",
          • "email": "string",
          • "owner": true,
          • "signed": true,
          • "signedAt": "2022-09-27 18:00:00.000"
          }
        ],
      • "createdAt": "2022-09-27 18:00:00.000",
      • "remindAt": "2022-09-27 18:00:00.000",
      • "expiresAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetDocumentTemplate

Fetches a specific DocumentTemplate given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the DocumentTemplate

Responses

Response Schema: application/json
createdAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

dateFormat
required
string

The format of dates used in the template

id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

language
required
string

The language that the template is written in

name
required
string

The name of the template

updatedAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

description
string

The description of the template

documentType
string

The document type that the template relates to

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/documentTemplates/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "documentType": "string",
  • "language": "string",
  • "dateFormat": "string",
  • "createdAt": "2022-09-27 18:00:00.000",
  • "updatedAt": "2022-09-27 18:00:00.000"
}

GetDocumentTemplates

Fetches DocumentTemplates in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (DocumentTemplate)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/documentTemplates?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "description": "string",
      • "documentType": "string",
      • "language": "string",
      • "dateFormat": "string",
      • "createdAt": "2022-09-27 18:00:00.000",
      • "updatedAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetUnsignedDocument

Fetches a specific unsigned document.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the document

Responses

Response Schema: application/json
createdAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

fileExtension
required
string

The extension of the file

fileName
required
string

The name of the file

folderId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

content
string
Deprecated

Deprecated: Use the URL to handle the content of the file.

documentType
string

The document type that has been assigned to the file

expiresAt
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

object

The ID and name of the employee that the document belongs to. Not returned if fetching documents for a specific employee.

placeholders
object

Object containing placeholders used in the creation of the document

remindAt
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

Array of objects (Signer)

Array of the employees that can sign the document.

url
string

URL for handling content of file. URL expires 20 minutes after generation.

Not generated when bulk fetching documents, like in GetDocuments, only when fetching a single document, like in GetDocument.

When generated from a creation request, like UploadEmployeeDocument, then you can use a PUT request to the URL to upload the file content.

When generated from a fetch request, like GetEmployeeDocument, then you can use a GET request to the URL to download the file content.

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/unsignedDocuments/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "documentType": "string",
  • "fileName": "string",
  • "fileExtension": "string",
  • "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",
  • "content": "string",
  • "url": "string",
  • "owner": {
    • "name": "string",
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    },
  • "placeholders": {
    • "property1": "string",
    • "property2": "string"
    },
  • "signers": [
    • {
      • "id": "string",
      • "name": "string",
      • "email": "string",
      • "owner": true,
      • "signed": true,
      • "signedAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "createdAt": "2022-09-27 18:00:00.000",
  • "remindAt": "2022-09-27 18:00:00.000",
  • "expiresAt": "2022-09-27 18:00:00.000"
}

GetUnsignedDocuments

Fetches unsigned documents for the company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
createdAt
string
offset
integer <int32>

Specifies the amount of items to skip before selection.

operator
string
Enum: "equal" "greater" "greaterEqual" "less" "lessEqual" "like" "notEqual"
Example: operator=equal

Sets which operator should be used for filtering.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (Document)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/unsignedDocuments?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&createdAt=SOME_STRING_VALUE&operator=equal' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "documentType": "string",
      • "fileName": "string",
      • "fileExtension": "string",
      • "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",
      • "content": "string",
      • "url": "string",
      • "owner": {
        • "name": "string",
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        },
      • "placeholders": {
        • "property1": "string",
        • "property2": "string"
        },
      • "signers": [
        • {
          • "id": "string",
          • "name": "string",
          • "email": "string",
          • "owner": true,
          • "signed": true,
          • "signedAt": "2022-09-27 18:00:00.000"
          }
        ],
      • "createdAt": "2022-09-27 18:00:00.000",
      • "remindAt": "2022-09-27 18:00:00.000",
      • "expiresAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateDocumentTemplate

Updates an existing DocumentTemplate.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the DocumentTemplate that is going to be updated

Request Body schema: application/json
name
required
string

The name of the document template

customId
string or null

A custom id that can be used instead of the auto-generated ID

dateFormat
string
Enum: "20-07-2021" "20/07/2021" "2021-07-20" "July 20, 2021"

The format of dates in the document template

description
string

The description of the document template

documentType
string

The document type of the document template

language
string
Enum: "da_DK" "en_US"

The format of dates in the document template

Responses

Response Schema: application/json
required
object (DocumentTemplate)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "documentType": "string",
    • "language": "string",
    • "dateFormat": "string",
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000"
    }
}

Employee

CreateEmployee

Creates a new employee from the given input.

Authorizations:
JWT
Request Body schema: application/json
required
object (OverwrittenSystemFields)

The system fields of the employee

companyAdmin
boolean

Whether or not the employee is an administrator

Array of objects (CustomFieldInput)

An array of objects containing the id and value of custom fields belonging to the employee

customId
string

A custom id that can be used instead of the auto-generated ID

Array of objects (EmployeeDepartmentInput)

The departments that the employee belongs to

invitationLanguage
string
Enum: "da_DK" "en_US"

The language used in the invitation email

leader
boolean

Whether or not the employee is a leader

password
string

The password for the user. If omitted, a password is generated automatically

object (EmployeePictureInput)
sendInvitation
boolean

Whether or not to send an invitation to the email given in systemFields

systemUser
boolean

Whether or not the employee is a system user

Responses

Response Schema: application/json
required
object (Employee)
password
required
string

The user's password. Will be either the one provided in the request or an auto-generated one

success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "systemFields": {
    • "lastName": "string",
    • "email": "string",
    • "firstName": "string"
    }
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "companyAdmin": true,
    • "leader": true,
    • "archived": true,
    • "systemUser": true,
    • "picture": {
      • "url": "string"
      },
    • "roles": {
      • "employee": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "name": "string"
          }
        ],
      • "department": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "name": "string",
          • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
          • "departmentName": "string"
          }
        ],
      • "company": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "name": "string"
          }
        ]
      },
    • "departments": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
        • "departmentCustomId": "string",
        • "name": "string",
        • "leader": true
        }
      ],
    • "systemFields": {
      • "address": "string",
      • "age": 0,
      • "alternateFirstName": "string",
      • "alternateLastName": "string",
      • "bankAccountNumber": "string",
      • "baseSalary": {
        • "amount": 0,
        • "currency": "DKK"
        },
      • "bankRegistrationNumber": "string",
      • "birthDate": "string",
      • "city": "string",
      • "country": "string",
      • "cpr": "string",
      • "directManager": {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "name": "string"
        },
      • "email": "string",
      • "emailSecondary": "string",
      • "employeeNumber": "string",
      • "employmentEnd": "string",
      • "employmentJurisdiction": "string",
      • "employmentStart": "string",
      • "employmentTime": 0,
      • "firstName": "string",
      • "gender": "string",
      • "hoursPerWeek": 0,
      • "initials": "string",
      • "jobPositionDescription": "string",
      • "jobPositionTitle": "string",
      • "jobPositionType": "string",
      • "jobPositionWorkingHours": "string",
      • "lastName": "string",
      • "locale": "string",
      • "mobile": "string",
      • "mobilePrivate": "string",
      • "phone": "string",
      • "postalCode": "string",
      • "seniority": "string"
      },
    • "customFields": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "name": "string",
        • "type": "string",
        • "value": "string"
        }
      ],
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000",
    • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    • "customId": "string"
    },
  • "password": "string"
}

CreateEmployeeCompetence

Grants a competence to an employee.

Authorizations:
JWT
path Parameters
employeeId
required
string
Request Body schema: application/json
competenceId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

Responses

Response Schema: application/json
required
object (EmployeeCompetence)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "competenceId": "a888c1d6-c293-4bde-8407-e56fd9877e5e"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "addedDate": "2022-09-27 18:00:00.000",
    • "approvedDate": "2022-09-27 18:00:00.000",
    • "expireDate": "2022-09-27 18:00:00.000"
    }
}

CreateEmployeeRole

Grants a role to an employee.

Authorizations:
JWT
path Parameters
employeeId
required
string <uuid>

Stringified UUIDv4. See RFC 4112

Request Body schema: application/json
roleId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

departmentId
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

inheritToDescendants
boolean

If set to true, the user will have the permissions of this role in all descendant departments as well. Only available when also sending a departmentId.

onlyIncludeInDescendants
boolean

If set to true, the user will only have the permissions of this role in the descendant departments. Only available when inheritToDescendants is set to true.

Responses

Response Schema: application/json
required
object (EmployeeRole)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "roleId": "7382d58e-652a-4905-b7c9-bcca1e0e5391"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "roleId": "7382d58e-652a-4905-b7c9-bcca1e0e5391",
    • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
    • "inheritToDescendants": true,
    • "onlyIncludeInDescendants": true
    }
}

DeleteEmployee

Deletes an existing employee.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the employee to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/employees/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteEmployeeCompetence

Removes a competence from an employee.

Authorizations:
JWT
path Parameters
competenceId
required
string
employeeId
required
string

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/employees/%7BemployeeId%7D/competences/%7BcompetenceId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteEmployeeDepartmentRole

Removes a department role from an employee.

Authorizations:
JWT
path Parameters
departmentId
required
string <uuid>

Stringified UUIDv4. See RFC 4112

employeeId
required
string <uuid>

Stringified UUIDv4. See RFC 4112

roleId
required
string <uuid>

Stringified UUIDv4. See RFC 4112

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/employees/%7BemployeeId%7D/roles/%7BroleId%7D/department/%7BdepartmentId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteEmployeeDocument

Deletes an existing document.

Authorizations:
JWT
path Parameters
documentId
required
string

The UUID of the document

id
required
string

The UUID of the employee

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/employees/%7Bid%7D/documents/%7BdocumentId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteEmployeeRole

Removes a role from an employee.

Authorizations:
JWT
path Parameters
employeeId
required
string <uuid>

Stringified UUIDv4. See RFC 4112

roleId
required
string <uuid>

Stringified UUIDv4. See RFC 4112

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/employees/%7BemployeeId%7D/roles/%7BroleId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetEmployee

Fetches a specific employee given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the employee

Responses

Response Schema: application/json
archived
required
boolean

Whether or not the employee has been archived

companyAdmin
required
boolean

Whether or not the employee is an administrator of the company

createdAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

required
Array of objects (EmployeeCustomField)

The custom fields of the employee

customId
required
string

The custom ID of the employee

employeeId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

required
UUID (string) or string

ID of the employee or the custom ID if set

leader
required
boolean

Whether or not the employee is a leader

required
object (SystemFields)
systemUser
required
boolean

Whether or not the employee is a system user

updatedAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

Array of objects (EmployeeDepartment)

The departments that the employee belongs to

object (EmployeePicture)
object (Roles)

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/employees/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "companyAdmin": true,
  • "leader": true,
  • "archived": true,
  • "systemUser": true,
  • "picture": {
    • "url": "string"
    },
  • "roles": {
    • "employee": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "name": "string"
        }
      ],
    • "department": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "name": "string",
        • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
        • "departmentName": "string"
        }
      ],
    • "company": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "name": "string"
        }
      ]
    },
  • "departments": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
      • "departmentCustomId": "string",
      • "name": "string",
      • "leader": true
      }
    ],
  • "systemFields": {
    • "address": "string",
    • "age": 0,
    • "alternateFirstName": "string",
    • "alternateLastName": "string",
    • "bankAccountNumber": "string",
    • "baseSalary": {
      • "amount": 0,
      • "currency": "DKK"
      },
    • "bankRegistrationNumber": "string",
    • "birthDate": "string",
    • "city": "string",
    • "country": "string",
    • "cpr": "string",
    • "directManager": {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string"
      },
    • "email": "string",
    • "emailSecondary": "string",
    • "employeeNumber": "string",
    • "employmentEnd": "string",
    • "employmentJurisdiction": "string",
    • "employmentStart": "string",
    • "employmentTime": 0,
    • "firstName": "string",
    • "gender": "string",
    • "hoursPerWeek": 0,
    • "initials": "string",
    • "jobPositionDescription": "string",
    • "jobPositionTitle": "string",
    • "jobPositionType": "string",
    • "jobPositionWorkingHours": "string",
    • "lastName": "string",
    • "locale": "string",
    • "mobile": "string",
    • "mobilePrivate": "string",
    • "phone": "string",
    • "postalCode": "string",
    • "seniority": "string"
    },
  • "customFields": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "type": "string",
      • "value": "string"
      }
    ],
  • "createdAt": "2022-09-27 18:00:00.000",
  • "updatedAt": "2022-09-27 18:00:00.000",
  • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
  • "customId": "string"
}

GetEmployeeCompetence

Fetches a specific competence for an employee given the ID of the employee and competence.

Authorizations:
JWT
path Parameters
competenceId
required
string

The UUID of the competence

employeeId
required
string

Responses

Response Schema: application/json
addedDate
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

approvedDate
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

expireDate
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

name
required
string

The name of the competence

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/employees/%7BemployeeId%7D/competences/%7BcompetenceId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "addedDate": "2022-09-27 18:00:00.000",
  • "approvedDate": "2022-09-27 18:00:00.000",
  • "expireDate": "2022-09-27 18:00:00.000"
}

GetEmployeeCompetences

Fetches employee competences. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
path Parameters
employeeId
required
string
query Parameters
offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (EmployeeCompetence)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/employees/%7BemployeeId%7D/competences?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "addedDate": "2022-09-27 18:00:00.000",
      • "approvedDate": "2022-09-27 18:00:00.000",
      • "expireDate": "2022-09-27 18:00:00.000"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetEmployeeDocument

Fetches a specific document for an employee given the ID of the employee and document.

Authorizations:
JWT
path Parameters
documentId
required
string

The UUID of the document

id
required
string

The UUID of the employee

Responses

Response Schema: application/json
createdAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

fileExtension
required
string

The extension of the file

fileName
required
string

The name of the file

folderId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

content
string
Deprecated

Deprecated: Use the URL to handle the content of the file.

documentType
string

The document type that has been assigned to the file

expiresAt
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

object

The ID and name of the employee that the document belongs to. Not returned if fetching documents for a specific employee.

placeholders
object

Object containing placeholders used in the creation of the document

remindAt
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

Array of objects (Signer)

Array of the employees that can sign the document.

url
string

URL for handling content of file. URL expires 20 minutes after generation.

Not generated when bulk fetching documents, like in GetDocuments, only when fetching a single document, like in GetDocument.

When generated from a creation request, like UploadEmployeeDocument, then you can use a PUT request to the URL to upload the file content.

When generated from a fetch request, like GetEmployeeDocument, then you can use a GET request to the URL to download the file content.

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/employees/%7Bid%7D/documents/%7BdocumentId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "documentType": "string",
  • "fileName": "string",
  • "fileExtension": "string",
  • "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",
  • "content": "string",
  • "url": "string",
  • "owner": {
    • "name": "string",
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    },
  • "placeholders": {
    • "property1": "string",
    • "property2": "string"
    },
  • "signers": [
    • {
      • "id": "string",
      • "name": "string",
      • "email": "string",
      • "owner": true,
      • "signed": true,
      • "signedAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "createdAt": "2022-09-27 18:00:00.000",
  • "remindAt": "2022-09-27 18:00:00.000",
  • "expiresAt": "2022-09-27 18:00:00.000"
}

GetEmployeeDocuments

Fetches documents for the employee given their ID. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
path Parameters
id
required
string
query Parameters
offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (Document)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/employees/%7Bid%7D/documents?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "documentType": "string",
      • "fileName": "string",
      • "fileExtension": "string",
      • "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",
      • "content": "string",
      • "url": "string",
      • "owner": {
        • "name": "string",
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        },
      • "placeholders": {
        • "property1": "string",
        • "property2": "string"
        },
      • "signers": [
        • {
          • "id": "string",
          • "name": "string",
          • "email": "string",
          • "owner": true,
          • "signed": true,
          • "signedAt": "2022-09-27 18:00:00.000"
          }
        ],
      • "createdAt": "2022-09-27 18:00:00.000",
      • "remindAt": "2022-09-27 18:00:00.000",
      • "expiresAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetEmployeeLogs

Fetches logged actions for an employee in your company. Logs events are ordered by timestamp Use size and previousPage/nextPage to paginate

Authorizations:
JWT
path Parameters
id
required
string <uuid>

Id of the employee to fetch logs for

query Parameters
action
string
Enum: "access" "create" "delete" "edit"

Enables filtering on the action of the log entry.

context
string
Enum: "api" "unknown" "web" "zenegy"

enable filtering by context of the logged event (web, api, unknown)

objectType
string
Enum: "customField" "systemField"

Enables filtering on the affected type of the logged action

order
string
Enum: "ASC" "DESC"
Example: order=ASC

Order log events by timestamp ascending or descending

size
integer <int32> [ 0 .. 100 ]

Specifies the amount of items to be returned. Default 100.

timestamp
string <DateTime ISO 8601>
Example: timestamp=2022-09-27 18:00:00.000

Enables filtering by timestamp

Responses

Response Schema: application/json
required
Array of objects (Log)
required
object (NextPageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/employees/%7Bid%7D/logs?objectType=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&action=SOME_STRING_VALUE&context=SOME_STRING_VALUE&order=ASC&timestamp=2022-09-27%2018%3A00%3A00.000' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "string",
      • "timestamp": "2022-09-27 18:00:00.000",
      • "actorId": "d2f1b55c-8cee-4a0d-af57-aebaeff77518",
      • "action": "access",
      • "objectId": "e39ea5f2-2188-47f8-add0-f1976630af5e",
      • "objectType": "customField",
      • "history": {
        • "beforeChange": {
          • "property1": null,
          • "property2": null
          },
        • "afterChange": {
          • "property1": null,
          • "property2": null
          }
        },
      • "source": "api"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "nextPage": 0
    }
}

GetEmployeeRole

Fetches a specific role for an employee given the ID of the employee and role.

Authorizations:
JWT
path Parameters
employeeId
required
string <uuid>

The UUID of the employee

roleId
required
string <uuid>

The UUID of the role

Responses

Response Schema: application/json
employeeId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

roleId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

departmentId
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

inheritToDescendants
boolean

If set to true, the user will have the permissions of this role in all descendant departments as well. Only available for roles with a departmentId.

onlyIncludeInDescendants
boolean

If set to true, the user will only have the permissions of this role in the descendant departments. Only available when inheritToDescendants is true.

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/employees/%7BemployeeId%7D/roles/%7BroleId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "roleId": "7382d58e-652a-4905-b7c9-bcca1e0e5391",
  • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
  • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
  • "inheritToDescendants": true,
  • "onlyIncludeInDescendants": true
}

GetEmployeeRoles

Fetches employee roles. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
path Parameters
employeeId
required
string <uuid>

Stringified UUIDv4. See RFC 4112

query Parameters
offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (EmployeeRole)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/employees/%7BemployeeId%7D/roles?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "roleId": "7382d58e-652a-4905-b7c9-bcca1e0e5391",
      • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
      • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
      • "inheritToDescendants": true,
      • "onlyIncludeInDescendants": true
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetEmployees

Fetches employees in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
createdAt
string

Enables filtering on the createdAt column. Expected format is ISO 8601.

customFieldId
string

Enables filtering on a custom field. Use in conjunction with value.

departmentId
string

Enables filtering on a specific department.

offset
integer <int32>

Specifies the amount of items to skip before selection.

operator
string
Enum: "equal" "greater" "greaterEqual" "less" "lessEqual" "like" "notEqual"
Example: operator=equal

Sets which operator should be used for filtering. Defaults to 'equal'.

order
string
Enum: "ASC" "DESC"

Specifies the ordering of items. Defaults to ASC (ascending).

orderBy
string
Enum: "birthDate" "createdAt" "employmentEnd" "employmentStart" "firstName" "lastName" "postalCode" "updatedAt"

Specifies which attribute to order items by. Defaults to firstName.

roleId
string

Enables filtering on a specific role.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20. Maximum is 20.

systemField
string
Enum: "address" "bankAccountNumber" "bankRegistrationNumber" "birthDate" "city" "country" "cpr" "email" "emailSecondary" "employeeNumber" "employmentEnd" "employmentStart" "firstName" "jobPositionDescription" "jobPositionTitle" "jobPositionType" "jobPositionWorkingHours" "lastName" "locale" "mobile" "mobilePrivate" "phone" "postalCode" "seniority"

Enables filtering on a system field. Use in conjunction with value.

updatedAt
string

Enables filtering on the updatedAt column. Expected format is ISO 8601.

value
string

The value of the system field or custom field that should be filtered by. Use in conjunction with systemField or customFieldId. If the custom field value is from an option then the optionId should be provided as the value.

Responses

Response Schema: application/json
required
Array of objects (Employee)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/employees?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&order=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&createdAt=SOME_STRING_VALUE&updatedAt=SOME_STRING_VALUE&systemField=SOME_STRING_VALUE&customFieldId=SOME_STRING_VALUE&departmentId=SOME_STRING_VALUE&roleId=SOME_STRING_VALUE&value=SOME_STRING_VALUE&operator=equal' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "companyAdmin": true,
      • "leader": true,
      • "archived": true,
      • "systemUser": true,
      • "picture": {
        • "url": "string"
        },
      • "roles": {
        • "employee": [
          • {
            • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            • "name": "string"
            }
          ],
        • "department": [
          • {
            • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            • "name": "string",
            • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
            • "departmentName": "string"
            }
          ],
        • "company": [
          • {
            • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            • "name": "string"
            }
          ]
        },
      • "departments": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
          • "departmentCustomId": "string",
          • "name": "string",
          • "leader": true
          }
        ],
      • "systemFields": {
        • "address": "string",
        • "age": 0,
        • "alternateFirstName": "string",
        • "alternateLastName": "string",
        • "bankAccountNumber": "string",
        • "baseSalary": {
          • "amount": 0,
          • "currency": "DKK"
          },
        • "bankRegistrationNumber": "string",
        • "birthDate": "string",
        • "city": "string",
        • "country": "string",
        • "cpr": "string",
        • "directManager": {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "name": "string"
          },
        • "email": "string",
        • "emailSecondary": "string",
        • "employeeNumber": "string",
        • "employmentEnd": "string",
        • "employmentJurisdiction": "string",
        • "employmentStart": "string",
        • "employmentTime": 0,
        • "firstName": "string",
        • "gender": "string",
        • "hoursPerWeek": 0,
        • "initials": "string",
        • "jobPositionDescription": "string",
        • "jobPositionTitle": "string",
        • "jobPositionType": "string",
        • "jobPositionWorkingHours": "string",
        • "lastName": "string",
        • "locale": "string",
        • "mobile": "string",
        • "mobilePrivate": "string",
        • "phone": "string",
        • "postalCode": "string",
        • "seniority": "string"
        },
      • "customFields": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "name": "string",
          • "type": "string",
          • "value": "string"
          }
        ],
      • "createdAt": "2022-09-27 18:00:00.000",
      • "updatedAt": "2022-09-27 18:00:00.000",
      • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
      • "customId": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetEmployeeUnsignedDocument

Fetches a specific document for an employee given the ID of the employee and document.

Authorizations:
JWT
path Parameters
documentId
required
string

The UUID of the document

id
required
string

The UUID of the employee

Responses

Response Schema: application/json
createdAt
required
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

fileExtension
required
string

The extension of the file

fileName
required
string

The name of the file

folderId
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

content
string
Deprecated

Deprecated: Use the URL to handle the content of the file.

documentType
string

The document type that has been assigned to the file

expiresAt
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

object

The ID and name of the employee that the document belongs to. Not returned if fetching documents for a specific employee.

placeholders
object

Object containing placeholders used in the creation of the document

remindAt
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

Array of objects (Signer)

Array of the employees that can sign the document.

url
string

URL for handling content of file. URL expires 20 minutes after generation.

Not generated when bulk fetching documents, like in GetDocuments, only when fetching a single document, like in GetDocument.

When generated from a creation request, like UploadEmployeeDocument, then you can use a PUT request to the URL to upload the file content.

When generated from a fetch request, like GetEmployeeDocument, then you can use a GET request to the URL to download the file content.

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/employees/%7Bid%7D/unsignedDocuments/%7BdocumentId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "documentType": "string",
  • "fileName": "string",
  • "fileExtension": "string",
  • "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",
  • "content": "string",
  • "url": "string",
  • "owner": {
    • "name": "string",
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    },
  • "placeholders": {
    • "property1": "string",
    • "property2": "string"
    },
  • "signers": [
    • {
      • "id": "string",
      • "name": "string",
      • "email": "string",
      • "owner": true,
      • "signed": true,
      • "signedAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "createdAt": "2022-09-27 18:00:00.000",
  • "remindAt": "2022-09-27 18:00:00.000",
  • "expiresAt": "2022-09-27 18:00:00.000"
}

GetEmployeeUnsignedDocuments

Fetches employees in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
path Parameters
id
required
string
query Parameters
offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (Document)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/employees/%7Bid%7D/unsignedDocuments?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "documentType": "string",
      • "fileName": "string",
      • "fileExtension": "string",
      • "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",
      • "content": "string",
      • "url": "string",
      • "owner": {
        • "name": "string",
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        },
      • "placeholders": {
        • "property1": "string",
        • "property2": "string"
        },
      • "signers": [
        • {
          • "id": "string",
          • "name": "string",
          • "email": "string",
          • "owner": true,
          • "signed": true,
          • "signedAt": "2022-09-27 18:00:00.000"
          }
        ],
      • "createdAt": "2022-09-27 18:00:00.000",
      • "remindAt": "2022-09-27 18:00:00.000",
      • "expiresAt": "2022-09-27 18:00:00.000"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateEmployee

Updates an existing employee.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the employee that is going to be updated

Request Body schema: application/json
archived
boolean

Whether or not the employee is archived

companyAdmin
boolean

Whether or not the employee is an administrator

Array of objects (CustomFieldInput)

An array of objects containing the id and value of custom fields belonging to the employee

object (CustomFieldTableInput)
customId
string or null

A custom id that can be used instead of the auto-generated ID

Array of objects (EmployeeDepartmentInput)

The departments that the employee belongs to

leader
boolean

Whether or not the employee is a leader

object (EmployeePictureInput)
object (SystemFieldsInput)

The system fields of the employee

systemUser
boolean

Whether or not the employee is a system user

Responses

Response Schema: application/json
required
object (Employee)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "companyAdmin": true,
    • "leader": true,
    • "archived": true,
    • "systemUser": true,
    • "picture": {
      • "url": "string"
      },
    • "roles": {
      • "employee": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "name": "string"
          }
        ],
      • "department": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "name": "string",
          • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
          • "departmentName": "string"
          }
        ],
      • "company": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "name": "string"
          }
        ]
      },
    • "departments": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "departmentId": "a3452d1e-b055-4677-aa66-858ddc0a1f59",
        • "departmentCustomId": "string",
        • "name": "string",
        • "leader": true
        }
      ],
    • "systemFields": {
      • "address": "string",
      • "age": 0,
      • "alternateFirstName": "string",
      • "alternateLastName": "string",
      • "bankAccountNumber": "string",
      • "baseSalary": {
        • "amount": 0,
        • "currency": "DKK"
        },
      • "bankRegistrationNumber": "string",
      • "birthDate": "string",
      • "city": "string",
      • "country": "string",
      • "cpr": "string",
      • "directManager": {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "name": "string"
        },
      • "email": "string",
      • "emailSecondary": "string",
      • "employeeNumber": "string",
      • "employmentEnd": "string",
      • "employmentJurisdiction": "string",
      • "employmentStart": "string",
      • "employmentTime": 0,
      • "firstName": "string",
      • "gender": "string",
      • "hoursPerWeek": 0,
      • "initials": "string",
      • "jobPositionDescription": "string",
      • "jobPositionTitle": "string",
      • "jobPositionType": "string",
      • "jobPositionWorkingHours": "string",
      • "lastName": "string",
      • "locale": "string",
      • "mobile": "string",
      • "mobilePrivate": "string",
      • "phone": "string",
      • "postalCode": "string",
      • "seniority": "string"
      },
    • "customFields": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "name": "string",
        • "type": "string",
        • "value": "string"
        }
      ],
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000",
    • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    • "customId": "string"
    }
}

UploadEmployeeDocument

Uploads a document that belongs to the employee.

Authorizations:
JWT
path Parameters
id
required
string
Request Body schema: application/json
fileName
required
string

The name of the file including its extension. e.g. some_file_name.pdf

fileType
required
string

The type of the file. A file is either a document or a user's logo.

access
string
Deprecated
Enum: "private" "public"

This property is deprecated and has no effect. Please use expiresAt instead.

content
string
Deprecated

Deprecated: Use the returned S3 upload URL to upload the file content.

The content of the file in base64. Files uploaded in this manner may be no larger than 4 mb. If not included, an AWS S3 upload URL will be returned that accepts standard PUT upload requests. Files uploaded using S3 upload may be up to 50 mb in size.

documentType
string

The type of document

expiresAt
string <DateTime ISO 8601> (DateTime)

ISO 8601 date and time format (UTC timezone). See ISO 8601

folderId
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

Responses

Response Schema: application/json
required
object (Document)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "fileName": "string",
  • "fileType": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "documentType": "string",
    • "fileName": "string",
    • "fileExtension": "string",
    • "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e",
    • "content": "string",
    • "url": "string",
    • "owner": {
      • "name": "string",
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      },
    • "placeholders": {
      • "property1": "string",
      • "property2": "string"
      },
    • "signers": [
      • {
        • "id": "string",
        • "name": "string",
        • "email": "string",
        • "owner": true,
        • "signed": true,
        • "signedAt": "2022-09-27 18:00:00.000"
        }
      ],
    • "createdAt": "2022-09-27 18:00:00.000",
    • "remindAt": "2022-09-27 18:00:00.000",
    • "expiresAt": "2022-09-27 18:00:00.000"
    }
}

Role

GetRole

Fetches a specific role given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the role

Responses

Response Schema: application/json
id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

name
required
string

The name of the role

type
required
string
Enum: "company" "department" "employee"

The type of the role

description
string

The description of the role

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/roles/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "type": "company"
}

GetRoles

Fetches roles in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

type
string
Enum: "company" "department" "employee"

Specifies the type of role to filter by.

Responses

Response Schema: application/json
required
Array of objects (Role)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/roles?type=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "description": "string",
      • "type": "company"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

Scheduled Data Change

GetScheduledDataChanges

Fetches scheduled data changes in your company. Use size and offset parameters to paginate through the results.
If a change requires approval, but the target field is not set up for retroactive or future changes, valid_from will be the timestamp at which the change gets approved, and prior to approval it will be null.

Authorizations:
JWT
query Parameters
customFieldId
string <uuid>

Fetch scheduled data changes for a specific custom field.

employeeId
string <uuid>

Fetch scheduled data changes for a specific employee.

offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20, maximum 100.

systemFieldName
string

Fetch scheduled data changes for a specific system field.

Responses

Response Schema: application/json
required
Array of objects (ScheduledDataChange)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/scheduledDataChanges?employeeId=SOME_STRING_VALUE&customFieldId=SOME_STRING_VALUE&systemFieldName=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "string",
      • "employeeId": "string",
      • "customFieldId": "string",
      • "systemFieldName": "string",
      • "value": "string",
      • "validFrom": "string",
      • "createdByEmployeeId": "string",
      • "createdAt": "string",
      • "requiresApproval": true,
      • "approvedAt": "string",
      • "deniedAt": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

SystemField

GetSystemFields

Fetches system field metadata for your company, including allowed option values when available.

Authorizations:
JWT

Responses

Response Schema: application/json
Array
changesMustBeApproved
required
boolean

Whether changes to this field must be approved.

fieldType
required
string

Type of the system field.

name
required
string

Name of the system field.

readOnly
required
boolean

Whether this field is read-only.

required
required
boolean

Whether this field is required for the company.

sensitive
required
boolean

Whether this field is marked as sensitive.

supportsScheduledChanges
required
boolean

Whether this field supports scheduled data changes.

options
Array of strings or null

Allowed values for this field when options exist.

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/systemFields \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
[
  • {
    • "name": "string",
    • "fieldType": "string",
    • "readOnly": true,
    • "required": true,
    • "sensitive": true,
    • "supportsScheduledChanges": true,
    • "changesMustBeApproved": true,
    • "options": [
      • "string"
      ]
    }
]

Template

CreateTemplatePlaceholder

Creates a new TemplatePlaceholder from the given input.

Authorizations:
JWT
Request Body schema: application/json
name
required
string

The name of the placeholder

value
required
string

The value of the placeholder

customFieldId
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

customId
string

A custom id that can be used instead of the auto-generated ID

Responses

Response Schema: application/json
required
object (TemplatePlaceholder)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string",
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "value": "string",
    • "customField": {
      • "name": "string",
      • "id": "string"
      }
    }
}

DeleteTemplatePlaceholder

Deletes an existing template placeholder.

Authorizations:
JWT
path Parameters
id
required
string

The ID of the template placeholder to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/templatePlaceholders/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetTemplatePlaceholder

Fetches a specific TemplatePlaceholder given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The ID of the TemplatePlaceholder

Responses

Response Schema: application/json
id
required
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

name
required
string

The name of the placeholder

value
required
string

The value of the placeholder

object

The ID of the custom field that the placeholder belongs to

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/templatePlaceholders/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "value": "string",
  • "customField": {
    • "name": "string",
    • "id": "string"
    }
}

GetTemplatePlaceholders

Fetches template placeholders in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (TemplatePlaceholder)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/templatePlaceholders?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "value": "string",
      • "customField": {
        • "name": "string",
        • "id": "string"
        }
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateTemplatePlaceholder

Updates an existing template placeholder.

Authorizations:
JWT
path Parameters
id
required
string

The ID of the template placeholder that is going to be updated

Request Body schema: application/json
customFieldId
string <uuid> (UUID)

Stringified UUIDv4. See RFC 4112

customId
string or null

A custom id that can be used instead of the auto-generated ID

name
string

The name of the placeholder

value
string

The value of the placeholder

Responses

Response Schema: application/json
required
object (TemplatePlaceholder)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "value": "string",
    • "customField": {
      • "name": "string",
      • "id": "string"
      }
    }
}

Time Registration

What is a Time Registration?

A time registration represents a single work session for an employee - from clock-in to clock-out. It corresponds to the /v1/staff/timeRegistrations endpoint, and has a startDate and (once finished) an endDate.

Everything else described below either configures a time registration, or records what happened during one.

Entries: what happened during the session

A time registration is rarely just "worked, uninterrupted, from start to end". Employees take breaks, and may split their time between different projects. Each of these individual events is recorded as a time registration entry, via the /v1/staff/timeRegistrations/entries endpoint.

An entry is always attached to a single time registration (timeRegistrationId), and has an entryType of either:

  • BREAK - references a breakTypeId, identifying which kind of break was taken (e.g. lunch, coffee).
  • PROJECT - references a projectId, identifying which project the time was logged against.

A time registration can have multiple entries, each representing a distinct event or period within the session.

Entries are tracked in chronological order, and are embedded (in order) on a time registration when fetching it by ID - so a single request tells the whole story of a session: clocked in, worked, took a lunch break, resumed working on a project, clocked out.

Configuring the building blocks

Three resources exist purely to configure the options available when creating time registrations and entries. They don't represent events themselves - they're the categories/types those events can be tagged with.

  • Time registration types (/v1/staff/timeRegistrations/types) describe the type of a session itself, e.g. "Office", "Home", "Business trip". Every time registration references one via typeId.
  • Time registration break types (/v1/staff/timeRegistrations/breakTypes) describe the kinds of breaks that can be logged as BREAK entries, e.g. "Lunch", "Coffee". Each break type also defines how many minutes of that break are paid (paidTime).
  • Time registration projects (/v1/staff/timeRegistrations/projects) describe the projects that can be logged as PROJECT entries.

Approval

A time registration may require approval before it's considered final - see requiresApproval, approvedAt and deniedAt on the time registration.
This is usually only the case for automatically created registrations from a template.

CreateTimeRegistration

Creates a new time registration from the given input.

Authorizations:
JWT
Request Body schema: application/json
employeeId
required
string <uuid>

The UUID of the employee the time registration belongs to

endDate
required
string <DateTime ISO 8601>

The end date and time of the time registration

startDate
required
string <DateTime ISO 8601>

The start date and time of the time registration

typeId
required
string <uuid>

The UUID of the time registration type

note
string

A note attached to the time registration

Responses

Response Schema: application/json
required
object (TimeRegistration)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
  • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
  • "startDate": "string",
  • "endDate": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
    • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    • "startDate": "string",
    • "endDate": "string",
    • "note": "string",
    • "requiresApproval": true,
    • "approvedAt": "string",
    • "deniedAt": "string"
    }
}

CreateTimeRegistrationBreakType

Creates a new time registration break type from the given input.

Authorizations:
JWT
Request Body schema: application/json
name
required
string

The name of the break type

code
string

An identification code for the break type

emoji
string
Default: "ℹ️"

The emoji representing the break type

paidTime
number <double> >= 0
Default: 0

How many minutes of the break are paid time

Responses

Response Schema: application/json
required
object (TimeRegistrationBreakType)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "code": "string",
    • "emoji": "string",
    • "paidTime": 15
    }
}

CreateTimeRegistrationEntry

Creates a new time registration entry from the given input.

Authorizations:
JWT
Request Body schema: application/json
endDate
required
string <DateTime ISO 8601>

The end date and time of the entry.

entryType
required
string
Enum: "BREAK" "PROJECT"

The type of the entry

startDate
required
string <DateTime ISO 8601>

The start date and time of the entry

timeRegistrationId
required
string <uuid>

The UUID of the time registration the entry belongs to. The entry's employee and time zone are inherited from it.

breakTypeId
string <uuid>

The UUID of the break type. Required when entryType is "BREAK"

note
string

A note attached to the entry

projectId
string <uuid>

The UUID of the project. Required when entryType is "PROJECT"

Responses

Response Schema: application/json
required
object (TimeRegistrationEntry)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "entryType": "BREAK",
  • "timeRegistrationId": "386778c7-6459-4b83-b81b-acbbb6679e4d",
  • "startDate": "string",
  • "endDate": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "entryType": "BREAK",
    • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    • "timeRegistrationId": "386778c7-6459-4b83-b81b-acbbb6679e4d",
    • "timeRegistrationTypeId": "89115d3c-7a15-43e1-ab0f-826cc45e589d",
    • "breakTypeId": "5b5809af-d405-4a47-9a44-53c0a2885cfb",
    • "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
    • "startDate": "string",
    • "endDate": "string",
    • "note": "string"
    }
}

CreateTimeRegistrationProject

Creates a new time registration project from the given input.

Authorizations:
JWT
Request Body schema: application/json
color
required
string

The HEX color code used to represent the project (e.g., #FF5733)

name
required
string

The name of the project

code
string

An identification code for the project

description
string

The description of the project

primaryDepartmentId
string <uuid>

The UUID of the primary department the project belongs to

secondaryDepartmentIds
Array of strings <uuid> (UUID)

The UUIDs of the secondary departments the project belongs to

Responses

Response Schema: application/json
required
object (TimeRegistrationProject)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string",
  • "color": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "code": "string",
    • "color": "string",
    • "primaryDepartmentId": "e793a026-f1a4-4d90-8d68-2c7023f9efbc",
    • "secondaryDepartmentIds": [
      • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ]
    }
}

CreateTimeRegistrationType

Creates a new time registration type from the given input.

Authorizations:
JWT
Request Body schema: application/json
name
required
string

The name of the time registration type

code
string

An identification code for the time registration type

emoji
string
Default: "ℹ️"

The emoji representing the time registration type

Responses

Response Schema: application/json
required
object (TimeRegistrationType)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "code": "string",
    • "emoji": "string"
    }
}

DeleteTimeRegistration

Deletes an existing time registration.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteTimeRegistrationBreakType

Deletes an existing time registration break type.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration break type to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/breakTypes/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteTimeRegistrationEntry

Deletes an existing time registration entry.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration entry to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/entries/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteTimeRegistrationProject

Deletes an existing time registration project.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration project to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/projects/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

DeleteTimeRegistrationType

Deletes an existing time registration type.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration type to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/types/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetTimeRegistration

Fetches a specific time registration given an ID, including its entries (breaks/project time) in chronological order.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration

Responses

Response Schema: application/json
employeeId
required
string <uuid>

The UUID of the employee the time registration belongs to

id
required
string <uuid>

The UUID of the time registration

requiresApproval
required
boolean

Whether or not the time registration requires approval before it is considered final.

startDate
required
string <DateTime ISO 8601>

The start date and time of the time registration

typeId
required
string <uuid>

The UUID of the time registration type

approvedAt
string or null <DateTime ISO 8601>

When the time registration was approved. If approval is not required or the change was denied, this will be null.

deniedAt
string or null <DateTime ISO 8601>

When the time registration was denied. If approval is not required or the change was approved, this will be null.

endDate
string <DateTime ISO 8601>

The end date and time of the time registration. Null if it's still ongoing.

Array of objects (TimeRegistrationEntry)

The entries (breaks/project time) tracked during this time registration, in chronological order.

note
string

A note attached to the time registration

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
  • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
  • "startDate": "string",
  • "endDate": "string",
  • "note": "string",
  • "requiresApproval": true,
  • "approvedAt": "string",
  • "deniedAt": "string",
  • "entries": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "entryType": "BREAK",
      • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
      • "timeRegistrationId": "386778c7-6459-4b83-b81b-acbbb6679e4d",
      • "timeRegistrationTypeId": "89115d3c-7a15-43e1-ab0f-826cc45e589d",
      • "breakTypeId": "5b5809af-d405-4a47-9a44-53c0a2885cfb",
      • "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
      • "startDate": "string",
      • "endDate": "string",
      • "note": "string"
      }
    ]
}

GetTimeRegistrationBreakType

Fetches a specific time registration break type given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration break type

Responses

Response Schema: application/json
emoji
required
string

The emoji representing the break type

id
required
string <uuid>

The UUID of the break type

name
required
string

The name of the break type

paidTime
required
number <double> >= 0

How many minutes of the break are paid time

code
string

An identification code for the break type

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/breakTypes/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "code": "string",
  • "emoji": "string",
  • "paidTime": 15
}

GetTimeRegistrationBreakTypes

Fetches time registration break types in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
code
string

Filter break types by their identification code

offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (TimeRegistrationBreakType)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/timeRegistrations/breakTypes?code=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "code": "string",
      • "emoji": "string",
      • "paidTime": 15
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetTimeRegistrationEntries

Fetches time registration entries in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
breakTypeId
string <uuid>

Filter entries by break type

employeeId
string <uuid>

Filter entries by employee

entryType
string
Enum: "BREAK" "PROJECT"

Filter entries by their type

fromDate
string <DateTime ISO 8601>
Example: fromDate=2022-09-27 18:00:00.000

Fetch entries with a start date greater than or equal to this date

offset
integer <int32>

Specifies the amount of items to skip before selection.

projectId
string <uuid>

Filter entries by project

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

timeRegistrationId
string <uuid>

Filter entries by time registration

timeRegistrationTypeId
string <uuid>

Filter entries by the type of the time registration they were tracked under

toDate
string <DateTime ISO 8601>
Example: toDate=2022-09-27 18:00:00.000

Fetch entries with an end date less than or equal to this date

Responses

Response Schema: application/json
required
Array of objects (TimeRegistrationEntry)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/timeRegistrations/entries?employeeId=SOME_STRING_VALUE&timeRegistrationId=SOME_STRING_VALUE&timeRegistrationTypeId=SOME_STRING_VALUE&entryType=SOME_STRING_VALUE&breakTypeId=SOME_STRING_VALUE&projectId=SOME_STRING_VALUE&fromDate=2022-09-27%2018%3A00%3A00.000&toDate=2022-09-27%2018%3A00%3A00.000&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "entryType": "BREAK",
      • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
      • "timeRegistrationId": "386778c7-6459-4b83-b81b-acbbb6679e4d",
      • "timeRegistrationTypeId": "89115d3c-7a15-43e1-ab0f-826cc45e589d",
      • "breakTypeId": "5b5809af-d405-4a47-9a44-53c0a2885cfb",
      • "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
      • "startDate": "string",
      • "endDate": "string",
      • "note": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetTimeRegistrationEntry

Fetches a specific time registration entry given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration entry

Responses

Response Schema: application/json
employeeId
required
string <uuid>

The UUID of the employee the entry belongs to

entryType
required
string
Enum: "BREAK" "PROJECT"

The type of the entry

id
required
string <uuid>

The UUID of the entry

startDate
required
string <DateTime ISO 8601>

The start date and time of the entry

timeRegistrationId
required
string <uuid>

The UUID of the time registration this entry was tracked under

timeRegistrationTypeId
required
string <uuid>

The UUID of the time registration's type (e.g. office/home/other)

breakTypeId
string <uuid>

The UUID of the break type. Only set when entryType is "BREAK"

endDate
string <DateTime ISO 8601>

The end date and time of the entry. Null if the entry is still ongoing.

note
string

A note attached to the entry

projectId
string <uuid>

The UUID of the project. Only set when entryType is "PROJECT"

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/entries/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "entryType": "BREAK",
  • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
  • "timeRegistrationId": "386778c7-6459-4b83-b81b-acbbb6679e4d",
  • "timeRegistrationTypeId": "89115d3c-7a15-43e1-ab0f-826cc45e589d",
  • "breakTypeId": "5b5809af-d405-4a47-9a44-53c0a2885cfb",
  • "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  • "startDate": "string",
  • "endDate": "string",
  • "note": "string"
}

GetTimeRegistrationProject

Fetches a specific time registration project given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration project

Responses

Response Schema: application/json
color
required
string

The HEX color code used to represent the project (e.g., #FF5733)

id
required
string <uuid>

The UUID of the project

name
required
string

The name of the project

code
string

An identification code for the project

description
string

The description of the project

primaryDepartmentId
string <uuid>

The UUID of the primary department the project belongs to

secondaryDepartmentIds
Array of strings <uuid> (UUID)

The UUIDs of the secondary departments the project belongs to

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/projects/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "code": "string",
  • "color": "string",
  • "primaryDepartmentId": "e793a026-f1a4-4d90-8d68-2c7023f9efbc",
  • "secondaryDepartmentIds": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ]
}

GetTimeRegistrationProjects

Fetches time registration projects in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
code
string

Filter projects by their identification code

offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (TimeRegistrationProject)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/timeRegistrations/projects?code=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "description": "string",
      • "code": "string",
      • "color": "string",
      • "primaryDepartmentId": "e793a026-f1a4-4d90-8d68-2c7023f9efbc",
      • "secondaryDepartmentIds": [
        • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ]
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetTimeRegistrations

Fetches time registrations in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
employeeId
string <uuid>

Filter by employee

fromDate
string <DateTime ISO 8601>
Example: fromDate=2022-09-27 18:00:00.000

Fetch time registrations with a start date greater than or equal to this date

offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

toDate
string <DateTime ISO 8601>
Example: toDate=2022-09-27 18:00:00.000

Fetch time registrations with an end date less than or equal to this date

typeId
string <uuid>

Filter by time registration type

Responses

Response Schema: application/json
required
Array of objects (TimeRegistration)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/timeRegistrations?employeeId=SOME_STRING_VALUE&typeId=SOME_STRING_VALUE&fromDate=2022-09-27%2018%3A00%3A00.000&toDate=2022-09-27%2018%3A00%3A00.000&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
      • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
      • "startDate": "string",
      • "endDate": "string",
      • "note": "string",
      • "requiresApproval": true,
      • "approvedAt": "string",
      • "deniedAt": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

GetTimeRegistrationType

Fetches a specific time registration type given an ID.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration type

Responses

Response Schema: application/json
emoji
required
string

The emoji representing the time registration type

id
required
string <uuid>

The UUID of the time registration type

name
required
string

The name of the time registration type

code
string

An identification code for the time registration type

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/timeRegistrations/types/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "code": "string",
  • "emoji": "string"
}

GetTimeRegistrationTypes

Fetches time registration types in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
code
string

Filter time registration types by their identification code

offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (TimeRegistrationType)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/timeRegistrations/types?code=SOME_STRING_VALUE&size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "name": "string",
      • "code": "string",
      • "emoji": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateTimeRegistration

Updates an existing time registration.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration that is going to be updated

Request Body schema: application/json
endDate
string or null <DateTime ISO 8601>

The end date of the time registration

note
string or null

A note attached to the time registration

startDate
string or null <DateTime ISO 8601>

The start date of the time registration

typeId
string or null <uuid>

The UUID of the time registration type

Responses

Response Schema: application/json
required
object (TimeRegistration)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
    • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    • "startDate": "string",
    • "endDate": "string",
    • "note": "string",
    • "requiresApproval": true,
    • "approvedAt": "string",
    • "deniedAt": "string"
    }
}

UpdateTimeRegistrationBreakType

Updates an existing time registration break type.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration break type that is going to be updated

Request Body schema: application/json
code
string or null

An identification code for the break type

emoji
string or null

The emoji representing the break type

name
string or null

The name of the break type

paidTime
number or null <double> >= 0

How many minutes of the break are paid time

Responses

Response Schema: application/json
required
object (TimeRegistrationBreakType)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "code": "string",
    • "emoji": "string",
    • "paidTime": 15
    }
}

UpdateTimeRegistrationEntry

Updates an existing time registration entry.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration entry that is going to be updated

Request Body schema: application/json
endDate
string or null <DateTime ISO 8601>

The end date and time of the entry

note
string or null

A note attached to the entry

startDate
string or null <DateTime ISO 8601>

The start date and time of the entry

Responses

Response Schema: application/json
required
object (TimeRegistrationEntry)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "entryType": "BREAK",
    • "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    • "timeRegistrationId": "386778c7-6459-4b83-b81b-acbbb6679e4d",
    • "timeRegistrationTypeId": "89115d3c-7a15-43e1-ab0f-826cc45e589d",
    • "breakTypeId": "5b5809af-d405-4a47-9a44-53c0a2885cfb",
    • "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
    • "startDate": "string",
    • "endDate": "string",
    • "note": "string"
    }
}

UpdateTimeRegistrationProject

Updates an existing time registration project.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration project that is going to be updated

Request Body schema: application/json
code
string or null

An identification code for the project

color
string or null

The color used to represent the project

description
string or null

The description of the project

name
string or null

The name of the project

primaryDepartmentId
string or null <uuid>

The UUID of the primary department the project belongs to

secondaryDepartmentIds
Array of strings or null <uuid> (UUID)

The UUIDs of the secondary departments the project belongs to

Responses

Response Schema: application/json
required
object (TimeRegistrationProject)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "description": "string",
    • "code": "string",
    • "color": "string",
    • "primaryDepartmentId": "e793a026-f1a4-4d90-8d68-2c7023f9efbc",
    • "secondaryDepartmentIds": [
      • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ]
    }
}

UpdateTimeRegistrationType

Updates an existing time registration type.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the time registration type that is going to be updated

Request Body schema: application/json
code
string or null

An identification code for the time registration type

emoji
string or null

The emoji representing the time registration type

name
string or null

The name of the time registration type

Responses

Response Schema: application/json
required
object (TimeRegistrationType)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "code": "string",
    • "emoji": "string"
    }
}

Widget

CreateWidget

Creates a new widget.

Authorizations:
JWT
Request Body schema: application/json

The input for the widget

backgroundColor
required
string

The background color of the widget

buttonBackgroundColor
required
string

The background color of the button

buttonTextColor
required
string

The text color of the button

widgetTextColor
required
string

The text color of the widget

buttonBorder
boolean

If the button should have a border

Array of objects (ContentCreateInput)

The content of the widget

imageData
string (Base64)

Base64 encoded string

imageExtension
string

The image type

imageLayout
string
Enum: "full" "left" "right"

The layout of the image

imageMimeType
string

The image mimetype

imageName
string

The image name

insertIntoAllDashboards
boolean

Whether the widget should be inserted into all dashboards. Note that this is a VERY disruptive operation for the end user, as it messes with their widget setup, and should only be used sparingly.

size
number
Enum: 1 2

The size of the widget

useImage
boolean

If the widget should use an image

Responses

Response Schema: application/json
backgroundColor
required
string

The background color of the widget

required
Array of objects (Content)

The content of the widget

required
UUID (string) or string

UUID of the widget

size
required
number
Enum: 1 2

The size of the widget

useImage
required
boolean

If the widget should use an image

widgetTextColor
required
string

The text color of the widget

buttonBackgroundColor
string

The background color of the button

buttonBorder
boolean

If the button should have a border

buttonTextColor
string

The text color of the button

imageExtension
string

The extension of the image file

imageLayout
string
Enum: "full" "left" "right"

The layout of the image

imageMimetype
string

The mimetype of the image file

imageName
string

The name of the image file

Request samples

Content type
application/json
{
  • "backgroundColor": "string",
  • "widgetTextColor": "string",
  • "buttonTextColor": "string",
  • "buttonBackgroundColor": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "content": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "locale": "string",
      • "title": "string",
      • "description": "string",
      • "useButton": true,
      • "buttonText": "string",
      • "buttonUrl": "string"
      }
    ],
  • "size": 1,
  • "backgroundColor": "string",
  • "widgetTextColor": "string",
  • "buttonTextColor": "string",
  • "buttonBackgroundColor": "string",
  • "buttonBorder": true,
  • "useImage": true,
  • "imageLayout": "full",
  • "imageName": "string",
  • "imageExtension": "string",
  • "imageMimetype": "string"
}

DeleteWidget

Deletes an existing widget.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the widget to be deleted

Responses

Response Schema: application/json
message
required
string

A user friendly message

success
required
boolean

Whether or not the request was successful

Request samples

curl --request DELETE \
  --url https://api.hr-on.com//v1/staff/widgets/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

GetWidget

Fetches information about a widget.

Authorizations:
JWT
path Parameters
id
required
string

Responses

Response Schema: application/json
backgroundColor
required
string

The background color of the widget

required
Array of objects (Content)

The content of the widget

required
UUID (string) or string

UUID of the widget

size
required
number
Enum: 1 2

The size of the widget

useImage
required
boolean

If the widget should use an image

widgetTextColor
required
string

The text color of the widget

buttonBackgroundColor
string

The background color of the button

buttonBorder
boolean

If the button should have a border

buttonTextColor
string

The text color of the button

imageExtension
string

The extension of the image file

imageLayout
string
Enum: "full" "left" "right"

The layout of the image

imageMimetype
string

The mimetype of the image file

imageName
string

The name of the image file

Request samples

curl --request GET \
  --url https://api.hr-on.com//v1/staff/widgets/%7Bid%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "content": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "locale": "string",
      • "title": "string",
      • "description": "string",
      • "useButton": true,
      • "buttonText": "string",
      • "buttonUrl": "string"
      }
    ],
  • "size": 1,
  • "backgroundColor": "string",
  • "widgetTextColor": "string",
  • "buttonTextColor": "string",
  • "buttonBackgroundColor": "string",
  • "buttonBorder": true,
  • "useImage": true,
  • "imageLayout": "full",
  • "imageName": "string",
  • "imageExtension": "string",
  • "imageMimetype": "string"
}

GetWidgets

Fetches widgets in your company. Use size and offset parameters to paginate through the results.

Authorizations:
JWT
query Parameters
offset
integer <int32>

Specifies the amount of items to skip before selection.

size
integer <int32>

Specifies the amount of items to be returned. Defaults to 20.

Responses

Response Schema: application/json
required
Array of objects (Widget)
required
object (PageInfo)

Request samples

curl --request GET \
  --url 'https://api.hr-on.com//v1/staff/widgets?size=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

Content type
application/json
{
  • "items": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "content": [
        • {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "locale": "string",
          • "title": "string",
          • "description": "string",
          • "useButton": true,
          • "buttonText": "string",
          • "buttonUrl": "string"
          }
        ],
      • "size": 1,
      • "backgroundColor": "string",
      • "widgetTextColor": "string",
      • "buttonTextColor": "string",
      • "buttonBackgroundColor": "string",
      • "buttonBorder": true,
      • "useImage": true,
      • "imageLayout": "full",
      • "imageName": "string",
      • "imageExtension": "string",
      • "imageMimetype": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateWidget

Updates an existing widget.

Authorizations:
JWT
path Parameters
id
required
string

The UUID of the widget that is going to be updated

Request Body schema: application/json
backgroundColor
string

The background color of the widget

buttonBackgroundColor
string

The background color of the button

buttonBorder
boolean

If the button should have a border

buttonTextColor
string

The text color of the button

Array of objects (ContentUpdateInput)

The content of the widget

imageData
string (Base64)

Base64 encoded string

imageExtension
string

The image type

imageLayout
string
Enum: "full" "left" "right"

The layout of the image

imageMimeType
string

The image mimetype

imageName
string

The image name

size
number
Enum: 1 2

The size of the widget

useImage
boolean

If the widget should use an image

widgetTextColor
string

The text color of the widget

Responses

Response Schema: application/json
required
object (Widget)
success
required
boolean

Whether or not the request was successful

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "content": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "locale": "string",
        • "title": "string",
        • "description": "string",
        • "useButton": true,
        • "buttonText": "string",
        • "buttonUrl": "string"
        }
      ],
    • "size": 1,
    • "backgroundColor": "string",
    • "widgetTextColor": "string",
    • "buttonTextColor": "string",
    • "buttonBackgroundColor": "string",
    • "buttonBorder": true,
    • "useImage": true,
    • "imageLayout": "full",
    • "imageName": "string",
    • "imageExtension": "string",
    • "imageMimetype": "string"
    }
}