Pincode Details
Retrieve location details (district, division, region, state) for an Indian postal pincode.
Endpoint
GET /vas-api/v1/pincode-details
Authentication
Requires OAuth2 Bearer token. Get your credentials →
Request
Query parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| pincode | string | Yes | 6-digit Indian pincode | 400059 |
Example request
bash
curl -X GET "https://api.api4business.com/vas-api/v1/pincode-details?pincode=400059" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"python
import requests
response = requests.get(
"https://api.api4business.com/vas-api/v1/pincode-details",
params={"pincode": "400059"},
headers={"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
)
print(response.json())javascript
const response = await fetch(
"https://api.api4business.com/vas-api/v1/pincode-details?pincode=400059",
{ headers: { "Authorization": "Bearer YOUR_ACCESS_TOKEN" } }
);
console.log(await response.json());java
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.api4business.com/vas-api/v1/pincode-details?pincode=400059"))
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Response
Success (200)
The body is an array of location records for the pincode.
| Field | Type | Description |
|---|---|---|
| body[].pinCode | string | The queried pincode |
| body[].pinDistrict | string | District name |
| body[].pinDivision | string | Postal division |
| body[].pinRegion | string | Postal region |
| body[].stateCode | string | 2-letter state code (e.g., MH, KA, DL) |
| body[].countryCode | string | Country code (IN) |
Example response
json
{
"ok": true,
"responseCode": 200,
"message": "Transmission OK",
"body": [
{
"countryCode": "IN",
"pinCode": "400059",
"pinDistrict": "Mumbai",
"pinDivision": "Mumbai West",
"pinRegion": "Mumbai",
"stateCode": "MH"
}
]
}Response headers
| Header | Description |
|---|---|
| x-request-id | Unique request identifier — log this for debugging and support |
Error responses
| Status | Error Code | Message | Resolution |
|---|---|---|---|
| 400 | 400 | Invalid Request | Verify the pincode query parameter is present and 6 digits |
| 401 | 401 | Invalid Credentials | Refresh your access token |
| 429 | 429 | Quota Violation | Rate limit exceeded — retry with backoff |
| 500 | 500 | Internal Server Error | Retry after delay |
| 503 | 503 | Service Not Available | Upstream unavailable — retry |
State codes
The stateCode field uses standard 2-letter abbreviations: MH (Maharashtra), KA (Karnataka), DL (Delhi), TN (Tamil Nadu), UP (Uttar Pradesh), GJ (Gujarat), RJ (Rajasthan), WB (West Bengal), AP (Andhra Pradesh), TG (Telangana).
Related
Multiple results
Some pincodes may return multiple records if they span multiple postal divisions. Always process the response body as an array.