Address Validation v2

Using the Address Validation API

5min
📘 address validation v2 address validation v2 this guide covers v2 of the address validation api this version offers improved features and functionality while v2 is our recommended version, we understand that you might still need access to v1 documentation you can also contact our support team for further information making a request use the validateaddress endpoint to confirm if an address is valid see the request details below request body the request body should contain data object with the following fields parameter datatype description example address string the street address which you want to process d1 87 aravali heights, dharuhera bhiwadi bypass city string city associated with the provided address dharuhera state string state associated with the provided address haryana pincode string the 6 digit pincode associated with the provided address 122100 language string the language of the address data english example request { "data" { "address" "house no 30 boring road patna", "city" "patna", "state" "bihar", "pincode" "800001", "language" "english" } } understanding the response the addressvalidation endpoint will return a json response with the validation status of the address along with the address metadata response schema parameter data type description example success boolean indicates if request was successful true status code integer http status code for request 200 message string message describing status of request "request has been processed" request id string unique id for request "addval|jsbvkjs" address validity string validity status of address "valid" address type object type of address { "type" "residential", "sub type" "society" } rooftop confirmed boolean accurately identifies and extracts specific “rooftop” information from the input address, such as door numbers, house numbers, and names of shops, industries, warehouses, or other commercial entities true landmark confirmed boolean if landmark is confirmed false is rural boolean if address is rural false state confirmed boolean if state is confirmed true city confirmed boolean if city is confirmed true pin confirmed boolean if pin is confirmed true pin state mismatched boolean if pin and state mismatch false pin city mismatched boolean if pin and city mismatch false multi city present boolean if multiple city tokens detected false is localizable boolean the api returns true when the address has enough information for the location finding geocoding models to determine its latitude and longitude with certainty true address attributes object additional address attributes will be included in future versions of the api error string error message if any null example response { "success" true, "status code" 200, "request id" "addval|5910d468 42a8 420e a300 88f3a230f87e", "message" "request has been processed", "result" { "address validity" "valid", "address type" { "type" "residential", "sub type" "non identifiable" }, "address metadata" { "rooftop confirmed" true, "is rural" false, "landmark confirmed" false, "state confirmed" true, "city confirmed" true, "pin confirmed" true, "pin state mismatched" false, "pin city mismatched" false, "multiple city present" false, "is localizable" true }, "address attributes" {} }, "error" null } error response { "success" false, "status code" 422, "request id" "addval|5c4e1ede 9bf9 42c2 872c 487948326aea", "message" "model failure error", "result" null, "error" { "message" "value error", "type" "the validation model could not decipher the location and the content of the address no result predicted for the provided input" } }