Ping Post Calls

API 2.0 Specifications for ACA

Introduction

This document describes how to post calls aca 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.

 

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 Values
Description (data type)
ApiTokenYesYesProvided by PXGUID format
VerticalYesYesacaString
SubIdYesYesFormat provided at startString
Sub2IdNoNo String
Sub3IdNoNo String
Sub4IdNoNo String
Sub5IdNoNo String
OfferId
YesYes String
UserAgentNoNo String
OriginalURLYesYesURL where the lead is fromString
SourceNoNoDiscuss 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
FirstNameNoNo String
LastNameNoNoString
AddressNoNoString
CityNoNoString
StateNoNo See accepted values listString
ZipCodeNoNo 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 / OtherInteger
YearsAtResidenceNoNo See accepted valuesInteger
MonthsAtResidenceNoNo Integer
BirthDateNoNoyyyy-mm-ddString
GenderNoNoMale / FemaleString
MaritalStatusNoNoDivorced / Married / Separated / Single / WidowedString
RelationshipToApplicantNoNoSee accepted valuesString
DeniedInsuranceNoNoYes / NoString
USResidenceNoNoTrue / FalseBoolean
Height_FTNoNoInteger
Height_InchNoNoInteger
WeightNoNoWeight in poundsInteger
StudentNoNoTrue / FalseBoolean
OccupationNoNoSee accepted valuesString
EducationNoNoSee accepted valuesString
HouseHoldIncomeNoNoSee accepted valuesString
HouseHoldSizeNoNoInteger
HighCholesterol
NoNoYes / NoString
PulmonaryDisease
NoNoYes / NoString
VascularDisease
NoNoYes / NoString
AIDSHIV
NoNoYes / NoString
KidneyDisease
NoNoYes / NoString
Asthma
NoNoYes / NoString
Cancer
NoNoYes / NoString
Depression
NoNoYes / NoString
Diabetes
NoNoYes / NoString
HeartDisease
NoNoYes / NoString
LiverDisease
NoNoYes / NoString
HighBloodPressure
NoNoYes / NoString
MentalIllness
NoNoYes / NoString
StrokeNoNoYes / NoString
Alzheimer
NoNoYes / NoString
AlcoholAbuse
NoNoYes / NoString
HospitalizedNoNoYes / NoString
PregnantNoNoYes / NoString
SmokerNoNoYes / NoString
AlcoholabstainNoNoYes / NoString
CommentNoNoFree text fieldString
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
CoverageTypeNoNoSee accepted valuesString
InsuranceCompanyNoNoSee accepted valuesString
ExpirationDateNoNoyyyy-mm-ddString
InsuredSinceNoNoyyyy-mm-ddString

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": [
        
    ]
    "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>
      
   </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

ALAKAZARCACOCTDEFLGA
HIIDILINIAKSKYLAMEMD
MAMIMNMSMOMTNENVNHNJ
NMNYNCNDOHOKORPARISC
SDTNTXUTVTVAWAWVWIWY

YearsAtResidence

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

RelationshipToApplicant

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

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

HouseHoldIncome

  • Below $30,000
  • $30,000 – $44,999
  • $45,000 – $59,999
  • $60,000 – $74,999
  • $75,000 – $89,999
  • $90,000 – $104,999
  • $105,000 – $119,999
  • Over $120,000

CoverageType

  • COBRA
  • Dental Only
  • Discount Plan
  • Individual Family
  • Maternity Only
  • Medicaid
  • Medicare Supplement
  • Prescription Only
  • Short Term
  • Vision Only

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