Expense - Get expense set-up for an employee

API Url

Used to get expense set-up for an employee.

GET
http://localhost:16010/ProMarkREST/rest/Mileage/employees/{emp_id}/expense-setup

Permissions: user

Path parameters

FieldTypeDescription
emp_idString

Unique employee ID.

Query parameters

FieldTypeDescription
dateoptionalDate

Registration date for expense, Default: TODAY.

typeoptionalString

Expense type : Mileage Travel Outlay.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    expenseSetupObject[]

Collection of expense Setup.

      mileageoptionalObject[]

Collection of mileage setup.

        accountsoptionalObject[]

Collection of accounts.

          descriptionString

Description of account

          favoriteBoolean

If the account is favorite.

          idString

Unique identifier for the account object.

          isPurposeMandatoryoptionalBoolean

If Purpose is mandaory or not. If This Value is TRUE then it muse be included.

        questionsoptionalObject[]

Collection of questions.

          dataTypeNumber

Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval). Not to be changed on the client!

Size range: 0-10
          idString

Unique identifier for the question.

          inputTypeNumber

Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI). Not to be changed on the client!

Size range: 0-10
          isMandatoryBoolean

true = It is mandatory to enter an answer (select a value) on the question. Not to be changed on the client!

          labelString

Label to display on the question. Not to be changed on the client!

          maxValueNumber

Maximum value. Not to be changed on the client!

          minValueNumber

Minimum value. Not to be changed on the client!

          valueoptionalObject[]

Collection of question values.

            descriptionString

Description value.

            idString

Id of value.

      outlayoptionalObject[]

Collection of outlay setup.

        accountsoptionalObject[]

Collection of accounts.

          descriptionString

Description of account

          favoriteBoolean

If the account is favorite.

          idString

Unique identifier for the account object.

        questionsoptionalObject[]

Collection of questions.

          dataTypeNumber

Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval). Not to be changed on the client!

Size range: 0-10
          idString

Unique identifier for the question.

          inputTypeNumber

Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI). Not to be changed on the client!

Size range: 0-10
          isMandatoryBoolean

true = It is mandatory to enter an answer (select a value) on the question. Not to be changed on the client!

          labelString

Label to display on the question. Not to be changed on the client!

          maxValueNumber

Maximum value. Not to be changed on the client!

          minValueNumber

Minimum value. Not to be changed on the client!

          valueoptionalObject[]

Collection of question values.

            descriptionString

Description value.

            idString

Id of value.

      projectMandatoryoptionalBoolean

Is project is Mandatory.

      relatedToDeptoptionalBoolean

Relate to department.

      relatedToProjectoptionalBoolean

Relate to project.

      showDescrAllowanceoptionalString

Show allowance description?

      showDescrMileageoptionalString

Show mileage description?

      traveloptionalObject[]

Collection of travel setup.

        questionsoptionalObject[]

Collection of questions.

          dataTypeNumber

Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval). Not to be changed on the client!

Size range: 0-10
          idString

Unique identifier for the question.

          inputTypeNumber

Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI). Not to be changed on the client!

Size range: 0-10
          isMandatoryBoolean

true = It is mandatory to enter an answer (select a value) on the question. Not to be changed on the client!

          labelString

Label to display on the question. Not to be changed on the client!

          maxValueNumber

Maximum value. Not to be changed on the client!

          minValueNumber

Minimum value. Not to be changed on the client!

          valueoptionalObject[]

Collection of question values.

            descriptionString

Description value.

            idString

Id of value.

        supplementsoptionalObject[]

Collection of supplements.

          descriptionString

Description of supplement

          favoriteBoolean

If the supplement is favorite.

          idString

Unique identifier for the supplement object.

        surplusSupplementsoptionalObject[]

Collection of surplus supplements.

          descriptionString

Description of supplement

          favoriteBoolean

If the supplement is favorite.

          idString

Unique identifier for the supplement object.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"expenseSetup": {
"relatedToProject": true,
"ProjectMandatory": false,
"relatedToDept": true,
"mileage": {
"accounts": [
{
"id": "M001",
"description": "Mileage supplement - primary",
"favorite": false
},
{
"id": "MILEAGE",
"description": "Mileage",
"favorite": false
}
],
"questions": [
{
"id": "3",
"label": "Period of year",
"isMandatory": false,
"inputType": 3,
"dataType": 0,
"values": [
{
"order": 1,
"id": "F",
"description": "Fall"
},
{
"order": 2,
"id": "W",
"description": "Winter"
},
{
"order": 3,
"id": "SP",
"description": "Spring"
},
{
"order": 4,
"id": "S",
"description": "summer"
}
]
},
{
"id": "ANTAL",
"label": "Number of persons",
"isMandatory": false,
"inputType": 0,
"dataType": 1,
"minValue": 1,
"maxValue": 10
},
{
"id": "COLOUR",
"label": "Which colour",
"isMandatory": false,
"inputType": 2,
"dataType": 0,
"values": [
{
"order": 1,
"id": "R",
"description": "Red"
},
{
"order": 2,
"id": "B",
"description": "Blue"
},
{
"order": 3,
"id": "Y",
"description": "Yellow"
},
{
"order": 4,
"id": "Br",
"description": "Brown"
},
{
"order": 5,
"id": "Bl",
"description": "Black"
},
{
"order": 6,
"id": "G",
"description": "Green"
},
{
"order": 7,
"id": "Gr",
"description": "Gray"
}
]
}
]
},
"travel": {
"supplements": [
{
"id": "TENT",
"description": "Tent",
"favorite": false
}
],
"surplusSupplements": [
{
"id": "1",
"description": "Supplement 1",
"favorite": false
}
],
"questions": [
{
"id": "1",
"label": "Hvor er du henne",
"isMandatory": true,
"inputType": 0,
"dataType": 0
},
{
"id": "2",
"label": "Hvor mange",
"isMandatory": false,
"inputType": 0,
"dataType": 1,
"minValue": 1,
"maxValue": 10
}
]
},
"outlay": {
"accounts": [
{
"id": "B001",
"description": "Betalt morgenmad",
"favorite": false
},
{
"id": "B002",
"description": "Betalt frokost",
"favorite": false
}
],
"questions": [
{
"id": "ANTAL",
"label": "Number of persons",
"isMandatory": false,
"inputType": 0,
"dataType": 1,
"minValue": 1,
"maxValue": 10
}
]
}
}
},
"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.