Difference between revisions of "State Details"
Ashley DeBon (talk | contribs) (→Get All States) |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 33: | Line 33: | ||
==== Request Body ==== | ==== Request Body ==== | ||
None. | None. | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/state' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/state' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 15:27, 20 July 2026
Contents
Mobile_API »Get All States
Base URL
https://apimobile.callproof.com
Endpoint
/api/state
Purpose
Retrieves the full list of states/provinces available in the system, including each state’s name and abbreviation code.
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/state' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/state' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Successful Response (200)
Returns the complete state list.
| 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 | State list payload |
| uri | string | Requested resource URI |
data.state[]
| Field | Type | Description |
|---|---|---|
| id | integer | Unique identifier of the state |
| name | string | State/province name |
| code | string | State/province abbreviation code |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – state list could not be retrieved |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – An error occurred while retrieving states (for example, "Error while retriving the State List").
- 401 – Authentication failed or the access token is missing/expired.