Ping Post – Undersold

API 2.0 Specifications for Home

Introduction

This document describes how to post undersold home leads to PX using ping post. We accept POST requests in XML and JSON. Follow this article to read how ping post works in PX.

Posting URL

Before leads can be posted into PX’s live environment, tests need to be performed to ensure success. For testing purposes, PX will set the publisher campaign to a test mode during the integration. All the tests and responses on these tests can be found in the Test leads report.

Ping URL: https://leadapi.px.com/api/lead/ping

Post URL: https://leadapi.px.com/api/lead/post

Forcing a success: When 90100 zip code is used in the staging environment, the API will respond with success if the API is configured correctly.

Once a lead has been successfully posted and proper posting is confirmed by PX, leads can be posted to the live environment. To post into the live environment, PX will set the publisher campaign to the production mode after approving the successful test.

 

Header Fields Table

Key Required Value
Content-Type Yes Application/json for JSON requests
Application/xml for XML requests
Accept No Application/json for JSON response
Application/xml for XML response

Examples

Fields Table

Parameter Required Ping Required Post Accepted Values
Description (data type)
ApiToken Yes Yes Provided by PX GUID format
Vertical Yes Yes Home String
SubId Yes Yes Format provided at start String
Sub2Id
No No Discuss with Acc. Manager
String
Sub3Id
No No Discuss with Acc. Manager
String
Sub4Id
No No Discuss with Acc. Manager
String
UserAgent Yes Yes   String
OriginalUrl Yes Yes URL where the lead is from String
Source
Yes Yes Discuss with Acc. Manager
String
JornayaLeadId Yes Yes Jornaya LeadId (GUID format) See link on how to implement on form
SessionLength Yes Yes Amount of time spent by the user to fill out the form in seconds String
Trustedform
No No TrustedForm Cert. URL See link on how to implement on form
TcpaText Yes Yes Consent language String
VerifyAddress
No No True / False
See explanation on this parameter
RespondOnNoSale
No No True / False
See explanation on this parameter
SellResponseURL
No No Postback URL
See explanation on this parameter
ClickConsentID No No String
TransactionId No Yes Retrieve from Ping Response GUID format
FirstName
No Yes String
LastName
No
Yes String
Address
No
Yes String
City
No
Yes String
State
Yes
Yes See accepted values list
String
ZipCode Yes
Yes 5 digit zip code
EmailAddress
No
Yes
Valid email address
String
PhoneNumber
No
Yes
Valid 10 digit phone number without formatting 8887777777
String
DayPhoneNumber
No
No
Valid 10 digit phone number without formatting 8887777777
String
IPAddress Yes Yes Example: 38.88.150.2 String
ResidenceType Yes Yes Dorm / Student housing / I am renting / My own house / Other / String
YearsAtResidence No No See accepted values String
MonthsAtResidence Yes Yes String
BirthDate Yes Yes yyyy-mm-dd String
Gender Yes Yes Male / Female String
Occupation Yes Yes See accepted values String
MaritalStatus Yes Yes Divorced / Married / Separated / Single / Widowed String
Education Yes Yes See accepted values String
CreditRating Yes Yes Excellent / Good / Some Problems / Major Problems String
YearsAtPreviousResidence No No String
Field1 No No Free text field String
Field2 No No Free text field String
Field3 No No Free text field String
Field4 No No Free text field String
Field5 No No Free text field String
Field6 No No Free text field String
Field7 No No Free text field String
Field8 No No Free text field String
Field9 No No Free text field String
Field10 No No Free text field String
PropertyOwned Yes Yes Own / Rent String
MunicipalLocation Yes Yes Inside city limits / Outside city limits String
PropertyType Yes Yes See accepted values String
IsLivingHere Yes Yes Yes / No String
Garage Yes Yes See accepted values String
Foundation Yes Yes See accepted values String
HomeSecurity Yes Yes None / Monitored / Unmonitored / Unsure String
YearBuilt Yes Yes YYYY in a range between 1600 and 2100 String
YearUpgraded Yes Yes YYYY in a range between 1900 and 2100 String
Stories Yes Yes One story / Bi level / Two story / Tri-level / Other String
Bedrooms Yes Yes String
Bathrooms Yes Yes See accepted values String
ConstructionType Yes Yes Mostly wood frame / Mostly brick / Stucco / Other String
RoofType Yes Yes Asphalt shingle / Wood shingle / Tile / Concrete / Other / Blank String
RoofAge Yes Yes 1 – 5 years / 6 – 10 years / 11+ years String
SquareFootage Yes Yes String
DwellingValue Yes Yes String
Deductible Yes Yes 250 / 500 / 1,000 / 2,000 String
Dog Yes Yes Yes / No String
DangerousDogBreed Yes Yes Yes / No String
PrimaryHeating Yes Yes See accepted values String
WiringType Yes Yes Copper / Aluminum / Knob and tube String
Occupancy Yes Yes Primary residence /
Seasonal residence /
Vacation /
Tentant occupied
String
NewlyPurchased Yes Yes Yes / No String
ConstructionClass Yes Yes Standard /
Luxury /
Economical /
Manufactured
String
PanelType Yes Yes Circuit breaker / Fuse box / Other / Unknown String
ProximityWater Yes Yes Not applicable / Within 1000 feet / Within 1 mile / Within 5 miles String
ExteriorWalls Yes Yes See accepted values String
FireAlarm Yes Yes None / Monitored / Unmonitored / Unsure String
Deadbolts Yes Yes Yes / No String
FireExtinguisher Yes Yes Yes / No String
SwimmingPool Yes Yes Yes / No String
Trampoline Yes Yes Yes / No String
FloodPlain Yes Yes Yes / No String
CoveredDeckOrPatio Yes Yes Yes / No String
Fireplace Yes Yes Yes / No String
NearFireStation Yes Yes Yes / No String
FireHydrant Yes Yes Yes / No String
IndoorSprinklers Yes Yes Yes / No String
CopperWaterPipes Yes Yes Yes / No String
BrushHazard Yes Yes Yes / No String
CentralAirConditioning Yes Yes Yes / No String
Sauna Yes Yes Yes / No String
HotTub Yes Yes Yes / No String
WoodburningStove Yes Yes Yes / No String
SumpPump Yes Yes Yes / No String
SwimmingPool Yes Yes Yes / No String
SwimmingPoolIsFenced Yes Yes Yes / No String
SmokerInHousehold Yes Yes Yes / No String
Address1 Yes if property address is different
Yes if property address is different String
Address2 Yes if property address is different Yes if property address is different String
City Yes if property address is different Yes if property address is different String
State Yes if property address is different Yes if property address is different String
ZipCode Yes if property address is different Yes if property address is different String
ClaimsOrLossesPast5Years Yes
Yes String
Date Yes when Claim Yes when Claim String
Description Yes when Claim Yes when Claim Weather / Theft / Vandalism / Fire / Water / Other String
PaidAmount No No String
InsuranceCompany Yes, if currently insured Yes, if currently insured See accepted values String
ExpirationDate Yes, if currently insured Yes, if currently insured yyyy-MM-dd String
InsuredSince Yes, if currently insured Yes, if currently insured yyyy-MM-dd String
InterestedMortgageProtection Yes Yes Yes / No String
PersonalLiabilityCoverage Yes Yes 100,000 /
300,000 /
1,000,000
String
CoverageType Yes Yes Full package /
Fire and liability /
Liability only
String
CoverageAmount Yes Yes String
OpenSlots Yes No String
See explanation on undersold
Exclude Yes No String
See explanation on undersold
Name Yes, if Hash is not used No Leg name String
See explanation on undersold
Hash Yes, if Name is not used No SHA-1 Hashed leg name String
See explanation on undersold

Responses

PX responds with accurate feedback on how to update your request for it to be accepted by the API.


Success – Ping


{
"TransactionId": "D0447C7B-452B-4F2A-9D7B-F3F72848EEE9",
"Success": true,
"Payout": 8.5,
"Message": null,
"Errors": null,
"Sold": null,
"Environment": "Testing"
}


<?xml version="1.0" encoding="UTF-8"?>
<Result xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<TransactionId>ce34e151-6d00-488d-a465-3fa3cebe7ff9</TransactionId>
	<Success>true</Success>
	<Payout>8.50</Payout>
	<Sold xsi:nil="true" />
	<Environment>Testing</Environment>
</Result>

Success – Post


{
"TransactionId": "D0447C7B-452B-4F2A-9D7B-F3F72848EEE9",
"Success": true,
"Payout": 8.50,
"Message": null,
"Errors": null,
"Sold": null,
"RedirectUrl": null,
"BuyerRawResponse": null,
"Environment": "Testing",
"Legs": null
}


<?xml version="1.0" encoding="UTF-8"?>
<Result xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<TransactionId>143E2B7A-73A3-41F4-87DA-DB8E136606B0</TransactionId>
	<Success>true</Success>
	<Payout>12.34</Payout>
	<Sold xsi:nil="true" />
	<Environment>Testing</Environment>
</Result>


Failure


{
    "TransactionId": "49CE4DB7-775B-405B-BBBD-B23FB003073A",
    "Success": false,
    "Payout": null,
    "Message": "BadRequest",
    "Errors": [
        "'Roof Type' must not be empty.",
        "'Roof Type' must be one of Asphalt shingle, Wood shingle, Tile, Concrete, Other, Blank. Your value is ''."
    ]
    "Sold": null,
    "RedirectUrl": null,
    "BuyerRawResponse": null,
    "Environment": null,
    "Legs": null
}


<?xml version="1.0" encoding="UTF-8"?>
<Result xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <TransactionId>49CE4DB7-775B-405B-BBBD-B23FB003073A</TransactionId>
   <Success>false</Success>
   <Payout xsi:nil="true" />
   <Message>BadRequest</Message>
   <Errors>
      <string>'Roof Type' must not be empty.</string>
      <string>'Roof Type' must be one of Asphalt shingle, Wood shingle, Tile, Concrete, Other, Blank. Your value is ''.</string>
   </Errors>
   <Sold xsi:nil="true" />
</Result>

The responses from our API shows if a Ping/Post has been successful or not, and if the lead wasn’t successful, why the Ping/Post has been rejected.

  • The “Message” parameter gives a general error code.
  • The “Errors” parameter gives the specific cause of the error, such as an invalid or missing value for a specific field.

If the Ping/Post was unsuccessful, the Payout and Sold field will show a “Null” value.

States

AL AK AZ AR CA CO CT DE FL GA
HI ID IL IN IA KS KY LA ME MD
MA MI MN MS MO MT NE NV NH NJ
NM NY NC ND OH OK OR PA RI SC
SD TN TX UT VT VA WA WV WI WY

YearsAtResidence

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 15
  • 20
  • 25
  • 30

Occupation

  • Employeed
  • Government
  • Homemaker
  • Retired
  • Student Living w/ Parents
  • Student not Living w/ Parents
  • Unemployed
  • Military
  • Retail
  • Sales
  • Marketing
  • IT
  • Medical
  • Unknown
  • BusinessOwner
  • Student
  • SalesInside
  • SalesOutside
  • Scientist
  • OtherTechnical
  • MilitaryEnlisted
  • Architect
  • Other

Education

  • Bachelors Degree
  • Doctorate Degree
  • High school diploma
  • Masters Degree
  • Other
  • None
  • Some College
  • Associate Degree

PropertyType

  • Single family
  • Apartment
  • Duplex
  • Condo
  • Townhome
  • Mobile home

Garage

  • Attached 1 car
  • Attached 2 car
  • Attached 3 car
  • Attached carpool
  • Detached 1 car
  • Detached 2 car
  • Detached 3 car
  • Detached carpool
  • No garage
  • Other

Foundation

  • Basement fully furnished
  • Basement half furnished
  • Basement unfurnished
  • Crawl space
  • Slab
  • Other

Bathrooms

  • 1
  • 1.5
  • 2
  • 2.5
  • 3
  • 3.5
  • 4
  • 4+

PrimaryHeating

  • Gas (Forced air)
  • Hot water / Steam radiator
  • Oil / Coal / Kerosene
  • Propane
  • Stove

ExteriorWalls

  • Brick
  • Wood frame
  • Stone
  • Aluminum siding
  • Vinyl siding
  • Veneer
  • Cinder block
  • Stucco
  • Other

InsuranceCompany

  • 21st Century
  • AAA
  • AARP
  • AIG
  • Access Insurance
  • AETNA
  • AFLAC
  • AIU
  • Alfa Insurance
  • All Risk
  • Allianz
  • Allied
  • Allstate
  • American Alliance Insurance
  • American Family
  • American Home Assurance
  • American Insurance
  • American International Insurance
  • American International Pacific
  • American Internacional south
  • AMS User Group
  • American International South
  • American Direct Business Insurance
  • American Deposit Insurance
  • American Casualty
  • American Manufacturers
  • American Empire Insurance
  • American Financial
  • American Health Underwriters
  • American Mayflower Insurance
  • American Motorists Insurance
  • American National
  • American Premier Insurance
  • American Protection Insurance
  • American Automobile Insurance
  • American Reliable
  • American Republic
  • American Savers Plan
  • American Service Insurance
  • American Skyline Insurance Company
  • American Spirit Insurance
  • American Standard Insurance
  • AmeriPlan
  • Ameriprise
  • Amica
  • Answer Financial
  • Anthem
  • Arbella
  • Armed Forces Insurance
  • Associated Indemnity
  • Assurant
  • Atlanta Casualty
  • Atlantic Indemnity
  • Atlantis
  • Auto Club Insurance Company
  • AXA Advisors
  • Auto Owners
  • Bankers Life and Casualty
  • Banner Life
  • Best Agency USA
  • Blue Cross / Blue Shield
  • Brooke Insurance
  • Commonwealth
  • Company not listed
  • Cal Farm Insurance
  • California State Automobile Association
  • Chubb
  • Cigna
  • Citizens
  • Clarendon
  • Clarendon National Insurance
  • CNA
  • Colonial Insurance
  • Comparison Market
  • Continental Insurance
  • Cotton States
  • Country Insurance and Financial Services
  • County Insurance and Financial Services
  • Countrywide
  • Countywide
  • CSE Insurance Group
  • Dairyland Insurance
  • eFinancial
  • eHealth Insurance Sercies
  • eHealthInsurance Services
  • Electric Insurance
  • Elephant
  • Equitable Life & Casualty Insurance
  • Erie Insurance
  • Esurance
  • Farm Bureau/Farm Family/Rural
  • Farmers
  • FinanceBox.com
  • Fire and Casualty Insurance Co of CT
  • Farmers Union
  • Fidelity Insurance Company
  • Fidelity National
  • Fireman’s Fund
  • Foremost
  • Foresters
  • Geico
  • AMSUserGroup
  • Garden State Life Insurance Company
  • GMAC
  • Golden Rule Insurance
  • Government Employees Insurance
  • Government Empoyees Insurance
  • Grange
  • Great American
  • Great West
  • Guaranty National Insurance
  • Guide One Insurance
  • Hanover Lloyd’s Insurance Company
  • The Hartford
  • Guardian
  • Guideone
  • Hartford AARP
  • Health Benefits Direct
  • Health Care Solutions
  • Health Choice One
  • Health Net
  • Health Plus of AmericaHealthMarkets
  • HealthShare American
  • Horace Mann
  • Horace Mann Insurance
  • Humana
  • IFA Auto Insurance
  • IGF Insurance
  • IDS
  • IHIAA
  • Infinity Insurance
  • Insurance Insight
  • Infinity National Insurance
  • Infinity Select Insurance
  • Insphere Insurance Solutions
  • Insurance Shopper, Inc
  • Insurance.com
  • Integon
  • Iroquois Group
  • John Hancock
  • Kaiser Permanente
  • Kemper Lloyds Insurance
  • Landmark American Insurance
  • Leader Insurance
  • Leader Preferred Insurance
  • Leader Specialty Insurance
  • Liberty Insurance Corp
  • Liberty Mutual
  • Liberty National
  • Liberty Northwest
  • Liberty Nothwest
  • Lincoln Benefit Life
  • Lumbermens Mutual
  • Maryland Casualty
  • Mass Mutual
  • Mega/Midwest
  • Matrix Direct
  • Mercury
  • MetLife Auto and Home
  • Metropolitan Insurance Co.
  • Mid Century Insurance
  • Continent Casualty
  • Middlesex Insurance
  • Midland National Life
  • Mutual Insurance
  • National Insurance
  • Miller Mutual
  • Modern Woodmen of America
  • Mutual of New York
  • Mutual Of Omaha
  • National Ben Franklin Insurance
  • National Casualty
  • Continental Casualty
  • Continental Divide Insurance
  • National Continental Insurance
  • National Fire Insurance
  • National Health Insurance
  • National Indemnity
  • National Union Fire Insurance
  • Nationwide
  • New England Financial
  • New York Life Insurance
  • Northwestern Mutual Life
  • Nortwestern Mutual Life
  • Norhwestern Pacific Indemnity
  • Northwestern Pacific Indemnity
  • Omni Insurance
  • Orion Insurance
  • Pacific Insurance
  • Pafco General Insurance
  • Patriot General Insurance
  • Peak Property and Casualty Insurance
  • PEMCO Insurance
  • Physicians
  • Penn Mutual
  • Pennsylvania life
  • Premier
  • Primerica
  • Principal Financial
  • Progressive
  • Protective Life
  • Prudential Insurance Co.
  • RBC Liberty
  • Reliance Insurance
  • Republic Indemnity
  • Response Insurance
  • SAFECO
  • Safeway Insurance
  • Security Insurance
  • Senior Market Sales
  • Sentinel Insurance
  • Sentry
  • Shelter
  • St. Paul Insurance
  • Standard File Insurance Company
  • Standard Fire Insurance Company
  • State and County Mutual Fire Insurance
  • State Farm
  • State National
  • Superior American Insurance
  • Superior Guaranty Insurance
  • Superior Insurance
  • Sure Health Plans
  • The Ahbe Group
  • The General
  • TICO Insurance
  • TICO Insurance1
  • TIG Countrywide Insurance
  • Titan
  • TransAmerica
  • Travelers
  • State Consumer Insurance
  • Twin City Fire Insurance
  • UniCare
  • United Insurance
  • United American/Farm and Ranch
  • United Life Group
  • United Pacific Insurance
  • United Security
  • United Services Automobile Association
  • Unitrin Direct
  • Universal Underwriters Insurance
  • US Financial
  • US Health Group
  • USA Benefits / Continental General
  • USA Benefits/Continental General
  • USAA
  • USF and G
  • Viking Insurance
  • Western and Southern Life
  • Western Mutual
  • William Penn
  • Windsor Insurance
  • Woodlands Financial Group
  • Zurich North America
  • Currently not insured

Implementing Jornaya LeadId

To start generating the Jornaya LeadId token on your leads from your page, a script needs to be added to your website. Follow the guidance on how to implement this script.

Implementing TrustedForm

To start generating the TrustedForm CertURL on your leads from your page, a script needs to be added to your website. Follow the guidance on how to implement this script.

Undersold

When leads are being sold to PX that have already been sold to another lead buyer, the undersold method should be used.
Add the following parameters to the request body:

  • OpenSlots – indicates the number of times this lead can still be sold;
  • Name / Hash – indicates to which buyer this lead has already been sold. These buyers won’t be taken into account in the bidding process

Lost bids

This request is initiated after the ping response is received and instructs our API what price the lead has been sold when our bid was lower. This helps us and our lead buyers to optimize the bids.
Lost bids Post URL: https://secureopenapi.px.com/px

Code examples


Post
<?xml version="1.0" encoding="utf-8"?>
<LeadData Target="Lead.RejectWinner" Partner="{Username}" Password="{password}" AffiliateId="{PublisherID}">
    <Payout>{payout}</Payout>
    <TransactionId>{TransactionId}</TransactionId>
</LeadData>


Post
{
    "type": "jsonwsp/request", 
    "version": "1.0", 
    "methodname": "Lead.RejectWinner", 
    "LeadData":
    {
        "Target" : "Lead.RejectWinner",
        "Partner" : "{Username}",
        "Password" : "{Password}",
        "AffiliateId" : "{PublisherID}",
        "Payout" : "{Payout}",
        "TransactionId" : "{TransactionId}"
    }
}

In addition, HTTP format can be used:

Post
https://secureopenapi.px.com/px?Command=HTTPPost&Target=Lead.RejectWinner&Partner={Username}&Password={Password}&AffiliateId={PublisherID}&Payout={Payout}&TransactiondId={TransactionId}

 

Fields table

Parameter Explanation Description (data type)
Target=”Lead.RejectWinner” This indicates that my system needs to treat this request as a price update and not a normal lead String
Partner The username used to login the account, specifically the account for this campaign (Not MasterAccount) String
Password The password used to login the account, specifically the account for this campaign (Not MasterAccount)  
AffiliateId The publisherID provided at the start of the integration String
Payout The price you sold the lead for to another buyer / the price we lost the lead to String
TransactionId The same as you would on the post. We return a TransactionId on the ping and you return this here to match ping with the lost bid. Should you have problems retrieving our TransactionId from the response it is also possible to parse your own unique id on the ping in the TransactionId parameter. String