Quickstart Guide
LeadGen Occupant can be used to:
Real Time
Simply replace [your Melissa license key] with your license key to test these requests. It will also work in any browser.
REST - Count
Use a REST request to get the count.
curl -X GET "http://list.melissadata.net/v1/Consumer/rest/Service.svc/get/city?id=[your Melissa license key]&city=CA;orange&&ownRent-d=1&dwell=2&cAge-d=3-4-5&phone=1"
REST - Purchase
Use the REST request to purchase the list.
curl -X GET "http://list.melissadata.net/v1/Consumer/rest/Service.svc/buy/city?id=[your Melissa license key]&city=CA;orange&&ownRent-d=1&dwell=2&cAge-d=3-4-5&phone=1&file="
HTTPS - Download
Use the HTTPS link to download the purchased list.
curl -u user:password "https://list.melissadata.com/ListOrderFiles/123456_678910.csv"
Geometry Request Parameters
Parameter | Type | Description |
---|---|---|
Zip (5 digits) or |
Required: zip Optional: radius, street |
Each five-digit ZIP is validated Plus4 is a filter in data selection |
City |
Required: city Optional: radius |
Each city and state combination is validated |
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 (mile) Optional: radius (One of the two should be given, not required together.) |
Mile is used to find out the latitude and longitude of a parameter so many miles away from the given point or address. For circle, it must be within 0.25 and 25 miles. |
Records |
Number of records that are the closest to the given address. | |
Str |
Required: street Optional: radius |
A street name within the given zip. For radius type, the street name needs to be exact. For street type, if not exact street name is found, similar street name (as a substring) is searched. |
Strzip |
Optional: radius | Zip for a specific street that is within the given radius (combination with a given address). |
Points |
Required: polygon | Each set of points for polygon is validate, and reoriented in the sequence of drawing. |
Pt |
Required: circle | A longitude;latititude point |
Demographic Request Parameters
Parameter | Description | Values | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hInc |
Append household income info to file. | Default: hInc =0 To append: hInc =1 |
||||||||||||||||||||||||||||||||||||||
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: all inclusive Otherwise specify the index; use ‘-‘ dash to specify multiple ranges, i.e. cAge-d =2-3-5 |
||||||||||||||||||||||||||||||||||||||
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 |
||||||||||||||||||||||||||||||||||||||
marital |
Append marital status to file | Default: marital =0 To append: marital=1 |
||||||||||||||||||||||||||||||||||||||
marital-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 residency to file | Default: resLen=0 To append: resLen=1 |
||||||||||||||||||||||||||||||||||||||
resLen-d |
Various lengths of residency
|
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 household
|
Default: all inclusive Otherwise specify the index; use ‘-‘ dash to specify multiple ranges, i.e. people-d=2-3-4 |
||||||||||||||||||||||||||||||||||||||
adults |
Append numbers of adults in household to file | Default: adults=0 To append: adults=1 |
||||||||||||||||||||||||||||||||||||||
adults-d |
Various numbers of adults in household
|
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 |
||||||||||||||||||||||||||||||||||||||
mail |
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 specify multiple ranges, i.e. home–d=2-3-5 |
While text encoding is a rare issue with LeadGen Consumer Web Service, note that the API will not support any wrongly-encoded special characters or non-Latin characters. In general, text encoding is an important part of any data enterprise.
This service can deal with multiple languages and scripts. It expects UTF-8 encoding. Be on the lookout for question marks (?), squares (▖) or other unwanted characters like �. They may be an indication of encoding issues and may result in data loss. Bad encoding or character loss is not something our service can correct for you.
XML Response
Here is a sample response.
CA;orange One per Address Single Family OnlyTrue False 26-30;31-35;36-40False Home OwnerFalse True False True False True False True False True False True False True False True False True False True False True Orange, CA 16192 16192 123456 1 https://list.melissadata.com/ListOrderFiles/123456_678910.csv 16192 Approved
Field Name | Description |
---|---|
<Consumer> |
Tag encapsulating the whole XML document. |
<Geography> |
Geo request |
<Address> |
Tags returned depend on Geo type. |
<City> |
|
<County> |
|
<State> |
|
<ZIP> |
|
<Polygons> |
|
<Circle> |
|
<Records> |
Returned if Radius is called with &records specification. |
<Miles> |
Returned if radius is called with &mile specification. |
<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. For example, <Details>$15,000 - 19,999;$20,000 - 29,999;$40,000 - 49,999</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<ContactAgeGroup> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>21-25;26-30;36-40</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<HomeOwnerRenter> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed option is specified in request. For example, <Details>Home Owner</Details> would be shown. |
<AppendToFile> |
True or False |
<MaritalStatus> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>Household contain at least 1 married person;Household contain at least 1 single person;Household contain both married & single persons</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<LengthOfResidentCode> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>07 - 12 months;01 - 02 years;03 - 05 years</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<HouseholdAgeCode> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>25 - 34;35 - 44;45 - 54</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<NumPersonsInHousehold> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>2 persons;3 persons;4 persons</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<NumAdultsInHousehold> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>2 adults;3 adults;4 adults</Details> , would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<NumChildrenInHousehold> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>2 children;3 children;9+</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<HouseholdCreditCardInfo> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>Standard Retail Card;Standard Specialty Card;Upscale Retail Card</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<MailResponsiveInfo> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>Mail Donor Indicator</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<TargetNetWorth> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>$25,000-$49,999;$50,000-$74,999;$100,000-$149,999</Details> would be shown with all chosen options separated by semi colon. |
<AppendToFile> |
True or False |
<TargetHomeMarketValue> |
|
<IncludeAll> OR <Details> |
Default output is <IncludeAll>True</IncludeAll> , unless detailed options are specified in request. For example, <Details>$50,000 - 99,999;$100,000 - 149,999;$200,000 - 249,999</Details> would be shown with all chosen options separated by semi colon. |
<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> |
|
<Address> |
Individual addresses. |
<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 request. Returns Declined, Approved, or Err. |
<Errors> |
If <StatusCode> returns Err. |
<Error> |
|
<ErrorCode> |
|
<ErrorDescription> |
Download File
Column Name | Max Length | URL Parameter | Description | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Address | 75 | Mailing street address | |||||||||||||||||||||||||||||||||||||||||||||||
City | 28 | Mailing city name | |||||||||||||||||||||||||||||||||||||||||||||||
State | 2 | Mailing state | |||||||||||||||||||||||||||||||||||||||||||||||
Zip | 5 | Mailing zip | |||||||||||||||||||||||||||||||||||||||||||||||
Plus4 | 4 | Maling zip4 | |||||||||||||||||||||||||||||||||||||||||||||||
CRRT | 4 | Mailing carrier route | |||||||||||||||||||||||||||||||||||||||||||||||
DPB | 3 | Mailing Delivery Point | |||||||||||||||||||||||||||||||||||||||||||||||
namePrefixCode | 1 |
|
|||||||||||||||||||||||||||||||||||||||||||||||
firstName | 14 | ||||||||||||||||||||||||||||||||||||||||||||||||
lastName | 20 | ||||||||||||||||||||||||||||||||||||||||||||||||
nameSuffix | 2 |
|
|||||||||||||||||||||||||||||||||||||||||||||||
HouseIncome | 1 | hInc=1 |
|
||||||||||||||||||||||||||||||||||||||||||||||
Age1 | 3 | cAge=1 | Data is presented in 2-year bands. So, for example, 18 means 18 or 19 and 34 means 34 or 35 | ||||||||||||||||||||||||||||||||||||||||||||||
OwnerRenter | 1 | ownRent=1 |
|
||||||||||||||||||||||||||||||||||||||||||||||
MaritalStatus | 1 | marital=1 |
|
||||||||||||||||||||||||||||||||||||||||||||||
LengthResidence | 1 | resLen=1 |
|
||||||||||||||||||||||||||||||||||||||||||||||
AgeHouseholdCode | 1 | hAge=1 |
|
||||||||||||||||||||||||||||||||||||||||||||||
NumPersons | 1 | people=1 |
|
||||||||||||||||||||||||||||||||||||||||||||||
NumAdults | adults=1 |
|
|||||||||||||||||||||||||||||||||||||||||||||||
NumChildren | kids=1 |
|
|||||||||||||||||||||||||||||||||||||||||||||||
CCMisc | 1 | cCard=1 | Represents a category of Credit card used by someone within the household. | ||||||||||||||||||||||||||||||||||||||||||||||
CCStdRetail | |||||||||||||||||||||||||||||||||||||||||||||||||
CCStdSpecialty | |||||||||||||||||||||||||||||||||||||||||||||||||
CCUpRetail | |||||||||||||||||||||||||||||||||||||||||||||||||
CCUpSpecialty | |||||||||||||||||||||||||||||||||||||||||||||||||
CCBank | |||||||||||||||||||||||||||||||||||||||||||||||||
CCOil | |||||||||||||||||||||||||||||||||||||||||||||||||
CCFinance | |||||||||||||||||||||||||||||||||||||||||||||||||
CCTravel | |||||||||||||||||||||||||||||||||||||||||||||||||
MailBuyer | 1 | mail=1 |
|
||||||||||||||||||||||||||||||||||||||||||||||
MailDonor |
|
||||||||||||||||||||||||||||||||||||||||||||||||
TargetNetWorth | 1 | worth=1 |
|
||||||||||||||||||||||||||||||||||||||||||||||
TargetHomeMarketValue | 10 | Home=1 | Home Market Value in Thousands | ||||||||||||||||||||||||||||||||||||||||||||||
Phone | 10 | phone=1 | |||||||||||||||||||||||||||||||||||||||||||||||
BirthYear1 | 4 | birth=1 | Format: YYYY | ||||||||||||||||||||||||||||||||||||||||||||||
BirthMonth1 | 2 |
|
|||||||||||||||||||||||||||||||||||||||||||||||
MemberCode | 1 | fam=1 |
|
||||||||||||||||||||||||||||||||||||||||||||||
StructureAgeYear | 4 | struct=1 | Construction year of the home Format: YYYY |
All Melissa products use result codes. LeadGen - Consumer Result codes are numeric codes, e.g. 101
. Result codes are returned as a comma-delimited string with no whitespace, e.g. 100,101
.
The following table shows the most common result codes seen while using LeadGen - Consumer.
Code | 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 have no permission to 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 | Excel and comma limited files cannot have more than 65,535 records. |
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 latitude/longitude. |