Pincode Lookup (India)
The Pincode Lookup API identifies the Indian pincode corresponding to a given drop location (latitude and longitude).
Drop Pincode Lookup API
Allowed HTTP Methods
POST
URL
base_url -https://hld.clickpost.in
<baseURL>/api/v1/geospatial/fetch_pincode
URL Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key | String | Yes | ClickPost API key |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
drop_latitude | double | Yes | Latitude of the drop location. Should be a valid India latitude. |
drop_longitude | double | Yes | Longitude of the drop location. Should be a valid India longitude. |
Sample API cURL
curl --location '<base_url>/api/v1/geospatial/fetch_pincode?key=<API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"drop_latitude":28.382072,
"drop_longitude":77.201517
}'Request JSON Format
| Field Name | Data Type | Description | Value Constraints |
|---|---|---|---|
drop_latitude | double | Latitude of the drop location for which the corresponding Indian pincode needs to be fetched. | cannot be null |
drop_longitude | double | Longitude of the drop location for which the corresponding Indian pincode needs to be fetched. | cannot be null |
Response JSON Format
| Field Name | Data Type | Description | Value Constraints |
|---|---|---|---|
meta | JSON Object | Metadata about the request, such as status code and message describing the result. Refer to Possible Meta Statuses section below. | cannot be null |
| result | JSON Object | Result containing the pincode corresponding to the provided drop location. | Can be null in case of error |
meta object fields
| Field Name | Data Type | Description | Value Constraints |
|---|---|---|---|
message | string | Human-readable message describing the error. | can be null or empty |
| status | integer | contains the status code as per response message | cannot be null |
success | boolean | Contains boolean value true request succeeded or false request failed | cannot be null |
result object fields
| Field Name | Data Type | Description | Value Constraints |
|---|---|---|---|
drop_pincode | integer | Indian pincode corresponding to the provided drop_latitude and drop_longitude. | Cannot be null |
Possible Meta Statuses
| HTTP Status Code | meta.status | meta.message |
|---|---|---|
| 200 | 200 | Request is executed successfully |
| 400 | 4001 | Invalid request json |
| 400 | 4003 | Invalid or missing request |
| 403 | 403 | Access is not allowed |
| 404 | 404 | Pincode Details not found in system |
| 404 | 4007 | API Not Found |
| 500 | 500 | Something went wrong in Clickpost server |
Example Responses
Success Response
When the provided latitude and longitude correspond to a valid location in India and a pincode is available for the location.
{
"result": {
"drop_pincode": 121004
},
"meta": {
"status": 200,
"success": true,
"message": "Request is executed successfully"
}
}Error Response
When the request body is invalid or required latitude/longitude parameters are missing.
{
"result": null,
"meta": {
"status": 404,
"success": false,
"message": "Pincode details not found in system for lat : 28.382072, long : 71.201517"
}
}Updated 13 days ago
Did this page help you?
