Supplement - Get supplement columns
API Url
Used to load supplements columns.
http://localhost:16010/ProMarkREST/rest/supplement/supplements
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Query parameters
| Field | Type | Description |
|---|---|---|
filteroptional | String | Employees filter. |
fromoptional | Date | Start date, Default: TODAY. |
| onlyDutyCall | Boolean | Fetch only supplements used for On Duty Call |
projectIdoptional | String | Project Id. |
tooptional | Date | End date, Default : TODAY. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| supplements | Object[] | Collection of supplements. |
| accountId | String | Account id. |
| description | String | Description of supplement. |
| extraData | String | A terminal prompt to enter extra data. |
| fixedValue | Number | Supplement's fixed value . |
| format | String | Account format ("HH:MM", "HH.CC", ".1", ".2" and so on). |
| id | String | Unique identifier for the supplement. |
| includeProject | Boolean | True if it includes a project. |
| includeTimeType | Boolean | True if includeProject is true. |
| mandatoryExtraData | Boolean | True if extra data is mandatory. |
| mandatoryProjDim | Boolean | True if the project is mandatory. |
| maxValue | Number | Supplement's max value . |
| minValue | Number | Supplement's min value . |
| type | Number | Supplement type. |
| unit | Number | Accounts 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:
{"response": {"data": {"supplements": [{"id": "0002","description": "Time Supplement Hours","type": "time","minValue": 3600,"maxValue": 18000,"accountId": "0001","unit": 1,"format": "HH:MM","includeProject": true,"includeTimeType": true,"mandatoryProjDim": false,"extraData": "Please specify the purpose?","mandatoryExtraData": true}]}}}
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. |