1. U4 ERPx
  2. API Reference
  3. Payroll
  4. Employee Balances

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 MethodEndpointDescriptionLimits & Notes
GET/v1/me/employee-balances/{balanceId}Retrieves a balance entry for the currently logged-in employeeReturns a single balance identified by the balanceId.
GET/v1/me/employee-balancesRetrieves a list of balances for the currently logged-in employeeSupports 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

   

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

ParameterValueDescriptionData TypeRequired
balanceIdrequiredIdentifier of the balance to retrievestringyes

   

Query Parameters

ParameterValueDescriptionData TypeDefault Value
companyIdoptionalSpecify if you wish to retrieve a record that exists in a specific company or clientstringempty

   

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
ElementDetails
Scenario IDGET_001
Scenario NameAccess denied for unauthorized user
HTTP Code403
GIVENThe user does not have permission to access employee balances
WHENThe GET request is sent
BUT
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Request rejected for unknown company
ElementDetails
Scenario IDGET_002
Scenario NameRequest rejected for unknown company
HTTP Code403
GIVENThe request contains a companyId that does not exist
WHENThe GET request is sent
BUT
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Happy path success
ElementDetails
Scenario IDGET_003
Scenario NameBalance is found
HTTP Code200
GIVENThe specified balanceId exists
WHENThe GET request is sent
BUT
THENRecord is retrieved; 200 response is returned with the complete record information
Example Error MessageRESPONSE: Check the sample response
GET_004 - Requested employee not found in the specified company
ElementDetails
Scenario IDGET_004
Scenario NameRequested employee not found in the specified companyId
HTTP Code400
GIVENThe employee that requested the record is not found in the specififed companyId
WHENThe GET request is sent
BUT
THENRecord 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
ElementDetails
Scenario IDGET_005
Scenario NameRequested balance not found
HTTP Code404
GIVENThe requested balanceId does not exist
WHENThe GET request is sent
BUT
THENRecord 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
ElementDetails
Scenario IDGET_006
Scenario NameRequest rejected for invalid authentication token
HTTP Code401
GIVENThe request contains an invalid or expired JWT
WHENThe GET request is sent
BUT
THENRecord 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

ParameterValueDescriptionData TypeDefault Value
companyIdoptionalSpecify if you wish to retrieve a record that exists in a specific company or clientstringempty
shownChoiceoptionalDetermines which balance types are retrievedenum (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
ElementDetails
Scenario IDGET_001
Scenario NameAccess denied for unauthorized user
HTTP Code403
GIVENThe user does not have permission to access employee balances
WHENThe GET request is sent
BUT
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Request rejected for unknown company
ElementDetails
Scenario IDGET_002
Scenario NameRequest rejected for unknown company
HTTP Code403
GIVENThe request contains a companyId that does not exist
WHENThe GET request is sent
BUT
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Happy path success
ElementDetails
Scenario IDGET_003
Scenario NameBalances found
HTTP Code200
GIVENEmployee balances are available
WHENThe GET request is sent
BUT
THENRecord is retrieved; 200 response is returned with the complete record information
Example Error MessageRESPONSE: Check the sample response
GET_004 - Requested employee not found in the specified company
ElementDetails
Scenario IDGET_004
Scenario NameRequested employee not found in the specified companyId
HTTP Code400
GIVENThe employee that requested the record is not found in the specififed companyId
WHENThe GET request is sent
BUT
THENRecord 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
ElementDetails
Scenario IDGET_005
Scenario NameRequest rejected for invalid authentication token
HTTP Code401
GIVENThe request contains an invalid or expired JWT
WHENThe GET request is sent
BUT
THENRecord 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

ParameterValueDescriptionData TypeRequired
resourceIdrequiredSpecifies the resource for which balance information is requestedstringyes

   

Query Parameters

ParameterValueDescriptionData TypeDefault Value
balanceIdoptionalRetrieves a specific balance for the requested employeestringempty
shownChoiceoptionalDetermines which balance types are retrievedenum (EmployeeBalanceTypeShownChoice)ShownInAll
shownAttribute2optionalIncludes the Attribute2 informationqueryempty

   

Validation Rules for GET Method (Additional)

GET_001 - Access denied for unauthorized user
ElementDetails
Scenario IDGET_001
Scenario NameAccess denied for unauthorized user
HTTP Code403
GIVENThe user does not have permission to access employee balances
WHENThe GET request is sent
BUT
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_002 - Request rejected for unknown company
ElementDetails
Scenario IDGET_002
Scenario NameRequest rejected for unknown company
HTTP Code403
GIVENThe request contains a companyId that does not exist
WHENThe GET request is sent
BUT
THENAPI is not reached; 403 Forbidden response is returned
Example Error Message“User is not authorised.”
GET_003 - Happy path success
ElementDetails
Scenario IDGET_003
Scenario NameBalances found for employee
HTTP Code200
GIVENSpecified employee (resourceId) exists
WHENThe GET request is sent
BUT
THENRecord is retrieved; 200 response is returned with the complete record information
Example Error MessageRESPONSE: Check the sample response
GET_004 - Requested employee not found in the specified company
ElementDetails
Scenario IDGET_004
Scenario NameRequested employee not found in the specified company
HTTP Code400
GIVENThe requested employee (resourceId) does not exist in the specified company
WHENThe GET request is sent
BUT
THENRecord 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
ElementDetails
Scenario IDGET_005
Scenario NameRequested employee not found
HTTP Code404
GIVENThe requested employee (resourceId) does not exist
WHENThe GET request is sent
BUT
THENRecord 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
ElementDetails
Scenario IDGET_006
Scenario NameRequested balance not found
HTTP Code404
GIVENThe requested balance (balanceId) does not exist
WHENThe GET request is sent
BUT
THENRecord 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
ElementDetails
Scenario IDGET_007
Scenario NameRequested employee not found in specified shownChoice
HTTP Code404
GIVENThe requested employee (resourceId) does not exist in the specified shownChoice
WHENThe GET request is sent
BUT
THENRecord 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
ElementDetails
Scenario IDGET_008
Scenario NameRequest rejected for invalid authentication token
HTTP Code401
GIVENThe request contains an invalid or expired JWT
WHENThe GET request is sent
BUT
THENRecord 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)