Expense - Get travel details

API Url

Used to get all mileages for an employee.

GET
http://localhost:16010/ProMarkREST/rest/Mileage/employees/{emp_id}/travel-details

Permissions: user

Path parameters

FieldTypeDescription
emp_idString

Unique employee ID.

Query parameters

FieldTypeDescription
endDateoptionalDate

End date, Default : TODAY.

startDateoptionalDate

Start date.

Parameter

FieldTypeDescription
        answerString

The answer to the question.

        answerDescriptionString

The answer description for those questions that are supplied also with a list of values.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    expensesObject[]

Collection of expenses.

      activityDescoptionalString

Activity description.

      activityIdoptionalString

Activity Id.

      attendanceDateDate

Date on the transaction.

      departmentDescoptionalString

Department description.

      departmentIdoptionalString

Department Id.

      descriptionoptionalString

Description.

      endDateDate

Travel end date-time.

      projectDescoptionalString

Project description.

      projectIdoptionalString

Project Id.

      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!

        maxValueoptionalNumber

Maximum value. Not to be changed on the client!

        minValueoptionalNumber

Minimum value. Not to be changed on the client!

        orderNumber

The question order.

      readOnlyBoolean

TRUE = Transaction is read-only (approved already).

      startDateDate

Travel start date-time.

      transSeqInteger

Transaction unique number.

      travelDetailsoptionalObject[]

Collection of travel details

        endTimeDatetime

End date.

        entryNoInteger

Travel detail unique number per transaction.

        mealsLogical

Collection of booleans representing if a meal has been taken or not.

        purposeoptionalString

Optional comments about the travel.

        startTimeDatetime

Start date.

        supplementDescoptionalString

Supplement description.

        supplementIdoptionalString

Supplement id if needed.

  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": {
"expenses": [
{
"transSeq": 2098475,
"startTime": "2017-09-07T08:00:00.000",
"endTime": "2017-09-09T00:00:00.000",
"travelDetail": [
{
"entryNo": 3,
"supplementId": "AMT",
"supplementDesc": "Supplement AMT",
"startTime": "2017-09-07T08:00:00.000",
"endTime": "2017-09-08T00:00:00.000",
"meals": [false, true, true],
"purpose": "I had a flat tire on the way"
}
],
"questions": [
{
"id": "2",
"order": 1,
"label": "Number of persons",
"isMandatory": false,
"inputType": 0,
"dataType": 1,
"answer": "6",
"answerDescription": "2018 Budget"
},
{
"id": "1",
"order": 2,
"label": "Client name",
"isMandatory": true,
"inputType": 0,
"dataType": 0,
"answer": "Magnus A/S"
}
]
}
]
},
"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.