Supplement - Get supplements
API Url
Used to load supplements.
http://localhost:16010/ProMarkREST/rest/supplement/employees/{emp_Id}/supplements
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| emp_id | String | Unique employee ID. |
Query parameters
| Field | Type | Description |
|---|---|---|
dateoptional | Date | The transaction date (default is Today). |
typeoptional | String | Filter supplements by type (number: Number supplement; time: Time supplement ) |
usageoptional | String | List of usages for supplements: 0 - Standard, 1 - Used For Scheduled, 2 - for Changed Shifts Difference |
usefavoriteoptional | Boolean | Return if the supplement is favorite or nor. |
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. |
Error example:
{"response": {"errorCode": 5,"errorMessage": "No employees"}}