Difference between revisions of "All Routes"
Ashley DeBon (talk | contribs) (Created page with "== Get All Routes == === Base URL === https://apimobile.callproof.com === Endpoint === /api/all-routes === Purpose === Retrieves company routes from users in the same marke...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | == Get All Routes == | + | == [[Mobile_API]] »Get All Routes == |
=== Base URL === | === Base URL === | ||
| Line 33: | Line 33: | ||
==== Request Body ==== | ==== Request Body ==== | ||
None. | None. | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/all-routes' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/all-routes' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 09:14, 20 July 2026
Contents
Mobile_API »Get All Routes
Base URL
https://apimobile.callproof.com
Endpoint
/api/all-routes
Purpose
Retrieves company routes from users in the same market as the authenticated user, excluding routes the authenticated user already owns. Each result includes assigner details and assigned reps. Results are ordered by route name.
HTTP Method
GET
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
None.
cURL Example for Android
curl --location 'https://apimobile.callproof.com/api/all-routes' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/all-routes' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Successful Response (200)
Returns other users’ routes available in the same market.
| 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 | Routes payload |
| uri | string | Requested resource URI |
data.route_details[]
| Field | Type | Description |
|---|---|---|
| route_id | integer | Unique identifier of the route |
| route_name | string | Route name |
| route_assigned_by_id | string | User ID of the person who assigned the route (empty string when not set) |
| route_assigned_by_name | string | Full name of the person who assigned the route |
| created | string | Created date/time in the user’s timezone (format: Y-m-d g:i A)
|
| route_assigned_reps | array | List of assigned reps; each item includes id (user ID)
|
data.route_details[].route_assigned_reps[]
| Field | Type | Description |
|---|---|---|
| id | integer | User ID of an assigned rep |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – routes could not be retrieved |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – An error occurred while retrieving routes (for example, "Error while retriving the routes").
- 401 – Authentication failed or the access token is missing/expired.