This document describes how to post exclusive pet insurance leads to PX using direct post. We accept POST requests in XML, JSON and HTTP.
Testing
Before leads can be posted into PX’s live environment, tests need to be performed to ensure success. For testing purposes, credentials will be provided by PX.
Once a lead has been successfully posted and proper posting is confirmed by PX, posting in live can begin. To post into the live environment, PX will provide you with a new set of API credentials.
Post
Command=HTTPPost&Target=Lead.Insert&PartnerToken=xxxxx&RequestTime=2012-12-31 14:58:36&UserAgent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36&
OriginalURL=http://www.exampleURL.com&SessionLength=7&TCPAText=By clicking Get My Quotes, I authorize security companies, their dealers and partner companies to contact me about security offers by phone calls and text messages to the number I provided. I authorize that these marketing communications may be delivered to me using an automatic telephone dialing system or by prerecorded message. I understand that my consent is not a condition of purchase&
AffiliateData.Id=72&AffiliateData.OfferId=71&AffiliateData.SubId=CD1332&AffiliateData.Sub2Id=x25&AffiliateData.Source=All&AffiliateData.VerifyAddress=false&
AffiliateData.RespondOnNoSale=true&AffiliateData.SellResponseURL=&AffiliateData.LeadId=&AffiliateData.TrustedForm=&AffiliateData.ClickConsentID=&ContactData.FirstName=John&
ContactData.LastName=Doe&ContactData.Address=1 Little West 12th&ContactData.City=New York&ContactData.State=AL&
ContactData.ZIPCode=10014&ContactData.EmailAddress=test@testemail.com&ContactData.PhoneNumber=6467171795&ContactData.DayPhoneNumber=6467171795&
ContactData.IPAddress=255.255.255.255&QuoteRequest.QuoteType=Pet&QuoteRequest.Owners.Owner.FirstName=John&QuoteRequest.Owners.Owner.LastName=Dummy&
QuoteRequest.Owners.Owner.BirthDate=1980-07-14&QuoteRequest.Owners.Owner.Gender=Male&QuoteRequest.Pets.Pet.Species=Dog&
QuoteRequest.Pets.Pet.SpayedOrNeutered=No&QuoteRequest.Pets.Pet.PetName=Bello&
QuoteRequest.Pets.Pet.DogBreed=Affenpinscher&QuoteRequest.Pets.Pet.DogBirthDate=1980-14-07&
QuoteRequest.Pets.Pet.DogGender=Male&QuoteRequest.Pets.Pet.DogConditions=No&
QuoteRequest.Pets.Pet.CatBreed=Abyssinian&QuoteRequest.Pets.Pet.CatBirthDate=1980-07-14&
QuoteRequest.Pets.Pet.CatGender=Male&QuoteRequest.Pets.Pet.CatConditions=No
Post<?xml version="1.0" encoding="utf-8"?>
<LeadData Target="Lead.Insert" Partner="xxxx" Password="xxxx" RequestTime="2012-12-31 14:58:36" UserAgent="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36" OriginalURL="http://www.exampleURL.com" SessionLength="7" TCPAText="By clicking Get My Quotes, I authorize security companies, their dealers and partner companies to contact me about security offers by phone calls and text messages to the number I provided. I authorize that these marketing communications may be delivered to me using an automatic telephone dialing system or by prerecorded message. I understand that my consent is not a condition of purchase" >
<!-- Your own AffiliateData all values are mandatory except the last 3--> <!-- LeadId can be empty or omitted when not used -->
<AffiliateData Id="72" OfferId="71" SubId="CD1332" Sub2Id="x25" Source="All" VerifyAddress="false" RespondOnNoSale="true" SellResponseURL="" LeadId="" TrustedForm="" ClickConsentID="" />
<ContactData>
<FirstName>John</FirstName>
<LastName>Doe</LastName>
<Address>1 Little West 12th</Address>
<City>New York</City>
<State>AL</State>
<ZIPCode>10014</ZIPCode>
<EmailAddress>test@testemail.com</EmailAddress>
<PhoneNumber>6467171795</PhoneNumber>
<DayPhoneNumber>6467171795</DayPhoneNumber>
<IPAddress>255.255.255.255</IPAddress>
</ContactData>
<QuoteRequest QuoteType="Pet">
<Owners>
<Owner>
<FirstName>John</FirstName>
<LastName>Dummy</LastName>
<BirthDate>1980-07-14</BirthDate>
<Gender>Male</Gender>
</Owner>
</Owners>
<Pets>
<Pet>
<Species>Dog</Species>
<SpayedOrNeutered>No</SpayedOrNeutered>
<PetName>Bello</PetName>
<DogBreed>Affenpinscher</DogBreed>
<DogBirthDate>1980-14-07</DogBirthDate>
<DogGender>Male</DogGender>
<DogConditions>No</DogConditions>
<CatBreed>Abyssinian</CatBreed>
<CatBirthDate>1980-07-14</CatBirthDate>
<CatGender>Male</CatGender>
<CatConditions>No</CatConditions>
</Pet>
</Pets>
</QuoteRequest>
</LeadData>
Post{
"type": "jsonwsp/request",
"version": "1.0",
"methodname": "Lead.Insert",
"LeadData": {
"Target": "Lead.Insert",
"Partner": "xxxx",
"Password": "xxxx",
"RequestTime": "2012-12-31 14:58:36",
"UserAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36",
"OriginalURL": "http://www.exampleURL.com",
"SessionLength": "7",
"TCPAText": "By clicking Get My Quotes, I authorize security companies, their dealers and partner companies to contact me about security offers by phone calls and text messages to the number I provided. I authorize that these marketing communications may be delivered to me using an automatic telephone dialing system or by prerecorded message. I understand that my consent is not a condition of purchase",
"AffiliateData": {
"Id": "72",
"OfferId": "71",
"SubId": "CD1332",
"Sub2Id": "x25",
"Source": "All",
"VerifyAddress": "false",
"RespondOnNoSale": "true",
"SellResponseURL": "",
"LeadId": "",
"TrustedForm": "",
"ClickConsentID": ""
},
"ContactData": {
"FirstName": "John",
"LastName": "Doe",
"Address": "1 Little West 12th",
"City": "New York",
"State": "AL",
"ZIPCode": "10014",
"EmailAddress": "test@testemail.com",
"PhoneNumber": "6467171795",
"DayPhoneNumber": "6467171795",
"IPAddress": "255.255.255.255"
},
"QuoteRequest": {
"QuoteType": "Pet",
"Owners": {
"Owner": {
"FirstName": "John",
"LastName": "Dummy",
"BirthDate": "1980-07-14",
"Gender": "Male"
}
},
"Pets": {
"Pet": {
"Species": "Dog",
"SpayedOrNeutered": "No",
"PetName": "Bello",
"DogBreed": "Affenpinscher",
"DogBirthDate": "1980-14-07",
"DogGender": "Male",
"DogConditions": "No",
"CatBreed": "Abyssinian",
"CatBirthDate": "1980-07-14",
"CatGender": "Male",
"CatConditions": "No"
}
}
}
}
}
XML Fields TableJSON Fields TableHTTP Fields Table
Parameter
Required
Accepted Values
Description (data type)
Target
Yes
“Lead.Insert”
String
PartnerToken
Yes
Provided by PX
GUID format
RequestTime
No
yyyy-MM-dd HH:mm:ss
Exact time when lead is generated
UserAgent
No
String
OriginalURL
Yes
URL
URL where the lead is generated
SessionLength
Yes
Amount of time spent by user to fill out form in seconds (Integer)
{
"Result": "BaeNOK",
"Reason": "Mandatory parameter is missing."
}
The “Reason” parameter gives a general error code.
The “Param” parameter gives the field that causes the error.
The “ExtraInfo” contains extra information such as the section.
The table below shows all the failure reasons and the way on how to fix them:
Reason
Explanation for failure
If not collected, hard code to
Mandatory parameter is missing
You’re missing a required field
See upper table to find out what is mandatory
Value is not in specified list
You’re passing over a not accepted value
See upper table to view the accepted values
Duplicate Entry
You’re posting a lead with the same ZIPCode within 600 seconds
N/A
Partner login failed, API access denied.
Your credentials couldn’t be verified by the API
Check the Partner and Password or URL encode any % signs (this may cause the API verification to break)
Unable to Monetize
Your lead couldn’t be sold to any of the lead buyers
Check with your account manager to improve monetization on your leads
VerifyAddress
When VerifyAddress is True, any verification errors that occur during Address verification will be passed back to you and the LeadInsert will NOT succeed. The API will remember the Address data of your request, so when the Lead is reissued to the API, updated parts will be merged with the initial data and processing continues without further address verification. If no other errors are encountered, the Lead will now pass.
This functionality creates the possibility for your users to edit input errors. The following verification errors could be returned:
Address information provided is incomplete or invalid
Address information is incomplete: please add unit or apt number
Phone number provided is invalid
Contact information provided is invalid
Should multiple errors be encountered, they will be reported separated by a ‘|’ character.
E.G. Address information provided is incomplete or invalid|Phone number provided seems to be invalid.
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.
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}
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
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.