Mileage - Update route

API Url

Used for updating a mileage route.

PUT
http://localhost:16010/ProMarkREST/rest/Mileage/routes

Permissions: user

Path parameters

FieldTypeDescription
idString

Employee ID.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    routesObject[]

Collection of routes

      distanceNumber

Distance of a route

      fromString

Starting position of a route.

      idNumber

An name for the route

      nameString

An name for the route

      toString

Ending position of a route.

      viaoptionalString

Alternate route.

Request example:

{
"request": {
"data": {
"routes": [
{
"id": 1243345,
"name": "KICKOFF",
"from": "Bucharest",
"to": "Copenhagen",
"distance" : 2137
}
]
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

{
"response": {
"errorCode": 34
"errorMessage": "The route does not exist"
}
}