Pre-ping allows you to send partial lead data to an Advertiser’s API before submitting the full lead information. Based on the Advertiser’s response, you can define rules to determine whether or not to proceed with sending the complete lead data.
Pre-ping is commonly used in specific verticals, particularly in the United States. It’s typically implemented by direct Advertisers using their own CRM systems or platforms like Swaarm. It’s also frequently used by aggregators that operate lead marketplaces.
The Pre-ping process enables you to share non-sensitive, partial data with the Advertiser so they can decide whether they're interested in purchasing the lead. If they are, they will return a success response and then you can then submit the full lead data to complete the transaction.
Setting up Pre-ping for Outgoing Leads
To setup Pre-ping for outgoing Leads, follow the steps below:
Go to OutGoing Leads > Endpoints
Click on +Create Endpoint or Edit the already created Endpoint
A widget will open up, where you have to fill following Pre-Ping related fields:
Pre-ping Method: select the appropriate HTTP Method for the API based on the specific requirements; options include GET, POST, and PUT
Pre-ping URL: Enter the url provided by the Advertiser to send the pre-ping details
Pre-ping body: Add the pre-ping request body. This is typically partial Lead data
Expected Pre-ping Status Code: This is the status code for success which indicates the lead can be forwarded to the advertiser
Expected Pre-ping Response Body: This the sample response body which can indicate success so that the lead can be forwarded
Add all the other relevant endpoint details. You can refer to the detail endpoint creation doc here.
Save
Setting up Pre-ping for Incoming Leads
Publishers can send Pre-ping requests to you and you can forward these pre-ping requests to Advertisers in realtime and based on the response from the Advertiser, the response is given to the Publisher.
Publishers can send Pre-Ping request to the following using the POST method:
https://track.INSERT_DOMAIN_HERE.swaarm-clients.com/preping
The following fields are available for the json request for Pre-ping:
{
"details": {
"email": "robert.jones1061843@outlook.com",
"firstName": "Robert",
"lastName": "Jones",
"fullName": "Robert Jones",
"phoneNumber": "+12694272403",
"gender": "Prefer not to say",
"dateOfBirth": "1991-07-21",
"username": "robert909",
"password": "Passnlt3hqii",
"address": "2223 Oak Avenue, New York",
"freeParameters": {
"param1": "p1_2s68ok5u",
"param2": "p2_er8b04pm",
"param3": "p3_bksi2h00",
"param4": "p4_ifwrlneg",
"param5": "p5_1pg1zncv",
"param6": "p6_cjeh70as",
"param7": "p7_qswnm6jf",
"param8": "p8_eueiv3i1",
"param9": "p9_9nk15cgo",
"param10": "p10_yzkqbp3k",
"param11": "p11_7hqf6no5",
"param12": "p12_naubfvbr",
"param13": "p13_8958vnp6",
"param14": "p14_gga0qfu8",
"param15": "p15_aqr7j7lk",
"param16": "p16_jjvvmo4u",
"param17": "p17_wkq414v7",
"param18": "p18_xjkdmvce",
"param19": "p19_z94iwnzs"
}
},
"offer": {
"id": "123"
},
"publisher": {
"id": "456",
"subId": "sub_6866",
"subSubId": "subsub_474",
"site": "twitter",
"app": "Web App"
}
}
The data needs to be sent with Content-Type: application/json header using the HTTP POST method.
Here is a CURL example:
curl 'https://INSERT_TRACKING_DOMAIN_HERE/leads' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \
--data-raw $'{"details":{"email":"robert.jones1061843@outlook.com","firstName":"Robert","lastName":"Jones","fullName":"Robert Jones","phoneNumber":"+12694272403","gender":"Prefer not to say","dateOfBirth":"1991-07-21","username":"robert909","password":"Passnlt3hqii\u0021","address":"2223 Oak Avenue, New York","freeParameters":{"param1":"p1_2s68ok5u","param2":"p2_er8b04pm","param3":"p3_bksi2h00","param4":"p4_ifwrlneg","param5":"p5_1pg1zncv","param6":"p6_cjeh70as","param7":"p7_qswnm6jf","param8":"p8_eueiv3i1","param9":"p9_9nk15cgo","param10":"p10_yzkqbp3k","param11":"p11_7hqf6no5","param12":"p12_naubfvbr","param13":"p13_8958vnp6","param14":"p14_gga0qfu8","param15":"p15_aqr7j7lk","param16":"p16_jjvvmo4u","param17":"p17_wkq414v7","param18":"p18_xjkdmvce","param19":"p19_z94iwnzs"}},"offer":{"id":"21836"},"publisher":{"id":"20865","subId":"sub_6866","subSubId":"subsub_474","site":"twitter","app":"Web App"}}'
The only mandatory fields for the Pre-ping request are the offer id and the publisher id. As for the other fields, typically only partial lead data is sent in the Pre-ping request just enough for the Advertiser to make the decision of getting the Lead or now.
Based on the response from the Advertiser, the Publisher will get one of the below responses:
{
"status": "ACCEPTED",
}
for the Leads that will be accepted i.e. the publisher can then send the full lead information on the lead endpoint or
{
"status": "REJECTED",
}
for leads that will not be accepted by the Advertiser.