General - Get account postings
API Url
Used for loading daily and/or total account postings
http://localhost:16010/ProMarkREST/rest/General/employees/{emp_id}/postings
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| empId | String | Employee Id |
Query parameters
| Field | Type | Description |
|---|---|---|
accountIdoptional | String | List of accounts |
fromoptional | Date | Account posting from this Date. |
periodProfileIdoptional | String | Period profile Id (Used only if from and to dates are not defined) |
returnTypeoptional | Number | Account postings type ( 0 = Get only total postings, 1 = Get only daily postings, 2 = Get both, default is 0). |
tooptional | Date | Account posting till this Date |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
dailyPostingsoptional | Object[] | Collection of daily account postings. Only if 'returnType' = 1. |
| accountDesc | String | Account description |
| accountFormat | String | Account format ("HH:MM", "HH.CC", ".1", ".2" and so on). |
| accountId | String | Account ID |
| accountUnit | Number[1-3] | Accounts unit (1: hours, 2: days, 3: pieces). |
| date | Date | Accounting post date |
| empId | String | Employee ID |
| value | Number | Posting value |
totalPostingsoptional | Object[] | Collection of total account postings. Only if 'returnType' = 0. |
| accountDesc | String | Account description |
| accountFormat | String | Account format ("HH:MM", "HH.CC", ".1", ".2" and so on). |
| accountId | String | Account ID |
| accountUnit | Number[1-3] | Accounts unit (1: hours, 2: days, 3: pieces). |
| empId | String | Employee ID |
| total | Number | Posting total per employee & account in the given period |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"dailyPostings": [{"empId": "798","date": "2017-05-15","accountId": "S002","accountDesc": "Shift Allowance AM!","unit": 1,"format": "HH:MM","value": 27000},{"empId": "798","date": "2017-05-15","accountId": "T001","accountDesc": "Normal hours","unit": 1,"format": "HH:MM","value": 27000},{"empId": "798","date": "2017-05-15","accountId": "T003","accountDesc": "Total Time","unit": 1,"format": "HH:MM","value": 27000},{"empId": "798","date": "2017-05-18","accountId": "S002","accountDesc": "Shift Allowance AM!","unit": 1,"format": "HH:MM","value": 27000},{"empId": "798","date": "2017-05-18","accountId": "T001","accountDesc": "Normal hours","unit": 1,"format": "HH:MM","value": 27000},{"empId": "798","date": "2017-05-18","accountId": "T003","accountDesc": "Total Time","unit": 1,"format": "HH:MM","value": 27000}],"totalPostings": [{"empId": "798","accountId": "S002","accountDesc": "Shift Allowance AM!","unit": 1,"format": "HH:MM","total": 54000},{"empId": "798","accountId": "T001","accountDesc": "Normal hours","unit": 1,"format": "HH:MM","total": 54000},{"empId": "798","accountId": "T003","accountDesc": "Total Time","unit": 1,"format": "HH:MM","total": 54000}]},"errorCode": 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. |