Posting Instructions:
Fields are to be posted the the URL specified below. A successful response will be our unique lead number assigned to that lead. A failed reponse will list the error that occurred, please correct and re-post.
Pay 4 Performance Marketing will provide you with the provider_id field. You will provide us with the mover_id field, which is a unique value you have assigned to identify our mutal client.
Posting URL:
https://www.p4pmarketing.com/lead_provider/new_lead.php
Fields and Values:
<?php
// use this for live site (https)
$strServer = ‘https://www.p4pmarketing.com/lead_provider/new_lead.php’;
// use this for dev site
$strServer = ‘https://dev.p4pmarketing.com/lead_provider/new_lead.php’;
$arrPostVars = array(
‘provider_id’ => ‘1-0’,
‘mover_id’ => ‘EXAMPLEPOST’,
‘lead_name_first’ => ‘DO NOT’,
‘lead_name_last’ => ‘CALL!!!!!’,
‘lead_provider_ref’ => ‘YourInternalID’.time(),
‘lead_phone1’ => ‘905’,
‘lead_phone2’ => sprintf(“%003d”, rand(0,999)),
‘lead_phone3’ => sprintf(“%0004d”, rand(0,9999)),
‘lead_phone_ext’ => ‘111’,
‘lead_email’ => ‘p4ptestlead’.time().’@p4pmarketing.com’,
‘move_date_year’ => date(‘Y’),
‘move_date_month’ => date(‘m’, time() + rand(0,10000000)),
‘move_date_day’ => date(‘d’, time() + rand(0,1000000)),
‘lead_from_add1’ => ‘123 Test Ave.’,
‘lead_from_add2’ => ‘Appt 234’,
‘lead_from_postal’ => ‘90210’,
‘lead_from_city’ => ‘Beverley Hills’,
‘lead_from_state’ => ‘CA’,
‘lead_from_add1’ => ‘454 Test Ave.’,
‘lead_from_add2’ => ‘Appt 555’,
‘lead_to_postal’ => ‘10001’,
‘lead_to_state’ => ‘NY’,
‘lead_to_city’ => ‘New York’,
‘lead_num_rooms’ => 10,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $strServer);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $arrPostVars);
//Optional: use
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Content-Type:application/json’));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($arrPostVars));
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER[‘USER_AGENT’]);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$strResponse = curl_exec ($ch);
$info = curl_getinfo($ch);
curl_close ($ch);
// this is if the response is JSON (will be JSON if you send JSON)
if (preg_match(“/^\{/”, $strResponse)) {
$arrJSON = json_decode($strResponse);
echo “code: “.$arrJSON[‘code’].”<bR />\n”;
echo “error: “.$arrJSON[‘error’].”<bR />\n”;
echo “lead id: “.$arrJSON[‘lead_id’].”<bR />\n”;
// this will be plain HTML (if you do not send JSON)
} else {
// This should be a valid Lead ID
if (preg_match(“/^\d+$/”, $strResponse)) {
echo “Valid lead id: $strResponse<bR />\n”;
} else {
echo “Error: $strResponse<br />\n”;
}
}
exit;
?>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;
using System.Net.Http;
namespace ConsoleApplication4
{
class Program
{
private static readonly HttpClient client = new HttpClient();
static void Main(string[] args)
{
RunAsync().Wait();
Console.ReadLine();
}
static async Task RunAsync()
{
using (var client = new HttpClient())
{
var values = new Dictionary
{
{ “provider_id”, “1-0”},
{ “mover_id”, “EXAMPLEPOST”},
{ “lead_name_first”, “DO NOT” },
{ “lead_name_last”, “CALL!!!!!'” },
{ “lead_provider_ref”, DateTime.Now.ToString() },
{ “lead_phone1”, “519” },
{ “lead_phone2”, “111” },
{ “lead_phone3”, “2222” },
{ “lead_phone_ext”, “111” },
{ “lead_email”, “none@p4pmarketing.com” },
{ “move_date_year”, “2017” },
{ “move_date_month” , “12” },
{ “move_date_day” , “15”},
{ “lead_to_postal” , “77001” },
{ “lead_to_state” , “AL” },
{ “lead_to_city” , “A” },
{ “lead_from_postal”, “90210”},
{ “lead_from_city”, “A” },
{ “lead_from_state”, “AL” },
{ “lead_num_rooms”, “10” },
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync(“http://devel.p4pmarketing.com/lead_provider/new_lead.php”, content);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
}
}
http://devel.p4pmarketing.com/lead_provider/new_lead.php
User-Agent: Fiddler
Host: devel.p4pmarketing.com
Content-Length: 141
Content-type: application/x-www-form-urlencoded
&provider_id=1-0&mover_id=EXAMPLEPOST&lead_name_first=test&lead_name_last=test&lead_from_postal=90210&lead_to_postal=10010&lead_move_date=2023-03-17
Add the rest of the fields as necessary (address, city, state, country, phone #s, etc)
Fields are to be posted the the URL specified below. A successful response will be our unique lead number assigned to that lead. A failed reponse will list the error that occurred, please correct and re-post.
Pay 4 Performance Marketing will provide you with the provider_id field. You will provide us with the mover_id field, which is a unique value you have assigned to identify our mutal client.
Posting URL:
https://www.p4pmarketing.com/lead_provider/new_lead.php
Fields and Values:
Field | Required | Type | Notes |
provider_id | Yes | Alpha(20) | Provided by us to the lead provider. For testing purposes you will be provided this information |
lead_provider_ref | Yes | Numeric(20) | Provider’s lead ID |
mover_id | Yes | Alpha(100) | Provider’s mover ID |
move_date_month | Yes | Numeric(2) | Value Range:1-12 |
move_date_day | Yes | Numeric(2) | Value Range:1-31 |
move_date_year | Yes | Numeric(4) | 4 digit year |
lead_name_first | Yes | Alpha(50) | First Name |
lead_name_last | Yes | Alpha(50) | Last Name |
lead_phone1 | Yes | Numeric(3) | First 3 numbers in phone number (123-555-1000) |
lead_phone2 | Yes | Numeric(3) | Middle 3 numbers in phone number (123-555-1000) |
lead_phone3 | Yes | Numeric(4) | Last 4 numbers in phone number (123-555-1000) |
lead_altphone1 | No | Numeric(3) | First 3 numbers in alternate phone number (123-555-1000) |
lead_altphone2 | No | Numeric(3) | Middle 3 numbers in alternate phone number (123-555-1000) |
lead_altphone3 | No | Numeric(4) | Last 4 numbers in alternate phone number (123-555-1000) |
lead_busphone1 | No | Numeric(3) | First 3 numbers in work phone number (123-555-1000) |
lead_busphone2 | No | Numeric(3) | Middle 3 numbers in work phone number (123-555-1000) |
lead_busphone3 | No | Numeric(4) | Last 4 numbers in work phone number (123-555-1000) |
lead_email | Yes | Alpha(75) | Email Address |
lead_from_add1 | No | Alpha(100) | Origin Address Line 1 |
lead_from_add2 | No | Alpha(100) | Origin Address Line 2 |
lead_from_city | No | Alpha(100) | Origin City |
lead_from_state | No | Alpha(2) | North American state code. List |
lead_from_country | Yes | Alpha | Must be ‘US’ or ‘CA’ |
lead_from_postal | Yes | Alpha(10) | Origin Postal Information |
lead_appartment | No | Numeric(1) | 0-House, 1-Appartment |
lead_from_elevator | No | Numeric(1) | 0-No elevator, 1-Origin residence has access to an elevator |
lead_from_longload | No | Numeric(1) | 0-N/A, 1-Long distance loading required at origin |
lead_from_stairs | No | Numeric(2) | Flights of Stairs |
lead_num_bedrooms | No | Numeric(2) | # Bedrooms |
lead_num_rooms | No | Numeric(2) | # Rooms in residence |
lead_lbs | Yes | Numeric(10) | Total weight of the move |
lead_cu | No | Numeric(10) | Total cubic feet of the move |
lead_sqft | No | Numeric(7) | Total sq.ft of the residence |
lead_storage_type | No | Numeric(1) | 0-None required, 1-Short Term, 2-Long Term |
lead_to_add1 | No | Alpha(100) | Destination Address line 1 |
lead_to_add2 | No | Alpha(100) | Destination Address line 2 |
lead_to_city | No | Alpha(100) | Destination City |
lead_to_state | No | Alpha(2) | Destination State. Only required for US & CA |
lead_to_country | Yes | Alpha(2) | Destination Country. List |
lead_to_postal | Yes | Alpha(10) | Destination Postal Information |
lead_to_elevator | No | Number(1) | 0-No elevator, 1-Destination residence has access to an elevator |
lead_to_longload | No | Number(1) | 0-N/A, 1-Long distance loading required at destination |
lead_to_stairs | No | Numeric(2) | Flights of Stairs |
lead_notes | No | Alpha(1000) | Other notes |
appointment_preference | No | Date (YYYY-MM-DD HH:MM:SS) |
eg. 2023-12-31 23:15:15 NOTE: 24-hour format Please notify support before using this field. |
estimate_given | No | Decimal | eg. 10000.00 Please notify support before using this field. |
appointment_type | No | Numeric |
Please notify support before using this field. |
lead_dnc | No | Numeric |
Please notify support before using this field. |
Examples
PHP
<?php
// use this for live site (https)
$strServer = ‘https://www.p4pmarketing.com/lead_provider/new_lead.php’;
// use this for dev site
$strServer = ‘https://dev.p4pmarketing.com/lead_provider/new_lead.php’;
$arrPostVars = array(
‘provider_id’ => ‘1-0’,
‘mover_id’ => ‘EXAMPLEPOST’,
‘lead_name_first’ => ‘DO NOT’,
‘lead_name_last’ => ‘CALL!!!!!’,
‘lead_provider_ref’ => ‘YourInternalID’.time(),
‘lead_phone1’ => ‘905’,
‘lead_phone2’ => sprintf(“%003d”, rand(0,999)),
‘lead_phone3’ => sprintf(“%0004d”, rand(0,9999)),
‘lead_phone_ext’ => ‘111’,
‘lead_email’ => ‘p4ptestlead’.time().’@p4pmarketing.com’,
‘move_date_year’ => date(‘Y’),
‘move_date_month’ => date(‘m’, time() + rand(0,10000000)),
‘move_date_day’ => date(‘d’, time() + rand(0,1000000)),
‘lead_from_add1’ => ‘123 Test Ave.’,
‘lead_from_add2’ => ‘Appt 234’,
‘lead_from_postal’ => ‘90210’,
‘lead_from_city’ => ‘Beverley Hills’,
‘lead_from_state’ => ‘CA’,
‘lead_from_add1’ => ‘454 Test Ave.’,
‘lead_from_add2’ => ‘Appt 555’,
‘lead_to_postal’ => ‘10001’,
‘lead_to_state’ => ‘NY’,
‘lead_to_city’ => ‘New York’,
‘lead_num_rooms’ => 10,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $strServer);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $arrPostVars);
//Optional: use
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Content-Type:application/json’));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($arrPostVars));
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER[‘USER_AGENT’]);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$strResponse = curl_exec ($ch);
$info = curl_getinfo($ch);
curl_close ($ch);
// this is if the response is JSON (will be JSON if you send JSON)
if (preg_match(“/^\{/”, $strResponse)) {
$arrJSON = json_decode($strResponse);
echo “code: “.$arrJSON[‘code’].”<bR />\n”;
echo “error: “.$arrJSON[‘error’].”<bR />\n”;
echo “lead id: “.$arrJSON[‘lead_id’].”<bR />\n”;
// this will be plain HTML (if you do not send JSON)
} else {
// This should be a valid Lead ID
if (preg_match(“/^\d+$/”, $strResponse)) {
echo “Valid lead id: $strResponse<bR />\n”;
} else {
echo “Error: $strResponse<br />\n”;
}
}
exit;
?>
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;
using System.Net.Http;
namespace ConsoleApplication4
{
class Program
{
private static readonly HttpClient client = new HttpClient();
static void Main(string[] args)
{
RunAsync().Wait();
Console.ReadLine();
}
static async Task RunAsync()
{
using (var client = new HttpClient())
{
var values = new Dictionary
{
{ “provider_id”, “1-0”},
{ “mover_id”, “EXAMPLEPOST”},
{ “lead_name_first”, “DO NOT” },
{ “lead_name_last”, “CALL!!!!!'” },
{ “lead_provider_ref”, DateTime.Now.ToString() },
{ “lead_phone1”, “519” },
{ “lead_phone2”, “111” },
{ “lead_phone3”, “2222” },
{ “lead_phone_ext”, “111” },
{ “lead_email”, “none@p4pmarketing.com” },
{ “move_date_year”, “2017” },
{ “move_date_month” , “12” },
{ “move_date_day” , “15”},
{ “lead_to_postal” , “77001” },
{ “lead_to_state” , “AL” },
{ “lead_to_city” , “A” },
{ “lead_from_postal”, “90210”},
{ “lead_from_city”, “A” },
{ “lead_from_state”, “AL” },
{ “lead_num_rooms”, “10” },
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync(“http://devel.p4pmarketing.com/lead_provider/new_lead.php”, content);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);
}
}
}
}
FIDDLER (composer)
POSThttp://devel.p4pmarketing.com/lead_provider/new_lead.php
User-Agent: Fiddler
Host: devel.p4pmarketing.com
Content-Length: 141
Content-type: application/x-www-form-urlencoded
&provider_id=1-0&mover_id=EXAMPLEPOST&lead_name_first=test&lead_name_last=test&lead_from_postal=90210&lead_to_postal=10010&lead_move_date=2023-03-17
Add the rest of the fields as necessary (address, city, state, country, phone #s, etc)
1000+
Moving company locations served
70,000
Fully qualified appointments annually
12,000
Video surveys annually
-
I have used P4P’s appointment scheduling program for several years now, with good success. Whether used full time or as a supplement to an existing in-house effort, I find their service consistently achieves higher overall lead to appointment results, and in turn sales.
Jeff Newcomer, Vice President, Agency, Sales & Recruiting, Arpin Van Lines
-
I love having P4P on our team. It’s like having your own high end telemarketing department but without the payroll, hiring and managing issues that go along with it.
Steve Eschbacher, Suddath Relocation