Mileage - Get routes
API Url
Used to get mileage routes for an employee.
GET
http://localhost:16010/ProMarkREST/rest/Mileage/employees/{emp_id}/routes
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| emp_id | String | Employee ID. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| routes | Object[] | Collection of absence intervals. |
| distance | Number | Distance of a route. |
| from | String | Starting position of a route. |
| id | Number | Unique identifier for the absence object. |
| name | String | Route name given by the emplyee. |
| to | String | Ending position of a route. |
viaoptional | String | Alternate route. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"routes": [{"id": 343423"name": KICKOFF"from": "Bucharest","to": "Copenhagen","distance" : 2137}]},"errorCode": 0,"errorMessage": ""}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |