Supplement - Post allowance rates
API Url
Used for creating allowance rates
http://localhost:16010/ProMarkREST/rest/Supplement/allowance-rates
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| addendaId | String | Supplement Id |
| addendaType | Number | Supplement type |
| employeeId | String | Employee Id |
| fromDate | Date | Allowance rate from date |
| patchArea | String | Patch Area |
| projectId | String | Project Id |
| rate | Decimal | Allowance rate |
| toDate | Date | Allowance rate to date |
| unitType | Number | unitType |
| version | Number | Version |
Request example:
{"request": {"data": {"allowanceRates": [{"employeeId": "1293","projectId": "MDCPROJECT","addendaId": "0A","unitType": 1"fromDate": "2019-09-01","toDate": "2019-09-02","rate": 100,"version": 0,"patchArea": "","addendaType": 0,}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| allowanceRates | Object[] | Collection of allowance rates |
| addendaId | String | Supplement Id |
| addendaType | Number | Supplement type |
| created | Date | Date when the record was created |
| createdBy | String | Who created the record |
| employeeId | String | Employee Id |
| fromDate | Date | Allowance rate from date |
| id | Number | Unique identifier for the allowance rate |
| patchArea | String | Patch Area |
| projectId | String | Project Id |
| rate | Decimal | Allowance rate |
| toDate | Date | Allowance rate to date |
| unitType | Number | unitType |
| version | Number | Version |
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": {"allowanceRates": [{"id": 2163959395,"employeeId": "1292","projectId": "AARSLEFFII","addendaId": "0A","fromDate": "2019-09-01","toDate": "2019-09-02","rate": 93.0,"created": "2019-10-23","createdBy": "SBAA","version": 0,"patchArea": "","addendaType": 0,"unitType": 1}]},"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. |
Error example:
HTTP/1.1 200 OK{"response": {"errorCode": 5,"errorMessage": "No allowance rate"}}