Supplement - Get supplement columns

API Url

Used to load supplements columns.

GET
http://localhost:16010/ProMarkREST/rest/supplement/supplements

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Query parameters

FieldTypeDescription
filteroptionalString

Employees filter.

fromoptionalDate

Start date, Default: TODAY.

onlyDutyCallBoolean

Fetch only supplements used for On Duty Call

projectIdoptionalString

Project Id.

tooptionalDate

End date, Default : TODAY.

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.