Expense - Get mileages for an employee

API Url

Used to get all mileages for an employee.

GET
http://localhost:16010/ProMarkREST/rest/Mileage/employees/{emp_id}/mileages

Permissions: user

Path parameters

FieldTypeDescription
emp_idString

Unique employee ID.

Query parameters

FieldTypeDescription
endDateoptionalDate

End date for absences, Default : TODAY.

startDateoptionalDate

Start date for absences, Default:Employee start date.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    mileagesObject[]

Collection of absence intervals.

      accountDescString

Mileage account description.

      accountIdString

Mileage account id.

      activityDescoptionalString

Activity description.

      activityIdoptionalString

Activity Id.

      attendanceDateDate

Date of mileage expense.

      carRegNoString

License plate of the car.

      carTypeNumber

0: Company car, 1: Private car

      commentoptionalString

A comment for the mileage

      departmentDescoptionalString

Department description.

      departmentIdoptionalString

Department Id.

      descriptionoptionalString

Description.

      distanceNumber

Distance of a route

      fromString

Starting position of a route.

      idString

Unique identifier for the absence object.

      projectDescoptionalString

Project description.

      projectIdoptionalString

Project Id.

      questionsoptionalObject[]

Collection of questions.

        answerString

The answer to the question.

        answerDescriptionoptionalString

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

        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 = registration is read-only.

      roundtripBoolean

If the mileage includes the return trip too.

      supplementsoptionalObject[]

A colection of supplements

        descriptionString

Supplement description.

        idString

Supplement unique id

        typeNumber

Supplement type

      toString

Ending position of a route.

      viaoptionalString

Alternate route.

  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": {
"mileages": [
{
"id": 2193120
"carRegNo": "B-04-AIU",
"carType": 1,
"accountID": 1,
"accountDesc": "Un-taxed",
"roundtrip": true,
"comment": "I had a flat tire on the way",
"from": "Bucharest",
"to": "Copenhagen",
"distance" : 2137,
"attendanceDate": "2018-09-20"
"supplements": [
{
"id": "Supp1",
"description": "Mileage supplement",
"type": 1
}
],
"questions": [
{
"id": "2",
"order": 1,
"label": "Number of persons",
"isMandatory": false,
"inputType": 0,
"dataType": 1,
"answer": "6",
"answer": "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.