General - Get lookup list

API Url

Use it for loading master data for all kind of tables.

GET
http://localhost:16010/ProMarkREST/rest/General/lookup/{table}

Permissions: user

Path parameters

FieldTypeDescription
tableString

Table mnemonic. Can be "emplist", "dept", "group", "division", "usr" etc.

Query parameters

FieldTypeDescription
dateoptionalDate

Date for which lookup is executed. Used for restrictions. Do not use together with "options".

dynamicValuesoptionalBoolean

If false, the dynamic values will not be included. The default value is true.

empIdoptionalString

List of Employee ids (comma separated) in connection with the lookup. Do not use together with "options".

inclInactiveoptionalBoolean

true=Include also inactive records, false=Only active records.

optionsoptionalString

Various options with different meaning for each table mnemonic. Can also be used for cascading lookup values, thus holding the parent id.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    lookupListObject[]

List of table values.

      bgColorString

Background color. If not set then empty.

      descString

Description.

      fgColorString

Foreground color. If not set then empty.

      idString

Unique id.

      inactiveBoolean

Record is inactive (true/false).

      shortDescString

Short description.

      sortIdString

The right-aligned unique id.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example for 'dept'

HTTP/1.1 200 OK
{
"response": {
"lookupList": [
{
"id": "100",
"sortId": "!!!!!!100",
"desc": "North Pole",
"shortDesc": "North",
"fgColor": "",
"bgColor": "",
"inactive": false
},
{
"id": "200",
"sortId": "!!!!!!200",
"desc": "South Pole",
"shortDesc": "South",
"fgColor": "",
"bgColor": "",
"inactive": false
}
],
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.