What is Address Validation?
The Address Validation service takes an address and returns the quality of the given address as Valid, Ambiguous, Junk, or Incomplete.
API request format
Headers
-
x-api-key
- Description: This key is used for validation and quota management.
- Example: xxxxxxxxxxxxxxxxxxxxxxxxxx
-
Content-type
- Description: The Content-Type header describes the format in which the body of your request is being sent as.
- Supported value: Application/Json
Note: To get an API key, you can send a request to us at insights@delhivery.com.
Parameters
- data* (required)
- Description: Payload with details of address, pin code, city, and state.
- Fields
- address* (required)
- Description: The street address for which you want to get the address validity.
- Example: Plot 5, Sector 44, Gurgaon
- pincode (Optional)
- Description: Pincode associated with the provided address.
- Example: 122003
- city (Optional)
- Description: City associated with the provided address.
- Example: Gurgaon
- state (Optional)
- Description: State associated with the provided address.
- Example: Haryana
{
"data": {
"address": "Plot 5, Sector 44, Gurgaon",
"pincode": "122003",
"city": "Gurgaon",
"state": "Haryana"
}
}
API responses
Response details
- success
- Description: True value indicates that the address was successfully parsed and the response has been returned without any error. A false value would suggest an error in processing the request. The details for the possible reason for any error will be provided via the message key.
- Possible values: True / False
- status_code
- Description: Status codes indicate whether a specific API request has been successfully completed. And these codes will also help you track down the reason in case of failure.
- Possible values: 200 / 400 / 401 / 403 / 429 / 500
- message
- Description: This field will provide the information regarding the request processed by the Address Validation service. This may help you get an idea about the success or a possible reason for failure.
- Example: Request has been processed
- request_id
- Description: unique id to distinguish between requests.
- Example: AX34687667877689
- result: Contains the quality of the given address as Valid, Ambiguous, Junk or Incomplete.
- address-validity
- Description: Valid addresses are those addresses that are complete, familiar, and reachable without any more information. The rest of the addresses are incomplete or unfamiliar, their incompleteness/ unfamiliarity is measured on a scale of 0 to 100. The higher the score is, the higher the degree of incompleteness/meaningfulness. Valid [0-10], Ambiguous[10-50], Incomplete[50-80] and Junk[80-100].
- Possible values: Valid, Ambiguous, Junk, Incomplete
{
"success": true,
"status_code": 200,
"message": "Request has been processed",
"request_id": AX34687667877689,
"result": {
"address-validity": "Valid"
}
}