Difference between revisions of "Assigned Routes"
Ashley DeBon (talk | contribs) (Created page with "== Assign Routes == === Base URL === https://apimobile.callproof.com === Endpoint === /api/assign-routes === Purpose === Assigns an existing route to one or more reps. Repl...") |
Ashley DeBon (talk | contribs) (→Assign Routes) |
||
| Line 1: | Line 1: | ||
| − | == Assign Routes == | + | == [[Mobile_API]] »Assign Routes == |
=== Base URL === | === Base URL === | ||
Revision as of 09:17, 20 July 2026
Contents
Mobile_API »Assign Routes
Base URL
https://apimobile.callproof.com
Endpoint
/api/assign-routes
Purpose
Assigns an existing route to one or more reps. Replaces previous route-contact assignments for that route with new assignments that copy the route’s saved contacts. Only managers can perform this action.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
- Manager only – the authenticated user must be a manager for the company.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| route_id | integer/string | Yes | Unique identifier of the route to assign |
| rep_ids | string | Yes | Comma-separated list of rep user IDs to assign the route to (for example, 12,34,56)
|
Successful Response (200)
Indicates that the route was assigned to the selected reps successfully.
| 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 |
| message | string | Confirmation message (for example, "Assigned routes added successfully") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request / permission denied – the route could not be assigned |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – Permission denied ("Permission Denied"), invalid route ("Invalid route details"), user/rep not found ("User not found"), saved route contacts missing ("saved route not found"), or another assignment error.
- 401 – Authentication failed or the access token is missing/expired.