Phone Append Tutorial
Overview
Phone Append is a real-time solution for retrieving someone’s phone number, based on their name and address. If the number you are wanting to append is a Mobile Phone Number, try the Mobile Append solution instead.
Phone Append URI
The Phone Append URI accepts a person’s name and address and returns the phone number associated with the person and address.
Required Information
The Phone Append URI requires you to have an Authorization Token. If you have not retrieved an Authorization Token yet, follow the Authorization Tutorial before continuing.
The Phone Append URI, like all of the solution URIs, also requires you to have an API Key. If you do not know your API Key, contact support to retrieve it. The API Key should be provided in the request header with the header attribute: x-api-key
The Phone Append URI must be used with a POST request, where the request payload contains the person’s name and address to append the phone number up for.
Example
Request URL
The URL for the Phone Append URI is: https://api.thedatagroup.com/{version}/sync/append/phone, where {version} is the API Version you wish to use.
Request Headers
Header Attribute | Header Value |
---|---|
x-api-key | {your api key} |
AuthorizationToken | {your authorization token} |
Content-Type | application/json |
Request Payload
The request payload for the Phone Append URI must contain the first_name, last_name, and address_1 attributes. It must also contain either the zipcode attribute or both the city and state attributes.
{ "first_name": "Richard", "last_name": "Young", "address_1": "4689 Lakewood Drive", "city": "Fleming Island", "state": "FL" }
cURL Example
To query the Phone Append URI, you can use one of the provided SDKs, a REST Client, or a simple cURL command. Below is an example of the cURL command for the example input information.
curl -X POST -H "Content-Type: application/json" -H "AuthorizationToken: {your_token}" -H "x-api-key: {your_key}" -H "Cache-Control: no-cache" -d '{ "first_name": "Richard", "last_name": "Young", "address_1": "4689 Lakewood Drive", "city": "Fleming Island", "state": "FL" }' "https://api.thedatagroup.com/v3/sync/append/phone"
Response Payload
The response payload for the Phone Append URI will contain the phone number associated with the requested name and address.
{ "first_name": "Richard", "last_name": "Young", "phone": "5875556987", "address": { "street_number": "4689", "street_name": "L