apyhub
Back

Validate Indian Postcodes API

Hosted on ApyHub

What it does

The Pincode API checks whether an Indian PIN code is real. Send a six-digit pincode and get back true or false. Spaces are ignored, so 110 001 and 110001 both work.

Use it to stop bad addresses at the point of entry. Checkout forms. Signup flows. CRM imports. Bulk address cleanup on data you inherited. Catching a wrong pincode before an order ships saves a failed delivery and a support ticket.

The response is deliberately small. One boolean, nothing to parse. That makes it cheap to call on every keystroke or on form submit, and easy to drop into a validation chain next to your email and phone checks.

It tells you the pincode exists. It does not tell you which city or state it belongs to, or whether the rest of the address matches it. If you need the full address verified, use the Address Validation API. Shipping outside India too? The UK Postcode API works the same way.

POST
Validate India pin code
https://api.eu.apyhub.com/apyhub/validate-indian-postcode

QUICKSTART

GUIDE

Quickstart

Check whether a postcode or PIN code exists in the lookup table.

curl -X POST "https://api.eu.apyhub.com/apyhub/validate-indian-postcode" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"postcode":"YO17 6DU"}'

What you'll get back

Returns a JSON object with a data boolean field — true when the postcode exists in the lookup table, false otherwise.

{
  "data": true
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Postcode or PIN code (spaces ignored for matching).

About this endpoint

What it does

Validates an Indian PIN code by sending a postcode string in the request body and returning a boolean result. The response indicates whether the postcode exists in the lookup table.

Request Body

ParameterTypeMandatoryDescription
postcodeStringYesPostcode or PIN code; spaces are ignored for matching.

Response

Returns a JSON object with a data boolean field. true when the postcode exists in the lookup table, false otherwise.

ParameterTypeMandatoryDescription
dataBooleanYestrue when the postcode exists in the lookup table.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.