Difference between revisions of "Current Routes"
Ashley DeBon (talk | contribs) (→Get Current Route) |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 37: | Line 37: | ||
==== Request Body ==== | ==== Request Body ==== | ||
None. | None. | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/current-route/{route_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/current-route/{route_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 09:02, 20 July 2026
Contents
Mobile_API »Get Current Route
Base URL
https://apimobile.callproof.com
Endpoint
/api/current-route/{route_id}
Purpose
Retrieves a specific route and the contacts on that route that have latitude and longitude values (for map/navigation use).
HTTP Method
GET
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| route_id | integer | Yes | Unique identifier of the route to retrieve |
Query Parameters
None.
Request Body
None.
cURL Example for Android
curl --location 'https://apimobile.callproof.com/api/current-route/{route_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/current-route/{route_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Successful Response (200)
Returns the route summary and its contacts with location data.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| data | object | Current route payload |
| uri | string | Requested resource URI |
data.route_details
| Field | Type | Description |
|---|---|---|
| Route_id | integer | Unique identifier of the route (0 when not found) |
| Route_name | string | Route name (empty when not found) |
data.route_current_details[]
| Field | Type | Description |
|---|---|---|
| contact_id | integer | Unique identifier of the contact |
| company_name | string | Company name associated with the contact |
| full_name | string | Full name of the contact |
| first_name | string | First name |
| last_name | string | Last name |
| address | string | Contact address |
| latitude | number/string | Contact latitude |
| longitude | number/string | Contact longitude |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – the current route could not be retrieved |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – An error occurred while retrieving the route (for example, "Error while retriving the routes").
- 401 – Authentication failed or the access token is missing/expired.