DigiPin API
Encode high-precision geographic coordinates into India's 10-digit digital postal index pin (DIGIPIN) and decode DIGIPINs back into spatial bounding boxes.
Overview & Solution
Traditional street addresses can be lengthy, confusing, and non-standardized. The DigiPin API adopts the national digital addressing standard to compress precise latitude and longitude into an intuitive alphanumeric code (e.g. DL-DEL-8921-X4), dividing territories into standardized 4m x 4m addressable grid cells.
Industry Use Cases
1. High-Precision Drone & Autonomous Delivery
- 4-Meter Precision Drop Zones: Guide autonomous delivery drones directly to customer balcony or rooftop landing pads using 10-digit DIGIPINs.
2. Emergency Services & Disaster Response
- Instant Location Sharing: Enable citizens to share their exact 4m grid location with police, ambulance, and disaster relief teams in rural or unmapped terrains.
3. Simplified Customer Checkout
- One-Field Address Entry: Allow shoppers to enter a single 10-character DIGIPIN instead of filling multi-line address forms.
API reference
Location and Address Intelligence APIs · API key only
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /geocode/digipin-decode | Decode a DIGIPIN (JSON body) |
GET | /geocode/digipin-decode | Decode a DIGIPIN (query string) |
GET | /geocode/digipin-encode | Encode coordinates into a DIGIPIN |
All requests need only your API key, as the api-key query parameter - no bearer token:
?api-key=<apiKey>
Decode a DIGIPIN (JSON body)
POST /geocode/digipin-decode
Base URL: https://api-gw.sovereignsolutions.com/gateway
Request Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
digipin | body | string | No | 10-character DIGIPIN to decode. |
Request body
{
"digipin": "4T38MJK524"
}
Response Schema
200 OK
{
"latitude": "13.067526",
"longitude": "80.270956",
"level": 10,
"bounds": {
"minLatitude": "13.067509",
"maxLatitude": "13.067543",
"minLongitude": "80.270939",
"maxLongitude": "80.270973"
}
}
| Field | Type | Description |
|---|---|---|
latitude | string | Latitude of the cell centre, as a string. |
longitude | string | Longitude of the cell centre, as a string. |
level | integer | Number of DIGIPIN characters decoded. |
bounds | object | |
bounds.minLatitude | string | South edge of the cell. |
bounds.maxLatitude | string | North edge of the cell. |
bounds.minLongitude | string | West edge of the cell. |
bounds.maxLongitude | string | East edge of the cell. |
Decode a DIGIPIN (query string)
GET /geocode/digipin-decode
Base URL: https://api-gw.sovereignsolutions.com/gateway
Request Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
digipin | query | string | Yes | 10-character DIGIPIN to decode. | 4T38MJK524 |
Response Schema
200 OK
{
"latitude": "13.067526",
"longitude": "80.270956",
"level": 10,
"bounds": {
"minLatitude": "13.067509",
"maxLatitude": "13.067543",
"minLongitude": "80.270939",
"maxLongitude": "80.270973"
}
}
| Field | Type | Description |
|---|---|---|
latitude | string | Latitude of the cell centre, as a string. |
longitude | string | Longitude of the cell centre, as a string. |
level | integer | Number of DIGIPIN characters decoded. |
bounds | object | |
bounds.minLatitude | string | South edge of the cell. |
bounds.maxLatitude | string | North edge of the cell. |
bounds.minLongitude | string | West edge of the cell. |
bounds.maxLongitude | string | East edge of the cell. |
Encode coordinates into a DIGIPIN
GET /geocode/digipin-encode
Base URL: https://api-gw.sovereignsolutions.com/gateway
Request Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
latitude | query | string | Yes | Latitude, decimal degrees. | 13.067526 |
longitude | query | string | Yes | Longitude, decimal degrees. | 80.270956 |
Response Schema
200 OK
{
"digipin": "4T38MJK524"
}
| Field | Type | Description |
|---|---|---|
digipin | string | 10-character DIGIPIN of the cell containing the point. |
Example
curl -X POST 'https://api-gw.sovereignsolutions.com/gateway/geocode/digipin-decode?api-key=$API_KEY' \
-H 'Content-Type: application/json' \
-d '{"digipin": "4T38MJK524"}'