General - Get account balance for an employee
API Url
Used to get all account balances for an employee.
http://localhost:16010/ProMarkREST/rest/General/employees/{empNo}/account-balances
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| empNo | String | Employee number. |
Query parameters
| Field | Type | Description |
|---|---|---|
accountIdoptional | String | Optional list of Account IDs with comma separator. Can be used if 'onlyCategory'=false. |
onlyCategoryoptional | Boolean | true = Return only the accounts specified on the employee category. |
periodTypeoptional | Number[1-4] | Type of period (1: Latest closed period, 2: Oldest open period, 3: Current period 4: Current and future periods). |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| accounts | Object[] | Collection with account balance data. |
| balance | Number | Balance value. |
| department | String | Department suffix. |
| description | String | Account description. |
| empNo | String | Employee number. |
| format | Number | Account format (1: HH:MM, 4: HH.CC, 7: HH). |
| group | String | Employee group. |
| id | String | Account ID. |
| unit | Number | Account unit (1: Hours, 2: Days, 3: Pieces). |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example with a single shift:
HTTP/1.1 200 OK{"response": {"data": {"accounts": [{"empNo": "100""id": "H002""department": "Welders""group": "Special""balance": 10"description": "Remaining holiday""shortDescription" : "holiday remaining""unit": 1"format": 1}]},"erorCode": 0,"errorMessage": ""}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |
Error example:
HTTP/1.1 404 Not found{"response": {"errorCode": 5,"errorMessage": "No employees"}}