General - Run change account balance
API Url
Used to Run change account balance for more employees at the same time.
http://localhost:16010/ProMarkREST/rest/General/account-balances
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | |
| balanceAdjustment | Object | Balance adjustment object |
| account | Object | Account object |
| description | String | Account description |
| format | String | Account format (1: HH:MM, 4: HH.CC, 7: HH). |
| id | String | Account id |
| unit | Number | Account unit (1: Hours, 2: Days, 3: Pieces). |
| adjustmentType | Number | 1: Set account to given value 2: Adjust account by given value 3: Move given account value to another account |
| holiday | Object | Holiday object. Only when adjustmentType = 1 or 2 |
| status | String | Holiday status (MANUAL: accrued, MANUALFA: transferred, MANUALTA: from last year) |
| type | Object | Holiday type object |
| description | String | Holiday type description |
| id | String | Holiday type id |
| year | Number | Holiday year |
| linkPosting | Boolean | TRUE if the posting is linked |
| toAccount | Object | To account object. Only when adjustmentType = 3 |
| description | String | Account description |
| format | String | Account format (1: HH:MM, 4: HH.CC, 7: HH) |
| id | String | Account id |
| unit | Number | Account unit (1: Hours, 2: Days, 3: Pieces). |
| value | Number | Value that is posted |
| categoryIds | String[] | Array of categories to make the change for. Only when scope = 1 |
| runTime | Datetime | Date and time of the job |
| scope | Number | 0: change balance for all employees categories 1: change balance for categories Default is 0 |
| sendNotification | Boolean | TRUE if a notification should be sent after the job is done |
| suppressRedundantChanges | Boolean | TRUE if we want to prevent a registration from being made for those employees where the account balance is already equal to the requested value Used only with accounts.adjustmentType = 1. Default is FALSE |
Request example:
{"request": {"data": {"suppressRedundantChanges": false,"scope": 0,"balanceAdjustment": {"adjustmentType": 1,"account": {"id": "0","description": "0konto 123","unit": 1,"format": "HH:MM"},"linkPosting": false,"value": 3600,"holiday": {"year": 2020,"status": "MANUAL","type": {"id": "TELI","description": "test"}}}}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |