Difference between revisions of "Update Routes"
Ashley DeBon (talk | contribs) (Created page with "== Update Route == === Base URL === https://apimobile.callproof.com === Endpoint === /api/routes/{route_id} === Purpose === Updates an existing route’s name, assigned con...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | == Update Route == | + | == [[Mobile_API]] »Update Route == |
=== Base URL === | === Base URL === | ||
| Line 45: | Line 45: | ||
| assigned_by || integer || No || User ID of the person who assigned the route | | assigned_by || integer || No || User ID of the person who assigned the route | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location --request PUT 'https://apimobile.callproof.com/api/routes/{route_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'route_name=YOUR_ROUTE_NAME' \ --form 'contact_ids=12345,67890' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location --request PUT 'https://apimobile.callproof.com/api/routes/{route_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'route_name=YOUR_ROUTE_NAME' \ --form 'contact_ids=12345,67890' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 09:00, 20 July 2026
Contents
Mobile_API »Update Route
Base URL
https://apimobile.callproof.com
Endpoint
/api/routes/{route_id}
Purpose
Updates an existing route’s name, assigned contacts, and optional assigner for the authenticated user’s company.
HTTP Method
PUT
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 update |
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| route_name | string | Yes | Updated route name (must not already exist under the validation rules used by this endpoint) |
| contact_ids | string | Yes | Updated contact IDs for the route (must not be empty) |
| assigned_by | integer | No | User ID of the person who assigned the route |
cURL Example for Android
curl --location --request PUT 'https://apimobile.callproof.com/api/routes/{route_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'route_name=YOUR_ROUTE_NAME' \ --form 'contact_ids=12345,67890'
cURL Example for iOS
curl --location --request PUT 'https://apimobile.callproof.com/api/routes/{route_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'route_name=YOUR_ROUTE_NAME' \ --form 'contact_ids=12345,67890'
Successful Response (200)
Indicates that the route was updated 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, "Route was successfully updated.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – the route could not be updated |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – Route name already exists ("Route Name Already Exists"), contacts missing ("Route Contacts Required"), or another update error.
- 401 – Authentication failed or the access token is missing/expired.