Skip to main content

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​

MethodPathPurpose
POST/geocode/digipin-decodeDecode a DIGIPIN (JSON body)
GET/geocode/digipin-decodeDecode a DIGIPIN (query string)
GET/geocode/digipin-encodeEncode 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

ParameterInTypeRequiredDescriptionExample
digipinbodystringNo10-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"
}
}
FieldTypeDescription
latitudestringLatitude of the cell centre, as a string.
longitudestringLongitude of the cell centre, as a string.
levelintegerNumber of DIGIPIN characters decoded.
boundsobject
bounds.minLatitudestringSouth edge of the cell.
bounds.maxLatitudestringNorth edge of the cell.
bounds.minLongitudestringWest edge of the cell.
bounds.maxLongitudestringEast edge of the cell.

Decode a DIGIPIN (query string)​

GET /geocode/digipin-decode

Base URL: https://api-gw.sovereignsolutions.com/gateway

Request Parameters

ParameterInTypeRequiredDescriptionExample
digipinquerystringYes10-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"
}
}
FieldTypeDescription
latitudestringLatitude of the cell centre, as a string.
longitudestringLongitude of the cell centre, as a string.
levelintegerNumber of DIGIPIN characters decoded.
boundsobject
bounds.minLatitudestringSouth edge of the cell.
bounds.maxLatitudestringNorth edge of the cell.
bounds.minLongitudestringWest edge of the cell.
bounds.maxLongitudestringEast edge of the cell.

Encode coordinates into a DIGIPIN​

GET /geocode/digipin-encode

Base URL: https://api-gw.sovereignsolutions.com/gateway

Request Parameters

ParameterInTypeRequiredDescriptionExample
latitudequerystringYesLatitude, decimal degrees.13.067526
longitudequerystringYesLongitude, decimal degrees.80.270956

Response Schema

200 OK

{
"digipin": "4T38MJK524"
}
FieldTypeDescription
digipinstring10-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"}'