Using the Address Correlation API
Making API Request
- Endpoint:
POST /address_correlation - Purpose: This API is designed to allow clients to verify the correlation between an address and its corresponding mobile number.
To correlate an address, make a POST request to the CorrelateAddress endpoint with the address details in the request body.
Before making a request to the Address Correlation API, ensure you have all the required parameters ready: address, phone_number,has_consent, and consent_text.
Parameters:
| Parameter | Description | Type | Example |
|---|---|---|---|
pincode | The pincode of the address. | string | “673593” |
address***** | The detailed address to be geocoded. | string | “Yogi complex g wing room no 103 1st floor” |
city | The city of the address. | string | “Gurugram” |
state | The state of the address. | string | “Kerala” |
phone_number***** | The contact phone number. | string | “9999999999” |
has_consent***** | Signifies explicit customer approval for sharing their data with the API and using the resulting outputs. Consent must be informed and specific to these uses. | boolean | True |
consent_text***** | Contains the specific excerpt from the Terms & Conditions or Privacy Policy where the customer's consent is requested. This text should clearly detail the consent sought from the end customer." |
Sample Request Payload:
{
"address": "100, Hill Rd, Ranwar, Bandra West",
"phone_number": "9999999999",
"has_consent": true,
"consent_text": "You also unconditionally authorize us to share your details with third parties/partners, including but not limited to logistics services partners for the purpose of validating your address against your phone number.",
"city": "Mumbai",
"pincode": "4000001",
"state": "Maharashtra"
}
Receiving the API Response
After making the request, the API will return a response containing the following details:
| Parameter | Description | Example / Possible Values |
|---|---|---|
data | Provides details regarding the correlation of the address and phone number. |
|
| add_found | If the address has been independently found in the records. | boolean |
| ph_found | If the ph_no has been independently found in the records. | boolean |
| add_ph_found | If the combination of address and phone number is found in the records. | boolean |
| error | Contains details of any errors that occurred. | {"message": "Invalid query parameters provided in input","type": “value_error"} |
| status_code | The status code of the response. | 200 |
| request_id | A unique identifier for the request. | “relatedness |
| message | Provides information about the success or failure of the request. | “success” |
Sample Response:
{
"status_code": 200,
"message": "success",
"request_id": "relatedness|aef66d7a-b09e-472f-b2b2-aa8e9ad3971e",
"data": {
"add_found": true,
"ph_found": true,
"add_ph_found": true
},
"error": null
}
Handling the Response
In response, you can verify the address and phone number relationship using the add_found, ph_found, and add_ph_found fields. The add_found indicates if the address is present in our records, ph_found shows if the phone number is listed, and add_ph_found reveals if the address and phone number are found together in our database.