Address Distance API
API Description
The Address Distance API enables clients to calculate the distance between two human-readable addresses using a single API call.
It abstracts multiple operations including:
- Address-to-coordinate (latitude/longitude) conversion
- Driving route distance calculation
- Straight-line (Haversine) distance computation
This API eliminates the need for clients to orchestrate multiple APIs or perform geospatial calculations manually.
Key Features
- Single API for end-to-end distance calculation
- Returns both:
- Driving distance (route-based)
- Displacement distance (Haversine)
- Provides resolved addresses and coordinates
- Handles partial and failure scenarios gracefully
- Optimized for Indian geography
Curl
curl --location 'https://api-preproduction.signzy.app/api/v3/geocoding/address-distance' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Auth Token>' \
--data '{
"originAddress": "Signzy Mumbai",
"destinationAddress": "Signzy Bangalore",
"allDetailsRequired": false
}'Request Mapping
Field | Type | Description |
|---|---|---|
originAddress | string | Source address (full/partial address) |
destinationAddress | string | Destination address (full/partial address) |
allDetailsRequired | string | Optional [true/false] |
Response Mapping
Key Path | Type | Description |
|---|---|---|
result | object | Root result object |
result.originAddressResolved | string | Resolved origin address |
result.originAddressLat | string | Origin latitude |
result.originAddressLong | string | Origin longitude |
result.destinationAddressResolved | string | Resolved destination address |
result.destinationAddressLat | string | Destination latitude |
result.destinationAddressLong | string | Destination longitude |
result.displacementInKm | string | Straight-line distance (KM) |
result.routeDistanceInKm | string | Road distance (KM) |
reason | string | API message |
code | string | Status code (S001 = success |
Response
{
"result": {
"originAddressResolved": {
"address": "8TH FLOOR, AWFIS CO-WORKING, TOWER 01, ONE INTERNATIONAL CENTER, SENAPATI BAPAT MARG, BABASAHEB AMBEDKAR NAGAR, MUMBAI, MAHARASHTRA 400013, INDIA",
"latitude": "19.0102074",
"longitude": "72.8352623",
"confidenceScore": 1,
"city": "KONKAN DIVISION",
"state": "MAHARASHTRA",
"stateCode": "MH",
"country": "INDIA",
"countryCode": "IN",
"zipcode": "400013"
},
"destinationAddressResolved": {
"address": "GOREGAON EAST, MUMBAI, MAHARASHTRA, INDIA",
"latitude": "19.1662566",
"longitude": "72.8525696",
"confidenceScore": 0.5,
"city": "KONKAN DIVISION",
"state": "MAHARASHTRA",
"stateCode": "MH",
"country": "INDIA",
"countryCode": "IN",
"zipcode": ""
},
"displacementInKm": "17.45",
"routeDistanceInKm": "24.35"
},
"reason": "Request Successful",
"code": "S001"
}Status Code Mapping Table
HTTP Status Code | Code | Type | Reason |
|---|---|---|---|
200 | S001 | Success | Request Successful |
200 | S003 | Success | Data Not Found |
200 | S006 | Success | Data Partially Available |
400 | E001 | Error | Bad Request |
401 | E101 | Error | Unauthorized Access |
403 | E201 | Error | Forbidden |
404 | E301 | Error | Not Found |
409 | E401 | Error | Upstream Error |
429 | E501 | Error | Rate Limit Exceeded |
500 | E601 | Error | Internal Server Error |
503 | E701 | Error | Service Unavailable |
504 | E801 | Error | Timeout |