Ping Post – Calls

API 2.0 Specifications for Auto

Introduction

This document describes how to post calls auto 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/call/ping

Post URL: https://leadapi.px.com/api/call/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.

 

SellResponseURL

Our API does not provide info about the lead being sold or not with Direct Post and Call & Lead (Ping Post Call) posts.

If not empty, this is the (Postback) URL, that you specify, that will be called by the API to inform you about the final results of the posted Lead. Please consult this article in our knowledge base to setup the SellResponseURL.

There are 2 ways, depending on the SellResponseURL you specify: ‘standard’ and ‘with variables’.
In ‘standard’ we defined the lay-out. In ‘with variables’ you define the layout using our variable labels enclosed in curly brackets {}.
We will only return the variables that you specify.

standard: {SellResponseURL}TransactionId={transactionid}&Payout={payout}&Result={Result}&Reason={Reason}&Sub2ID={sub2id}
with variables: {SellResponseURL}yourvar={transactionid}&yourvar={payout}&yourvar={Result}&yourvar={Reason}&yourvar={sub2id}

Header Fields Table

KeyRequiredValue
Content-TypeYesApplication/json for JSON requests
Application/xml for XML requests
AcceptNoApplication/json for JSON response
Application/xml for XML response

Examples

Fields Table

ParameterRequired PingRequired PostAccepted ValuesDescription (data type)
ApiTokenYesYesProvided by PXGUID format
VerticalYesYesAutoString
SubIdYesYesFormat provided at startString
Sub2IdNoNo String
Sub3IdNoNo String
Sub4IdNoNo String
Sub5IdNoNo String
OfferIdYesYes String
UserAgentNoNo String
OriginalURLYesYesURL where the lead is fromString
SourceYesYesDiscuss with Acc. ManagerString
JornayaLeadIdNoNoJornaya LeadId (GUID format)See link on how to implement on form
Trustedform
NoNoTrustedForm Cert. URLSee link on how to implement on form
ClickConsentIDNoNoInteger
SessionLengthNoNoAmount of time spent by the user to fill out the form in seconds Integer
TcpaTextNoNoConsent languageString
VerifyAddressNoNoTrue / FalseString
TransactionIdNoYesRetrieve from Ping ResponseGUID format
FirstName No Yes String
LastNameNoNoString
AddressNoNoString
CityNoNoString
StateNoNo See accepted values listString
ZipCodeYesYes 5 digit zip codeString
EmailAddressNoNo Valid email addressString
PhoneNumberYesYes Valid 10 digit phone number without formatting 8887777777Integer
DayPhoneNumberNoNo Valid 10 digit phone number without formatting 8887777777Integer
IpAddressNoNo Example: 38.88.150.2Integer
ResidenceTypeNoNoDorm / Student housing / I am renting / My own house / Other / With my parentsString
YearsAtResidenceNo
No
See accepted valuesInteger
MonthsAtResidenceNoNoInteger
FirstNameNoNoString
LastNameNoNoString
BirthDateNoNoyyyy-MM-ddString
MaritalStatusNoNoDivorced / Married / Separated / Single / WidowedString
RelationshipToApplicantNoNoSee accepted valuesString
GenderNoNoMale / FemaleString
LicenseStateNoNo String
AgeLicensedNoNo >= 16Integer
LicenseStatusNoNo Current / Expired / Permit / Suspended String
LicenseEverSuspendedRevokedNoNoYes / NoBoolean
OccupationNoNoSee accepted valuesString
YearsAtEmployerNoNo Integer
EducationNoNoSee accepted valuesString
RequiresSR22FilingNoNoYes / NoBoolean
CreditRatingNoNoExcellent / Good / Some Problems / Major ProblemsString
DateNoNo yyyy-MM-ddVilolation date (String)
DescriptionNoNo See accepted valuesViolation description (String)
DateNoNo yyyy-MM-ddMajor violation date (String)
DescriptionNoNoSee accepted valuesMajor violation description (String)
StateNoNoSee accepted valuesString
DateNoNoyyyy-MM-ddString
DescriptionNoNoSee accepted valuesString
AtFaultNoNoYes / NoBoolean
DamageNoNoPeople / Property / Both / NotApplicableString
AmountNoNoInteger
DateNoNoyyyy-MM-ddString
DescriptionNoNoSee accepted valuesString
PaidAmountNoNoString
DamageNoNoPeople / Property / Both / NotApplicableString
Field1NoNoFree text fieldString
Field2NoNoFree text fieldString
Field3NoNoFree text fieldString
Field4NoNoFree text fieldString
Field5NoNoFree text fieldString
Field6NoNoFree text fieldString
Field7NoNoFree text fieldString
Field8NoNoFree text fieldString
Field9NoNoFree text fieldString
Field10NoNoFree text fieldString
VINNoNoUse either 17 position VIN (e.g. 1N6BD06T070000000 or 1N6BD06T*7*******) or Year/Make/ModelString
YearNoNoyyyyString
MakeNoNoString
ModelNoNoString
SubModelNoNoString
WeeklyCommuteDaysNoNoMax 7Integer
GarageNoNoNo Cover / Car Port / Full Garage / On StreetString
OwnershipNoNoYes / NoBoolean
PrimaryUseNoNoSee accepted valuesString
AnnualMilesNoNo2500 / 7500 / 12500 / 1500String
ComprehensiveDeductibleNoNo100 / 250 / 500 / 1000String
OneWayDistanceNoNoSee accepted valuesString
CollisionDeductibleNoNo100 / 250 / 500 / 1000String
InsuranceCompanyNoNoSee accepted valuesString
ExpirationDateNoNoyyyy-MM-ddString
InsuredSinceNoNoyyyy-MM-ddString
CoverageTypeNoNoSuperior Protection / Standard Protection /
Basic Protection / State Minimum
String
BodilyInjuryNoNoSee accepted valuesString
PropertyDamageNoNoString
InterestedInHomeInsuranceNoNoYes/NoString

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": [
        "'License Status' must not be empty.",
        "'License Status' must be one of Current, Expired, Permit, Suspended. 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>'License Status' must not be empty.</string> 
      <string>'License Status' must be one of Current, Expired, Permit, Suspended. 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.

RespondOnNoSale

When this is set to False, the API will NOT perform a callback to your SellResponseURL in case we could not sell the LEAD.

States

ALAKAZARCACOCTDEFLGA
HIIDILINIAKSKYLAMEMD
MAMIMNMSMOMTNENVNHNJ
NMNYNCNDOHOKORPARISC
SDTNTXUTVTVAWAWVWIWY

Accident.Description

  • Collided with another car
  • Hit an obstruction. Single car accident
  • Hit by another person
  • Hit while stopped
  • Hit a pedestrian
  • Other Unlisted Accident
  • Rearended by another person
  • VehicleHitProperty
  • VehicleDamagedAvoidingAccident
  • OtherVehicleHitYours
  • AtFaultAccidentNotListed
  • NotAtFaultAccidentNotListed

Claim.Description

  • Act of Nature
  • Car fire
  • Flood damage
  • Hail damage
  • Hit an animal
  • Other Unlisted Claim
  • Theft of stereo
  • Theft of vehicle
  • Towing service
  • Vandalism
  • Windshield Replacement
  • AutoCylinders

BodilyInjury

  • 25/50
  • 50/100
  • 100/300
  • 250/500
  • 300,000
  • 500,000

Occupation

  • Employeed
  • Government
  • Homemaker
  • Retired
  • Student Living w/ Parents
  • Student not Living w/ Parents
  • Unemployed
  • 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
  • Marketing
  • IT
  • Medical
  • Unknown
  • BusinessOwner
  • Student
  • SalesInside
  • SalesOutside
  • Scientist
  • OtherTechnical
  • MilitaryEnlisted
  • Architect
  • Other

OneWayDistance

  • 0
  • 1-3
  • 4-5
  • 6-9
  • 10-19
  • 20-49
  • 50+

PrimaryUse

  • Commute To/From Work
  • Commute To/From School
  • Business Individual
  • Business Corporate
  • Pleasure
  • Farm
  • Government

InsuranceCompany

  • 21st Century
  • AAA
  • AARP
  • AIG
  • AETNA
  • AFLAC
  • AIU
  • Allied
  • Allstate
  • American Alliance Insurance
  • American Family
  • American Home Assurance
  • American Insurance
  • American International Insurance
  • American International Pacific
  • American Internacional south
  • 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 Republic
  • American Savers Plan
  • American Service Insurance
  • American Skyline Insurance Company
  • American Spirit Insurance
  • American Standard Insurance
  • AmeriPlan
  • Amica
  • Answer Financial
  • Anthem
  • Arbella
  • Armed Forces Insurance
  • Associated Indemnity
  • Assurant
  • Atlanta Casualty
  • Atlantic Indemnity
  • Auto Club Insurance Company
  • AXA Advisors
  • Bankers Life and Casualty
  • Banner Life
  • Best Agency USA
  • Blue Cross / Blue Shield
  • Brooke Insurance
  • Company not listed
  • Cal Farm Insurance
  • California State Automobile Association
  • Chubb
  • Citizens
  • Clarendon
  • 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
  • eHealth Insurance Services
  • eHealthInsurance Services
  • Electric Insurance
  • Erie Insurance
  • Esurance
  • Farm Bureau/Farm Family/Rural
  • Farmers
  • FinanceBox.com
  • Fire and Casualty Insurance Co of CT
  • Fireman’s Fund
  • Foremost
  • Foresters
  • Geico
  • GMAC
  • Golden Rule Insurance
  • Golden Rule Insurancee
  • Government Employees Insurance
  • Government Empoyees Insurance
  • Guaranty National Insurance
  • Guide One Insurance
  • Hanover Lloyd’s Insurance Company
  • The Hartford
  • Health Benefits Direct
  • Health Choice One
  • Health Plus of America
  • HealthShare American
  • Humana
  • IFA Auto Insurance
  • IGF Insurance
  • Infinity Insurance
  • Insurance Insight
  • Insurance.com
  • Integon
  • John Hancock
  • Kaiser Permanente
  • Kemper Lloyds Insurance
  • Landmark American Insurance
  • Leader Insurance
  • Liberty Insurance Corp
  • Liberty Mutual
  • Liberty National
  • Liberty Northwest
  • Liberty Nothwest
  • Lumbermens Mutual
  • Maryland Casualty
  • Mass Mutual
  • Mega/Midwest
  • Mercury
  • MetLife Auto and Home
  • Metropolitan Insurance Co.
  • Mid Century Insurance
  • Mid-Continent Casualty
  • Middlesex Insurance
  • Midland National Life
  • Mutual Insurance
  • National Insurance
  • 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
  • Progressive
  • Prudential Insurance Co.
  • Reliance Insurance
  • Republic Indemnity
  • Response Insurance
  • SAFECO
  • Safeway Insurance
  • Security Insurance
  • 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 Insurance
  • Sure Health Plans
  • The Ahbe Group
  • The General
  • TICO Insurance
  • TICO Insurance1
  • TIG Countrywide Insurance
  • Titan
  • TransAmerica
  • Travelers
  • Tri-State Consumer Insurance
  • Twin City Fire Insurance
  • UniCare
  • United Insurance
  • Unitrin Direct
  • Universal Underwriters Insurance
  • US Financial
  • USA Benefits / Continental General
  • USA Benefits/Continental General
  • USAA
  • USF and G
  • Viking Insurance
  • Western and Southern Life
  • Western Mutual
  • Windsor Insurance
  • Woodlands Financial Group
  • Zurich North America
  • Currently not insured

RelationshipToApplicant

  • Self
  • Spouse
  • Child
  • Sibling
  • Parent
  • Grandparent
  • Grandchild
  • Other

YearsAtResidence

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

Violation.Description

  • Careless driving
  • Carpool lane violation
  • Child not in car seat
  • Defective Equipment
  • Defective vehicle (reduced violation)
  • Driving without a license
  • Excessive noise
  • Exhibition driving
  • Expired drivers license
  • Expired emmissions
  • Expired Registration
  • Failure to obey traffic signal
  • Failure to signal
  • Failure to stop
  • Failure to yield
  • Following too close
  • Illegal lane change
  • Illegal passing
  • Illegal turn
  • Illegal turn on red
  • Illegal U Turn
  • Inattentive driving
  • No helmet
  • No insurance
  • No seatbelt
  • Passing a school bus
  • Passing in a no-passing zone
  • Passing on shoulder
  • Ran a red light
  • Ran a stop sign
  • Reckless driving
  • Reckless endangerment
  • Wrong way on a one way
  • Other Unlisted Moving Violation
  • Driving too fast for conditions

MajorViolation.Description

  • DUI/DWAI
  • License was suspended
  • Minor in possession
  • Open container
  • Drug possession
  • DrivingWhileUnderTheInfluenceOfDrugs
  • DrivingUnderInfluenceOfAlcolholOrWhileIntoxicated
  • DrivingUnderInfluenceOfAlcolholOrWhileIntoxicated

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.

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

ParameterExplanationDescription (data type)
Target=”Lead.RejectWinner”This indicates that my system needs to treat this request as a price update and not a normal leadString
PartnerThe username used to login the account, specifically the account for this campaign (Not MasterAccount)String
PasswordThe password used to login the account, specifically the account for this campaign (Not MasterAccount) 
AffiliateIdThe publisherID provided at the start of the integrationString
PayoutThe price you sold the lead for to another buyer / the price we lost the lead toString
TransactionIdThe 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