Difference between revisions of "Get Reverse Geocode"
Ashley DeBon (talk | contribs) (Created page with "== Get Address from Latitude and Longitude == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contact/get/address/latitude/{latitude}/longitude/{longi...") |
Ashley DeBon (talk | contribs) (→cURL Example for Android) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 39: | Line 39: | ||
==== Request Body ==== | ==== Request Body ==== | ||
None. | None. | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | <pre> | ||
| + | curl --location 'https://apimobile.callproof.com/api/contact/get/address/latitude/{latitude}/longitude/{longitude}' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' | ||
| + | </pre> | ||
| + | === cURL Example for iOS === | ||
| + | <pre> | ||
| + | curl --location 'https://apimobile.callproof.com/api/contact/get/address/latitude/{latitude}/longitude/{longitude}' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' | ||
| + | </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 07:36, 17 July 2026
Get Address from Latitude and Longitude
Base URL
https://apimobile.callproof.com
Endpoint
/api/contact/get/address/latitude/{latitude}/longitude/{longitude}
Purpose
Converts geographic coordinates into a readable address. Given a latitude and longitude, the API returns street address, city, state, postal code, and country details that can be used when creating or updating a contact location.
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 |
|---|---|---|---|
| latitude | string | Yes | Latitude coordinate used to look up the address |
| longitude | string | Yes | Longitude coordinate used to look up the address |
Query Parameters
None.
Request Body
None.
cURL Example for Android
curl --location 'https://apimobile.callproof.com/api/contact/get/address/latitude/{latitude}/longitude/{longitude}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/contact/get/address/latitude/{latitude}/longitude/{longitude}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Successful Response (200)
Indicates that reverse geocoding completed successfully. Address fields may be empty when no matching address is found for the provided coordinates.
| 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 | Reverse geocode payload |
| data.contact | object | Resolved address details |
| data.contact.address1 | string | Street address derived from the coordinates |
| data.contact.city | string | City name |
| data.contact.zipcode | string | Postal / ZIP code |
| data.contact.state | string | State abbreviation / code |
| data.contact.state_id | integer | Matching state identifier, or 0 if not found |
| data.contact.country | string | Country name |
| data.contact.country_id | integer | Matching country identifier, or 0 if not found |
| data.contact.country_code | string | Country code returned by reverse geocoding |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – reverse geocoding could not be completed successfully |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – The service encountered an error while resolving an address for the provided coordinates.
- 401 – Authentication failed or the access token is missing/expired.