---
title: Address Distance API
slug: v3-gateway/address-distance-api
createdAt: 2026-03-30T10:41:45.874Z
---

## 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&#x20;
- Driving route distance calculation&#x20;
- Straight-line (Haversine) distance computation&#x20;

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**&#x20;
- Returns both:&#x20;
  - **Driving distance (route-based)**&#x20;
  - **Displacement distance (Haversine)**&#x20;
- Provides **resolved addresses and coordinates**&#x20;
- Handles **partial and failure scenarios gracefully**&#x20;
- Optimized for **Indian geography**&#x20;

## Curl

:::CodeblockTabs
Production

```curl
curl --location 'https://api.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
}'
```

Preproduction

```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&#x20;

| 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

:::CodeblockTabs
200

```json
{
    "result": {
        "originAddressResolved": "8TH FLOOR, AWFIS CO-WORKING, TOWER 01, ONE INTERNATIONAL CENTER, SENAPATI BAPAT MARG, BABASAHEB AMBEDKAR NAGAR, MUMBAI, MAHARASHTRA 400013, INDIA",
        "originAddressLat": "19.0102074",
        "originAddressLong": "72.8352623",
        "destinationAddressResolved": "SIGNZY, 3RD FLOOR, GARUDA, BHIVE WORKSPACE, OLD MADIWALA, KUVEMPU NAGAR, STAGE 2, BTM LAYOUT, BENGALURU, KARNATAKA 560076, INDIA",
        "destinationAddressLat": "12.9155",
        "destinationAddressLong": "77.6161",
        "displacementInKm": "848.64",
        "routeDistanceInKm": "1001.95"
    },
    "reason": "Request Successful",
    "code": "S001"
}
```

404

```json
{
    "result": {},
    "reason": "Data Not Found",
    "code": "E301"
}
```

409

```json
{
    "result": {},
    "reason": "Upstream Down",
    "code": "E401"
}
```

200&#x20;

```json
{
    "result": {
        "originAddressResolved": "NEW DELHI, BAHADURGARH, DELHI, 110035, INDIA",
        "originAddressLat": "28.677936",
        "originAddressLong": "77.158882",
        "destinationAddressResolved": "",
        "destinationAddressLat": "",
        "destinationAddressLong": "",
        "displacementInKm": "",
        "routeDistanceInKm": ""
    },
    "reason": "Data Partially Available",
    "code": "S006"
}
```

200 - allDetailsRequired

```json
{
    "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                  |

