Reference Guide#
Introduction#
The Consumer Web Service offers a real-time REST-based solution, enabling users to select, retrieve counts, and purchase customized consumer mailing lists.
The LeadGen Cloud APIs are at the disposal of mailers, whether for private in-house use or as a customer-facing portal for list selection.
Base URL#
https://list.melissadata.net/
Licensing#
The License Key is a software key required to use the web service. You will receive your license key from your Melissa representative. If you don’t have a license key, contact the Melissa sales team at sales@melissa.com or 800-MELISSA ext. 3 (800-635-4772 ext. 3). Without a license key, LeadGen Consumer will not function.
To set the license key, use the id/CustomerID property in your requests.
Endpoints#
v1/Consumer#
Introduction#
There are multile endpoints you can access for LeadGen: Consumer. These endpoints are all formatted like:
https://list.melissadata.net/v1/Consumer/{{action}}_{{geographicType}}
Where action is either get
or buy
and geographicType is one geographic type selected from one of these supported types: Geographic Types
Try it Now#
curl -X GET "http://list.melissadata.net/v1/Consumer/rest/Service.svc/get/city?id={{customer@domain.com}}
&city=CA;orange
&&ownRent-d=1
&dwell=2
&cAge-d=3-4-5
&phone=1"
curl -X GET "http://list.melissadata.net/v1/Consumer/rest/Service.svc/buy/city?id={{customer@domain.com}}
&city=CA;orange
&&ownRent-d=1
&dwell=2
&cAge-d=3-4-5
&phone=1
&file="
Request Parameters#
Code |
Description |
||||
---|---|---|---|---|---|
Version |
Version of the web service. |
||||
Web Service |
Consumer. |
||||
Protocol |
REST. |
||||
Action |
Get count or buy list. |
||||
Geographic Type |
ZIP, city, county, state, radius, circle or polygon |
||||
Customer ID |
Requester’s customer ID or email address |
||||
opt |
|
Code |
Description |
||||
---|---|---|---|---|---|
Version |
Version of the web service. |
||||
Web Service |
Consumer. |
||||
Protocol |
REST. |
||||
Action |
Get count or buy list. |
||||
Geographic Type |
ZIP, city, county, state, radius, circle or polygon |
||||
Customer ID |
Requester’s customer ID or email address |
||||
opt |
|
Actions#
There are two avaliable actions: get and buy
Action |
Service Description |
---|---|
Get |
Get count of addresses that fit in the given criteria. |
Buy |
Buy a list of addresses’ info that fit the given criteria. |
Geographic Types#
Type |
Description |
---|---|
Zip |
Either 5-digits ZIP, 9 digits ZIP+4, or ZIP-and-carrier route. Multiple ZIP, ZIP+4 and ZIP-and-carrier route can be requested, comma separated with no space. |
City |
Format: 2-digit state; city name, i.e. TX:Dallas. Multiple cities be requested, comma separated with no space. |
County |
Format: 2-digit state;county name, i.e. CA;Lake. Multiple counties be requested, comma separated with no space. |
State |
Format: 2-digit state code. Only one state can be requested. |
Radius |
Miles of radius from a given address, or the closes so many records to a given address or point. |
Street |
A street name within a ZIP. |
Polygon |
Format: longtitude1; latitude1, longtitude2, latitude2,… The first pair of longitude/latitude is automatically the start and end of the polygon. The points (longitude/latitude pair) go counter clock wise to form a polygon. Multiple polygons can be requested with the delimiter | without space . No more than 10 polygons. Total maximum square miles is 10. |
Circle |
Miles of radius from a point (longitude;latitude). |
Options#
Each request takes a set of geographic input. Property address types and other input are optional with default values, as well as purchase options. See Response Fields for the format of all columns appended to file.
Geographic Options#
URL Parameters |
Geographic Type |
Handling |
---|---|---|
Zip (5 digits) zip+4 (9 digits) |
Required: zip Optional: radius |
Each five-digit ZIP is validated. Plus4 is a filter in data selection. |
City |
Required: city Optional: radius |
Each city and state combination is valid. |
County |
Required: county |
Each county and state combination is validated. FIPS is retrieved if valid. |
State |
Required: state Optional: radius |
Two-digit state code is validated. |
Addr |
Required: radius |
Exact street number and street name are used in data selection. No validation. Latitude and longitude are retrieved if the address exists. |
Mile |
Required: circle Optional: radius (Mile or record must be given.) |
Mile is used to find out the latitude and longitude of a parameter for many miles away from the given address. For radius type, maximum is 50 miles. For circle type, the radius must be between .025 and 25 miles. |
Records |
Optional: radius (Mile or record must be given.) |
Number of records that are closest to thte given address |
Str |
Optional: radius |
A street name within the given zip. (The street name needs to be exact.) |
Strzip |
Optional: radius |
Zip for a specific street that is within the given radius (combination with a given address.) |
Pt |
Required: circle |
A longitude;latitude point |
Points |
Required: polygon |
Each set of points for a polygon is validated and reoriented in the sequence of drawing. |
Demographic Options#
URL Parameters |
Meaning |
Values |
---|---|---|
hInc |
Append household income info to file |
Default hInc=0 To append: hInc |
hInc-d |
Various ranges of household incomes
|
Default: all inclusive Otherwise specify the index; use ‘-’ dash to specify multiple ranges, i.e. hInc-d=2-3-5 |
cAge |
Append contact age group info to file if exists (frequency 84.2%) |
Default: cAge=0 To append: cAge=1 |
cAge-d |
Various contact age groups.
|
Default: ownRent=0 To append: ownRent=1 |
ownRent |
Append home owner/renter info to file if exists (frequency 98.5%) |
Default: ownRent=0 To append: ownRent=1 |
ownRent-d |
Home owner or renter
|
Default all inclusive Otherwise specify the index i.e. ownRent-d=1 |
martial |
Append marital status to file |
Default marital=0 To append: marital=1 |
martial-d |
Various marital statuses
|
Default: all inclusive Otherwise specify the index; use ‘-’ dash to specify multiple ranges, i.e. marital-d=2-3-4 |
resLen |
Append length of resideny to file |
Default resLen=0 To append: resLen=1 |
resLen-d |
Various lengths of residency
|
Default: all inclusive Default: all inclusive Otherwise specify the index; use ‘-’ dash to specify multiple ranges, i.e. resLen-d=2-3-4 |
hAge |
Append household age code to file |
Default hAge=0 To append: hAge=1 |
hAge-d |
Various household age codes
|
Default: all inclusive Otherwise specify the index; use ‘-’ dash to specify multiple ranges, i.e. hAge–d=2-3-4 |
people |
Append number of people in household to file |
Default: people=0 To append: people=1 |
people-d |
Various numbers of people in the household
|
Default: all inclusive Otherwise specify the index; use ‘-’ to specify multiple ranges, i.e. people-d=2-3-4 |
adults |
Append number of adults in household to file |
Default: adults=0 To append: adults=1 |
adults-d |
Various numbers of adults in household
|
Default: all inclusive Default: all inclusive Otherwise specify the index; use ‘-’ dash to specify multiple ranges, i.e. adults-d=2-3-4 |
kids |
Append numbers of children in household to file if exists (frequency 25.5%) |
Default: kids=0 To append: kids=1 |
kids-d |
Various numbers of children in household
|
All inclusive Otherwise specify the index; use ‘-’ dash to specify multiple ranges, i.e. kids-d=2-3-9 |
cCard |
Append household credit card info to file |
Default: cCard=0 To append: cCard=1 |
cCard-d |
Various household credit cards
|
Default: all inclusive Otherwise specify the index; use ‘-’ dash to specify multiple ranges, i.e. cCard-d=2-3-4 |
Append mail responsive info to file if exists (frequency 66.5%) |
Default: mail=0 To append: mail=1 |
|
mail-d |
Various mail responsive info
|
Default: all inclusive Otherwise specify the index; use ‘-’ dash to specify multiple ranges, i.e. mail-d=2 |
worth |
Append net worth to file if exists (frequency: 69.5%) |
Default: worth=0 To append: worth=1 |
worth-d |
Various net worth ranges
|
Default: all inclusive Otherwise specify the index; use ‘-’ dash to specify multiple ranges, i.e. worth-d=2-3-5 |
home |
Append target home valuation mode in 1,000s to file if exists (frequency: 76.2%) |
Default: home=0 To append: home=1 |
home-d |
Various ranges of target home valuation mode in 1,000s
|
Default: all inclusive Otherwise specify the index; use ‘-’ dash to multiple ranges, i.e. home-d=2-3-5 |
General Options#
URL Parameters |
Meaning |
Values |
---|---|---|
dwell |
Dwelling type:
|
Default: all inclusive Otherwise specify the index, i.e dwell=2 |
one |
One contact per address |
Default: one=1 Otherwise one=0 return all contacts |
gender |
Primary gender |
Default: all inclusive Otherwise M or F |
zip4 |
Records with ZIP+4 info only |
Default: zip4=0 Otherwise zip4=1 returns only addresses with zip4 info |
usps |
Using USPS preferred city names |
Default: usps=1 Otherwise usps=0 returns whatever city name (official name or vanity name or abbreviated) consumers entered |
latlon |
Show latitude/longitude for each address in street count’s response |
Default latlon=0 Otherwise latlon=1 returns latitude and longitude |
dbug |
Parameter check. If a parameter is spelt wrong or not suited for the given call, the request will be rejected |
Default dbug=0 Otherwise dbug=1 to check |
pobox |
Include or exclude PO box. Default is to include |
Default: pobox=1 Otherwise pobox=0 |
Other Purchase Options#
URL Parameters |
Meaning |
Values |
---|---|---|
phone |
Append phone number to file if exists (frequency: 41.1%) |
0 (To append, set value to 1) |
birth |
Append birth date to file if exists (frequency 84.2%) |
0 (To append, set value to 1) |
fam |
Append family relationship to file if exists (frequency 99.9%) |
0 (To append, set value to 1) |
struct |
Append structure year to file if exists (frequency: 52.8%) |
0 (To append, set value to 1) |
po |
Customer’s purchase order number |
n/a |
qty |
Number of records requested and to charge for billing |
n/a |
multi |
Multiple usage of the list (1 – 5 times) |
1 |
sorder |
Up to five orders in recent six months for suppression, comma separated with no space |
n/a |
0: records with no email 1: records with email 2: all records |
2 |
|
femail |
Append Email to order file |
0 (To append, set value to 1) |
eduhh |
Append the highest known education of the primary householder |
Default: eduhh=0 To append: eduhh=1 |
eduhh-d |
|
Default: all inclusive Otherwise specify the index; use ‘-‘ dash to specify multiple ranges, i.e. eduhh-d=1-2 |
edulndv |
Append the highest known education in the household. |
Default: eduIndv =0 To append: eduIndv=1 |
eduIndv-d |
|
Default: all inclusive Otherwise specify the index; use ‘-‘ dash to specify multiple ranges, i.e. eduIndv-d=1-2 |
Response#
<Consumer>
<Geography></Geography>
<Options>
<ContactPersonInfo>
<ContactPersonInfo>One per Address</ContactPersonInfo>
<USPSPreferredCityNames>True</USPSPreferredCityNames>
</ContactPersonInfo>
<BuildingType>
<Details>1</Details>
</BuildingType>
<HouseholdIncome>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</HouseholdIncome>
<ContactAgeGroup>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</ContactAgeGroup>
<HomeOwnerRenter>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</HomeOwnerRenter>
<MaritalStatus>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</MaritalStatus>
<LengthOfResidentCode>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</LengthOfResidentCode>
<HouseholdAgeCode>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</HouseholdAgeCode>
<NumPersonsInHousehold>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</NumPersonsInHousehold>
<NumAdultsInHousehold>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</NumAdultsInHousehold>
<NumChildrenInHousehold>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</NumChildrenInHousehold>
<HouseholdCreditCardInfo>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</HouseholdCreditCardInfo>
<TargetNetWorth>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</TargetNetWorth>
<TargetHomeMarketValue>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</TargetHomeMarketValue>
<Email>
<IncludeAll>False</IncludeAll>
<AppendToFile>False</AppendToFile>
</Email>
<EducationHeadofHousehold>
<IncludeAll>False</IncludeAll>
<AppendToFile>False</AppendToFile>
</EducationHeadofHousehold>
<EducationHighestIndividual>
<IncludeAll>False</IncludeAll>
<AppendToFile>False</AppendToFile>
</EducationHighestIndividual>
<AdditionalAppend></AdditionalAppend>
</Options>
<CountDetails>
<StreetRange></StreetRange>
</CountDetails>
<TotalCount>
<Count>0</Count>
</TotalCount>
<Result>
<StatusCode>Declined</StatusCode>
</Result>
</Consumer>
</Geography>
<Options>
<ContactPersonInfo>
<ContactPersonInfo>One per Address</ContactPersonInfo>
</ContactPersonInfo>
<BuildingType>
<Details>Single Family Only</Details>
</BuildingType>
<HouseholdIncome>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</HouseholdIncome>
<ContactAgeGroup>
<Details>26-30;31-35;36-40</Details>
<AppendToFile>False</AppendToFile>
</ContactAgeGroup>
<HomeOwnerRenter>
<Details>Home Owner</Details>
<AppendToFile>False</AppendToFile>
</HomeOwnerRenter>
<MaritalStatus>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</MaritalStatus>
<LengthOfResidentCode>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</LengthOfResidentCode>
<HouseholdAgeCode>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</HouseholdAgeCode>
<NumPersonsInHousehold>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</NumPersonsInHousehold>
<NumAdultsInHousehold>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</NumAdultsInHousehold>
<NumChildrenInHousehold>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</NumChildrenInHousehold>
<HouseholdCreditCardInfo>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</HouseholdCreditCardInfo>
<MailResponsiveInfo>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</MailResponsiveInfo>
<TargetNetWorth>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</TargetNetWorth>
<TargetHomeMarketValue>
<IncludeAll>True</IncludeAll>
<AppendToFile>False</AppendToFile>
</TargetHomeMarketValue>
<AdditionalAppend>
<PhoneNumber>True</PhoneNumber>
</AdditionalAppend>
</Options>
<CountDetails>
<StreetRange>
<Street>
<StartNumber/>
<EndNumber/>
<Geography>Orange, CA</Geography>
<Zip/>
<Count>16192</Count>
</Street>
</StreetRange>
<TotalCount>
<Count>16192</Count>
</TotalCount>
<Order>
<Id>123456</Id>
<Usage>1</Usage>
<DownloadURL>ftp://w10.melissadata.com/ListOrderFiles/123456_678910.csv
</DownloadURL>
<DeliveredQty>16192</DeliveredQty>
</Order>
<Result>
<StatusCode>Approved</StatusCode>
</Result>
</CountDetails>
</Consumer>
Response Fields#
Tag Code |
Tag Description |
---|---|
<Consumer> |
Tag encapsulating the whole XML doucument |
<Geography> |
Geo request |
<Address> |
Tags returned depend on Geo type. |
<City> |
Tags returned depend on Geo type. |
<County> |
Tags returned depend on Geo type. |
<State> |
Tags returned depend on Geo type. |
<ZIP> |
Tags returned depend on Geo type. |
<Polygons> |
Tags returned depend on Geo type. |
<Circle> |
Tags returned depend on Geo type. |
<Records> |
Tags returned depend on Geo type. |
<Miles> |
Tags returned depend on Geo type. |
<Options> |
Demographic Selects Request |
<ContactPersonInfo> |
|
<ContactPersonInfo> |
|
<Gender> |
Returned if & gender is specified in url request. Output per request. |
<OnlyAddressesWithZipPlus4> |
Returned if & zip4=1 is requested. Output: True |
<USPSPreferredCityNames> |
True or False |
<BuildingType> |
|
<Details> |
|
<HouseholdIncome> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<ContactAgeGroup> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<HouseOwnerRenter> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<MaritalStatus> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<LengthOfResidentCode> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<HouseholdAgeCode> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<NumPersonsInHousehold> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<NumAdultsInHousehold> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<NumChildrenInHousehold> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<HouseholdCreditCardInfo> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<MailResponsiveInfo> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<TargetNetWorth> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<TargetHomeMarketValue> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll>, unless detailed options are specified in request. |
<AppendToFile> |
True or False |
<AdditionalAppend> |
|
<PhoneNumber> |
True or False |
<StructureYear> |
True or False |
<FamilyRelationship> |
True or False |
<BirthDate> |
True or False |
<CountDetails> |
Contains a breakdown of the total count. |
<StreetRange> |
Contains a breakdown of the street range. |
<Street> |
Individual streets |
<StartNumber> |
For Geo types radius and street. Shows the starting street number and ending street number in the count |
<EndNumber> |
|
<Geography> |
Location of count detail. The location varies by the request type:
|
<Zip> |
For radius and street types only. |
<Count> |
Number of records that <StartNumber>, <EndNumber>, <Geography>, and <Zip> apply to. |
<Addresses> |
Contains a breakdown of the addresses returned. |
<Address> |
When latitude and longitude are not requested for street count, this shows an address. Otherwise, it’s a tag with sub tags to show details |
<FullAddress> |
An address when latitude and longitude are requested for street count |
<Latitude> |
Latitude of the address when latitude and longitude are requested for street count |
<Longitude> |
Longitude of the address when latitude and longitude are requested for street count |
<TotalCount> |
Total number of records returned with the selected options. |
<Order> |
Buy Requests Only. Order details for a buy request. |
<Id> |
Order Id. |
<Usage> |
|
<DownloadURL> |
The URL to download the purchased file. |
<PONumber> |
Returned if po is specified. |
<DeliveredQty> |
|
<RequestedQty> |
Returned if & qty is specified |
<Result> |
Returns the status code. |
<StatusCode> |
Indicates the status of a requests. Returns Declined, Approved, or Err. |
<Errors> |
If <StatusCode> returns Err. |
<Error> |
|
<ErrorCode> |
|
<ErrorDescription> |
Status Codes#
For details of all status codes please visit here
LeadGen - Consumer Status codes are numeric codes, e.g. 101. Status codes are returned as a comma-delimited string with no whitespace, e.g. 100,101.
Record Level Status Codes#
Code |
Long Description |
---|---|
100 |
Unrecognized ZIP Code. |
101 |
Unrecognized city or state. |
102 |
Unrecognized county or state. |
103 |
Unrecognized address. |
104 |
User ID or password not recognized. |
106 |
Invalid user information. |
108 |
Order failed, please try later. |
109 |
Insufficient geographic input. |
111 |
Request exceeds 100,000 record maximum. |
112 |
Unrecognized state. |
113 |
Error, please try again. |
115 |
For the Radius geography type, please enter a number of records. |
116 |
Sorry, you don’t have permission to access this service. |
117 |
ZIP Code is not a valid input for the requested geography type. |
121 |
The list cannot be used more than 5 times. |
122 |
Order count exceeds 65,535 record maximum for Excel files. |
123 |
Invalid option. |
124 |
Order count exceeds 65,535 record maximum for comma limited files. |
125 |
Request exceeds 10 miles maximum radius. |
126 |
Invalid polygon(s). |
127 |
The square mileage requested exceeds the limit 10 square miles. |
128 |
The number of polygons requested exceeds the limit 10 polygons. |
129 |
Miles of radius for the circle must be within 0.25 and 25 miles. |
130 |
You have exceeded your order limit. |
131 |
You’re approaching your order limit. |
132 |
Your subscription will expire soon. |
133 |
Your subscription expired. |
134 |
Invalid geographic input. |