HR-ON API (1.0.0)

License: ISC

If you choose to use our API, we provide a Postman collection to get you started immediately. 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"
}

Absence

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "absenceType": "string",
      • "code": "string",
      • "startDate": "string",
      • "endDate": "string",
      • "fullDay": true,
      • "note": "string",
      • "employeeId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "departmentIds": [
        • "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
        ],
      • "createdBy": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "approvedAt": "string",
      • "deniedAt": "string",
      • "approvedOrDeniedBy": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
      }
    ],
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "absenceType": "string",
      • "code": "string",
      • "startDate": "string",
      • "endDate": "string",
      • "fullDay": true,
      • "note": "string",
      • "employeeId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "departmentIds": [
        • "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
        ],
      • "createdBy": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "approvedAt": "string",
      • "deniedAt": "string",
      • "approvedOrDeniedBy": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "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"
}

GetCompanyEmployeeCount

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "name": "string",
    • "description": "string",
    • "categoryId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "name": "string",
  • "description": "string",
  • "categoryId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "name": "string",
      • "description": "string",
      • "categoryId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "name": "string",
    • "description": "string",
    • "categoryId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "name": "string",
    • "description": "string",
    • "fieldType": "agreement",
    • "defaultValue": "string",
    • "required": true,
    • "sensitive": true,
    • "options": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "value": "string",
        • "order": 0
        }
      ],
    • "fieldGroup": "string",
    • "order": 0,
    • "setup": { }
    }
}

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 UUID of the custom field or its custom id if set

name
required
string

The name of the custom 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

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "name": "string",
  • "description": "string",
  • "fieldType": "agreement",
  • "defaultValue": "string",
  • "required": true,
  • "sensitive": true,
  • "options": [
    • {
      • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "value": "string",
      • "order": 0
      }
    ],
  • "fieldGroup": "string",
  • "order": 0,
  • "setup": { }
}

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "name": "string",
      • "description": "string",
      • "fieldType": "agreement",
      • "defaultValue": "string",
      • "required": true,
      • "sensitive": true,
      • "options": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "value": "string",
          • "order": 0
          }
        ],
      • "fieldGroup": "string",
      • "order": 0,
      • "setup": { }
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateCustomField

Updates an existing custom field. Note that this is a patch method - only the fields given in the input are updated.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "name": "string",
    • "description": "string",
    • "fieldType": "agreement",
    • "defaultValue": "string",
    • "required": true,
    • "sensitive": true,
    • "options": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "value": "string",
        • "order": 0
        }
      ],
    • "fieldGroup": "string",
    • "order": 0,
    • "setup": { }
    }
}

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "mainDepartment": true,
    • "parentDepartment": {
      • "name": "string",
      • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
      },
    • "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",
    • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "name": "string",
    • "description": "string",
    • "fieldType": "agreement",
    • "defaultValue": "string",
    • "required": true,
    • "options": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "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

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "mainDepartment": true,
  • "parentDepartment": {
    • "name": "string",
    • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
    },
  • "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",
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "name": "string",
  • "description": "string",
  • "fieldType": "agreement",
  • "defaultValue": "string",
  • "required": true,
  • "options": [
    • {
      • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "name": "string",
      • "description": "string",
      • "fieldType": "agreement",
      • "defaultValue": "string",
      • "required": true,
      • "options": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "mainDepartment": true,
      • "parentDepartment": {
        • "name": "string",
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
        },
      • "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",
      • "customId": "string"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateDepartment

Updates an existing department. Note that this is a patch method - only the fields given in the input are updated.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "mainDepartment": true,
    • "parentDepartment": {
      • "name": "string",
      • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
      },
    • "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",
    • "customId": "string"
    }
}

UpdateDepartmentCustomField

Updates an existing custom field. Note that this is a patch method - only the fields given in the input are updated.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "name": "string",
    • "description": "string",
    • "fieldType": "agreement",
    • "defaultValue": "string",
    • "required": true,
    • "options": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "value": "string",
        • "order": 0
        }
      ],
    • "order": 0,
    • "departmentTypes": [
      • "string"
      ],
    • "createdAt": "string",
    • "updatedAt": "string"
    }
}

UpdateDepartmentCustomFieldEntry

Updates the value of a custom field for the department. Note that this is a patch method - only the fields given in the input are updated.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "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

Base64 content of the file. Only available when fetching a single document. Base64 content is not available for files larger than 4 MB. Use download url instead *** DEPRECATED IN FUTURE VERSIONS PLEASE USE DOWNLOAD URL ***

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
any

Download url for content of file. Url expires 20 minutes after retrieval. Only available when fetching a single document.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "documentType": "string",
  • "fileName": "string",
  • "fileExtension": "string",
  • "folderId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "content": "string",
  • "url": null,
  • "owner": {
    • "name": "string",
    • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
    },
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "documentType": "string",
      • "fileName": "string",
      • "fileExtension": "string",
      • "folderId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "content": "string",
      • "url": null,
      • "owner": {
        • "name": "string",
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
        },
      • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "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

Base64 content of the file. Only available when fetching a single document. Base64 content is not available for files larger than 4 MB. Use download url instead *** DEPRECATED IN FUTURE VERSIONS PLEASE USE DOWNLOAD URL ***

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
any

Download url for content of file. Url expires 20 minutes after retrieval. Only available when fetching a single document.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "documentType": "string",
  • "fileName": "string",
  • "fileExtension": "string",
  • "folderId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "content": "string",
  • "url": null,
  • "owner": {
    • "name": "string",
    • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
    },
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "documentType": "string",
      • "fileName": "string",
      • "fileExtension": "string",
      • "folderId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "content": "string",
      • "url": null,
      • "owner": {
        • "name": "string",
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
        },
      • "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. Note that this is a patch method - only the fields given in the input are updated.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "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 (SystemFieldsInput)
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": {
    • "firstName": "string",
    • "email": "string",
    • "lastName": "string"
    }
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "companyAdmin": true,
    • "leader": true,
    • "archived": true,
    • "systemUser": true,
    • "picture": {
      • "url": "string",
      • "content": "string"
      },
    • "roles": {
      • "employee": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "name": "string"
          }
        ],
      • "department": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "name": "string",
          • "departmentId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "departmentName": "string"
          }
        ],
      • "company": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "name": "string"
          }
        ]
      },
    • "departments": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "departmentId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "departmentCustomId": "string",
        • "name": "string",
        • "leader": true
        }
      ],
    • "systemFields": {
      • "address": "string",
      • "age": 0,
      • "alternateFirstName": "string",
      • "alternateLastName": "string",
      • "bankAccountNumber": "string",
      • "bankRegistrationNumber": "string",
      • "birthDate": "string",
      • "city": "string",
      • "country": "string",
      • "cpr": "string",
      • "directManager": {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "name": "string"
        },
      • "email": "string",
      • "emailSecondary": "string",
      • "employeeNumber": "string",
      • "employmentEnd": "string",
      • "employmentJurisdiction": "string",
      • "employmentStart": "string",
      • "employmentTime": 0,
      • "firstName": "string",
      • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "name": "string",
        • "type": "string",
        • "value": "string"
        }
      ],
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000",
    • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "item": {
    • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "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"
    }
}

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"
}

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"
}

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

required
UUID (string) or string

UUID of the employee or its 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 departmens 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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "companyAdmin": true,
  • "leader": true,
  • "archived": true,
  • "systemUser": true,
  • "picture": {
    • "url": "string",
    • "content": "string"
    },
  • "roles": {
    • "employee": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "name": "string"
        }
      ],
    • "department": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "name": "string",
        • "departmentId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "departmentName": "string"
        }
      ],
    • "company": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "name": "string"
        }
      ]
    },
  • "departments": [
    • {
      • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "departmentId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "departmentCustomId": "string",
      • "name": "string",
      • "leader": true
      }
    ],
  • "systemFields": {
    • "address": "string",
    • "age": 0,
    • "alternateFirstName": "string",
    • "alternateLastName": "string",
    • "bankAccountNumber": "string",
    • "bankRegistrationNumber": "string",
    • "birthDate": "string",
    • "city": "string",
    • "country": "string",
    • "cpr": "string",
    • "directManager": {
      • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "name": "string"
      },
    • "email": "string",
    • "emailSecondary": "string",
    • "employeeNumber": "string",
    • "employmentEnd": "string",
    • "employmentJurisdiction": "string",
    • "employmentStart": "string",
    • "employmentTime": 0,
    • "firstName": "string",
    • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "name": "string",
      • "type": "string",
      • "value": "string"
      }
    ],
  • "createdAt": "2022-09-27 18:00:00.000",
  • "updatedAt": "2022-09-27 18:00:00.000",
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "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

Base64 content of the file. Only available when fetching a single document. Base64 content is not available for files larger than 4 MB. Use download url instead *** DEPRECATED IN FUTURE VERSIONS PLEASE USE DOWNLOAD URL ***

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
any

Download url for content of file. Url expires 20 minutes after retrieval. Only available when fetching a single document.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "documentType": "string",
  • "fileName": "string",
  • "fileExtension": "string",
  • "folderId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "content": "string",
  • "url": null,
  • "owner": {
    • "name": "string",
    • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
    },
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "documentType": "string",
      • "fileName": "string",
      • "fileExtension": "string",
      • "folderId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "content": "string",
      • "url": null,
      • "owner": {
        • "name": "string",
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
        },
      • "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>
Example: 3fe2987b-ef4e-4b7c-b321-89585e2a4178

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
    }
}

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.

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. Note that count is incorrect when using this filter.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "companyAdmin": true,
      • "leader": true,
      • "archived": true,
      • "systemUser": true,
      • "picture": {
        • "url": "string",
        • "content": "string"
        },
      • "roles": {
        • "employee": [
          • {
            • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
            • "name": "string"
            }
          ],
        • "department": [
          • {
            • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
            • "name": "string",
            • "departmentId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
            • "departmentName": "string"
            }
          ],
        • "company": [
          • {
            • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
            • "name": "string"
            }
          ]
        },
      • "departments": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "departmentId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "departmentCustomId": "string",
          • "name": "string",
          • "leader": true
          }
        ],
      • "systemFields": {
        • "address": "string",
        • "age": 0,
        • "alternateFirstName": "string",
        • "alternateLastName": "string",
        • "bankAccountNumber": "string",
        • "bankRegistrationNumber": "string",
        • "birthDate": "string",
        • "city": "string",
        • "country": "string",
        • "cpr": "string",
        • "directManager": {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "name": "string"
          },
        • "email": "string",
        • "emailSecondary": "string",
        • "employeeNumber": "string",
        • "employmentEnd": "string",
        • "employmentJurisdiction": "string",
        • "employmentStart": "string",
        • "employmentTime": 0,
        • "firstName": "string",
        • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "name": "string",
          • "type": "string",
          • "value": "string"
          }
        ],
      • "createdAt": "2022-09-27 18:00:00.000",
      • "updatedAt": "2022-09-27 18:00:00.000",
      • "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

Base64 content of the file. Only available when fetching a single document. Base64 content is not available for files larger than 4 MB. Use download url instead *** DEPRECATED IN FUTURE VERSIONS PLEASE USE DOWNLOAD URL ***

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
any

Download url for content of file. Url expires 20 minutes after retrieval. Only available when fetching a single document.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "documentType": "string",
  • "fileName": "string",
  • "fileExtension": "string",
  • "folderId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "content": "string",
  • "url": null,
  • "owner": {
    • "name": "string",
    • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
    },
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "documentType": "string",
      • "fileName": "string",
      • "fileExtension": "string",
      • "folderId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "content": "string",
      • "url": null,
      • "owner": {
        • "name": "string",
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
        },
      • "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. Note that this is a patch method - only the fields given in the input are updated.

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 (SystemFieldsUpdateInput)
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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "companyAdmin": true,
    • "leader": true,
    • "archived": true,
    • "systemUser": true,
    • "picture": {
      • "url": "string",
      • "content": "string"
      },
    • "roles": {
      • "employee": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "name": "string"
          }
        ],
      • "department": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "name": "string",
          • "departmentId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "departmentName": "string"
          }
        ],
      • "company": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "name": "string"
          }
        ]
      },
    • "departments": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "departmentId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "departmentCustomId": "string",
        • "name": "string",
        • "leader": true
        }
      ],
    • "systemFields": {
      • "address": "string",
      • "age": 0,
      • "alternateFirstName": "string",
      • "alternateLastName": "string",
      • "bankAccountNumber": "string",
      • "bankRegistrationNumber": "string",
      • "birthDate": "string",
      • "city": "string",
      • "country": "string",
      • "cpr": "string",
      • "directManager": {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "name": "string"
        },
      • "email": "string",
      • "emailSecondary": "string",
      • "employeeNumber": "string",
      • "employmentEnd": "string",
      • "employmentJurisdiction": "string",
      • "employmentStart": "string",
      • "employmentTime": 0,
      • "firstName": "string",
      • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "name": "string",
        • "type": "string",
        • "value": "string"
        }
      ],
    • "createdAt": "2022-09-27 18:00:00.000",
    • "updatedAt": "2022-09-27 18:00:00.000",
    • "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
Default: ""

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. *** BASE 64 CONTENT IS DEPRECATED IN FUTURE VERSIONS PLEASE USE UPLOAD URL ***

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "documentType": "string",
    • "fileName": "string",
    • "fileExtension": "string",
    • "folderId": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "content": "string",
    • "url": null,
    • "owner": {
      • "name": "string",
      • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178"
      },
    • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "name": "string",
      • "description": "string",
      • "type": "company"
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "name": "string",
      • "value": "string",
      • "customField": {
        • "name": "string",
        • "id": "string"
        }
      }
    ],
  • "pageInfo": {
    • "size": 0,
    • "offset": 0,
    • "total": 0
    }
}

UpdateTemplatePlaceholder

Updates an existing template placeholder. Note that this is a patch method - only the fields given in the input are updated.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "name": "string",
    • "value": "string",
    • "customField": {
      • "name": "string",
      • "id": "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "content": [
    • {
      • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
  • "content": [
    • {
      • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
      • "content": [
        • {
          • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
          • "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. Note that this is a patch method - only the fields given in the input are updated.

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": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
    • "content": [
      • {
        • "id": "3fe2987b-ef4e-4b7c-b321-89585e2a4178",
        • "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"
    }
}

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.