Supplement - Get supplements

API Url

Used to load supplements.

GET
http://localhost:16010/ProMarkREST/rest/supplement/employees/{emp_Id}/supplements

Permissions: user

Path parameters

FieldTypeDescription
emp_idString

Unique employee ID.

Query parameters

FieldTypeDescription
dateoptionalDate

The transaction date (default is Today).

typeoptionalString

Filter supplements by type (number: Number supplement; time: Time supplement )

usageoptionalString

List of usages for supplements: 0 - Standard, 1 - Used For Scheduled, 2 - for Changed Shifts Difference

usefavoriteoptionalBoolean

Return if the supplement is favorite or nor.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    supplementsObject[]

Collection of supplements.

      accountIdString

Account id.

      descriptionString

Description of supplement.

      extraDataString

A terminal prompt to enter extra data.

      fixedValueNumber

Supplement's fixed value .

      formatString

Account format ("HH:MM", "HH.CC", ".1", ".2" and so on).

      idString

Unique identifier for the supplement.

      includeProjectBoolean

True if it includes a project.

      includeTimeTypeBoolean

True if includeProject is true.

      mandatoryExtraDataBoolean

True if extra data is mandatory.

      mandatoryProjDimBoolean

True if the project is mandatory.

      maxValueNumber

Supplement's max value .

      minValueNumber

Supplement's min value .

      typeNumber

Supplement type.

      unitNumber

Accounts unit (1: hours, 2: days, 3: pieces).

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

{
"response": {
"errorCode": 5,
"errorMessage": "No employees"
}
}