Employee Balances
This page provides a comprehensive reference for all parameters, endpoints, and behaviors of the Employee Balances API. Use this guide to understand request/response structures, validation rules, and integration best practices.
Purpose:
The Employee Balances API provides read-only access to employee balance information, such as vacation, overtime, and other payroll-related balances. It enables employees to retrieve their own balances and allows authorized integrations to retrieve balances for a specific employee resource.
Base URL:
/v1/employee-balances
Additional User-scoped Endpoint
/v1/me/employee-balances
Authentication:
All APIs require a Client ID and Client Secret.
Refer to the global authentication documentation for details.
System Parameters:
No Employee Balances-specific system parameters are required to use this API.
Supported Methods
| HTTP Method | Endpoint | Description | Limits & Notes |
|---|
| GET | /v1/me/employee-balances/{balanceId} | Retrieves a balance entry for the currently logged-in employee | Returns a single balance identified by the balanceId. |
| GET | /v1/me/employee-balances | Retrieves a list of balances for the currently logged-in employee | Supports filtering by shownChoice; uses the current user’s employee ID to retrieve the data. |
| GET | /v1/employee-balances/{resourceId} | Retrieves a list of balances for a specified employee. | Supports filtering by balanceId, shownChoice, and shownAttribute2. Returns 404 if the resourceID is not found |
Swagger / Schema
Version v1
employee_balances v1 API endpoints
/v1/employee-balances/{resourceId}
/v1/me/employee-balances
/v1/me/employee-balances/{balanceId}
/v1/objects/employee-balances
Method Details
Sample Request
GET /v1/me/employee-balances/ABL
Sample Response
{
"companyId": "EN",
"personId": "8871",
"balanceId": "ABL",
"description": "Annual Balance",
"balanceCategory": "AB01",
"balanceCategoryDescription": "Annual balance group",
"registrationUnit": "U01",
"currentValue": 12,
"remark": "Manual",
"limitValue": 0,
"isLimitWrittenDown": false
}
Path Parameters
| Parameter | Value | Description | Data Type | Required |
|---|
| balanceId | required | Identifier of the balance to retrieve | string | yes |
Query Parameters
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | optional | Specify if you wish to retrieve a record that exists in a specific company or client | string | empty |
Limits & Notes
- Users must be authenticated and mapped to a valid employee or resource ID.
- This endpoint returns only the balances belonging to the logged-id employee.
- Returns an HTTP 404 response when the specified balance does not exist for the logged-in employee.
Validation Rules for GET Method (Single)
GET_001 - Access denied for unauthorized user
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | Access denied for unauthorized user |
| HTTP Code | 403 |
| GIVEN | The user does not have permission to access employee balances |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Request rejected for unknown company
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Request rejected for unknown company |
| HTTP Code | 403 |
| GIVEN | The request contains a companyId that does not exist |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - Happy path success
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | Balance is found |
| HTTP Code | 200 |
| GIVEN | The specified balanceId exists |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is retrieved; 200 response is returned with the complete record information |
| Example Error Message | RESPONSE: Check the sample response |
GET_004 - Requested employee not found in the specified company
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Requested employee not found in the specified companyId |
| HTTP Code | 400 |
| GIVEN | The employee that requested the record is not found in the specififed companyId |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 400 Bad Request response is returned |
| Example Error Message | "The person ID is not found for the logged in user {0}" |
GET_005 - Requested balance not found
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Requested balance not found |
| HTTP Code | 404 |
| GIVEN | The requested balanceId does not exist |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 404 Not Found response is returned |
| Example Error Message | "The entity of the following parameters [Company:{0}, Employee:{1}, Balance:{2}] was not found." |
GET_006 - Request rejected for invalid authentication token
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Request rejected for invalid authentication token |
| HTTP Code | 401 |
| GIVEN | The request contains an invalid or expired JWT |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 401 Unauthorized response is returned |
| Example Error Message | "Invalid JWT" |
Sample Request
GET /v1/me/employee-balances
GET /v1/me/employee-balances?shownChoice=ShownInAll
Sample Response
[
{
"companyId": "EN",
"personId": "88701",
"balanceId": "ABC",
"description": "Absence balance",
"balanceCategory": "AB01",
"balanceCategoryDescription": "Annual balance group",
"registrationUnit": "Days",
"currentValue": -7,
"limitValue": 0,
"isLimitWrittenDown": false
},
{
"companyId": "EN",
"personId": "88702",
"balanceId": "ABL",
"description": "Annual Balance",
"balanceCategory": "AB01",
"balanceCategoryDescription": "Annual balance group",
"registrationUnit": "Days",
"currentValue": 12,
"limitValue": 0,
"isLimitWrittenDown": false
}
]
Query Parameters
| Parameter | Value | Description | Data Type | Default Value |
|---|
| companyId | optional | Specify if you wish to retrieve a record that exists in a specific company or client | string | empty |
| shownChoice | optional | Determines which balance types are retrieved | enum (EmployeeBalanceTypeShownChoice) | ShownInAll |
Limits & Notes
- This endpoint only returns balances for the logged-in user.
- The employee resource mapping must exist for the logged-in user.
shownChoice filters which balance types are included in the response.
Validation Rules for GET Method (Multiple)
GET_001 - Access denied for unauthorized user
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | Access denied for unauthorized user |
| HTTP Code | 403 |
| GIVEN | The user does not have permission to access employee balances |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Request rejected for unknown company
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Request rejected for unknown company |
| HTTP Code | 403 |
| GIVEN | The request contains a companyId that does not exist |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - Happy path success
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | Balances found |
| HTTP Code | 200 |
| GIVEN | Employee balances are available |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is retrieved; 200 response is returned with the complete record information |
| Example Error Message | RESPONSE: Check the sample response |
GET_004 - Requested employee not found in the specified company
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Requested employee not found in the specified companyId |
| HTTP Code | 400 |
| GIVEN | The employee that requested the record is not found in the specififed companyId |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 400 Bad Request response is returned |
| Example Error Message | "The person ID is not found for the logged in user {0}" |
GET_005 - Request rejected for invalid authentication token
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Request rejected for invalid authentication token |
| HTTP Code | 401 |
| GIVEN | The request contains an invalid or expired JWT |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 401 Unauthorized response is returned |
| Example Error Message | "Invalid JWT" |
Sample Request
GET /v1/employee-balances/8870
Sample Response
[
{
"dateFrom": "1900-01-01T00:00:00.000",
"dateTo": "2099-12-31T00:00:00.000",
"startValue": 0,
"companyId": "EN",
"personId": "8870",
"balanceId": "ABL",
"attribute2": "C0",
"attribute2Description": "Resource position",
"attribute2Value": "0073",
"attribute2ValueDescription": "Engineer",
"description": "Annual Balance",
"balanceCategory": "AB01",
"balanceCategoryDescription": "Annual balance group",
"registrationUnit": "Days",
"currentValue": -7,
"remark": "Manual",
"limitValue": 0,
"isLimitWrittenDown": false
},
{
"dateFrom": "1900-01-01T00:00:00.000",
"dateTo": "2099-12-31T00:00:00.000",
"startValue": 0,
"companyId": "EN",
"personId": "8870",
"balanceId": "ABC",
"attribute2": "C0",
"attribute2Description": "Resource position",
"attribute2Value": "0073",
"attribute2ValueDescription": "Engineer",
"description": "Absence balance",
"balanceCategory": "AB01",
"balanceCategoryDescription": "Annual balance group",
"registrationUnit": "Days",
"currentValue": -7,
"remark": "Manual",
"limitValue": 0,
"isLimitWrittenDown": false
}
]
Path Parameters
| Parameter | Value | Description | Data Type | Required |
|---|
| resourceId | required | Specifies the resource for which balance information is requested | string | yes |
Query Parameters
| Parameter | Value | Description | Data Type | Default Value |
|---|
| balanceId | optional | Retrieves a specific balance for the requested employee | string | empty |
| shownChoice | optional | Determines which balance types are retrieved | enum (EmployeeBalanceTypeShownChoice) | ShownInAll |
| shownAttribute2 | optional | Includes the Attribute2 information | query | empty |
Validation Rules for GET Method (Additional)
GET_001 - Access denied for unauthorized user
| Element | Details |
|---|
| Scenario ID | GET_001 |
| Scenario Name | Access denied for unauthorized user |
| HTTP Code | 403 |
| GIVEN | The user does not have permission to access employee balances |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_002 - Request rejected for unknown company
| Element | Details |
|---|
| Scenario ID | GET_002 |
| Scenario Name | Request rejected for unknown company |
| HTTP Code | 403 |
| GIVEN | The request contains a companyId that does not exist |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
GET_003 - Happy path success
| Element | Details |
|---|
| Scenario ID | GET_003 |
| Scenario Name | Balances found for employee |
| HTTP Code | 200 |
| GIVEN | Specified employee (resourceId) exists |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is retrieved; 200 response is returned with the complete record information |
| Example Error Message | RESPONSE: Check the sample response |
GET_004 - Requested employee not found in the specified company
| Element | Details |
|---|
| Scenario ID | GET_004 |
| Scenario Name | Requested employee not found in the specified company |
| HTTP Code | 400 |
| GIVEN | The requested employee (resourceId) does not exist in the specified company |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 404 Not Found response is returned |
| Example Error Message | "The entity of the following parameters [Company:{0}, Employee:{1}, Balance:{2}] was not found." |
GET_005 - Requested employee not found
| Element | Details |
|---|
| Scenario ID | GET_005 |
| Scenario Name | Requested employee not found |
| HTTP Code | 404 |
| GIVEN | The requested employee (resourceId) does not exist |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 404 Not Found response is returned |
| Example Error Message | "The entity of the following parameters [Company:{0}, Employee:{1}] was not found." |
GET_006 - Requested balance not found
| Element | Details |
|---|
| Scenario ID | GET_006 |
| Scenario Name | Requested balance not found |
| HTTP Code | 404 |
| GIVEN | The requested balance (balanceId) does not exist |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 404 Not Found response is returned |
| Example Error Message | "The entity of the following parameters [Company:{0}, Employee:{1}, Balance:{2}] was not found." |
GET_007 - Requested employee not found in specified shownChoice
| Element | Details |
|---|
| Scenario ID | GET_007 |
| Scenario Name | Requested employee not found in specified shownChoice |
| HTTP Code | 404 |
| GIVEN | The requested employee (resourceId) does not exist in the specified shownChoice |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 404 Not Found response is returned |
| Example Error Message | "The entity of the following parameters [Company:{0}, Employee:{1}, Balance:{2}] was not found." |
GET_008 - Request rejected for invalid authentication token
| Element | Details |
|---|
| Scenario ID | GET_008 |
| Scenario Name | Request rejected for invalid authentication token |
| HTTP Code | 401 |
| GIVEN | The request contains an invalid or expired JWT |
| WHEN | The GET request is sent |
| BUT | — |
| THEN | Record is not retrieved; 401 Unauthorized response is returned |
| Example Error Message | "Invalid JWT" |
Best Practices
- Use
/me endpoints for the current user: Use the /me endpoints when retrieving balances for the logged-in user. This simplifies integration by eliminating the need to manage employee resource IDs. - Use resource-based endpoints for administrative scenarios: Use the
/employee-balances/{resourceId} endpoint when retrieving balances for employees other than the logged-in user. - Apply filters where possible: Use the balanceId and shownChoice parameters to reduce response payload size and improve performance.
- Follow API throttling and rate-limiting policies: Although this endpoint does not define specific record count or rate limits, integrations must comply with tenant-wide Public API throttling and rate-limiting policies.
- Validate requests with Swagger UI: Use Swagger UI to test requests and verify response schemas before deploying to production.
- Handle error responses gracefully: Implement appropriate handling for 400, 403, and 404 responses to ensure a resilient integration.
- Validate employee-to-resource mappings: Ensure that logged-in users are associated with a valid employee/resource record before attempting to retrieve balances.
- Monitor endpoint versioning and deprecation notices: Review deprecation announcements regularly and plan migrations before endpoint versions are retired.
- Handle empty result sets: Ensure integrations can process responses where no balances are available for the specified employee.
Action APIs
Query APIs (Read-Only)