To post leads to Leadspedia system, you nead to make HTTP request to Leadspedia affiliate web-service URL. This web-service accepts three requests: lead posting, posted lead price request and revenue ping request. Data can be sent as HTTP POST fields or as an XML data. XML data can be sent as raw POST data, or as field named “xml” (GET or POST field).
Lead posting request consists of lead parameters. Some of the parameters are required in every lead, some are only depending on other parameters.
Requests are accepted only from registered IP addresses (may be multiple for one affiliate).
All requests have to be sent to this URL: https://affiliate.leadspedia.ca/post/
affiliate - indicates registered affiliate login name (e-mail), which is used for posting leads, required.
key - indicates keycode of affiliate for posting leads (this is not the password, which is used to log in affiliate panel), required.
request - indicates type of the request, for lead posting request optional.
Possible values: “lead”, “ping”, “price”, defaults to “lead”.
pingid - indicates Ping ID, acquired from previous revenue ping request, optional.
Possible values: ping ID.
trackingid - indicates lead id in affiliate system or anything else for tracking purposes, optional.
countryfrom - indicates origin country, required if field zipfrom is missing.
Possible values: CA, US
statefrom - indicates lead state or province, required if field zipfrom is missing.
Possible values: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT, AL, AK, AZ, AR, CA, CO, CT, DE, DC, 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
cityfrom - indicates origin state or province, required in field zipfrom is missing.
zipfrom - indicates origin zip or postal code, required if field cityfrom, statefrom or countryfrom is missing.
countryto - indicates destination country, required if field zipto is missing.
Possible values: US, CA, AFGHANISTAN, ALBANIA, ALGERIA, AMERICAN SAMOA, ANDORRA, ANGOLA, ANGUILLA, ANTIGUA AND BARB., ARGENTINA, ARMENIA, ARUBA, AUSTRALIA, AUSTRIA, AZERBAIJAN, BAHAMAS, BAHRAIN, BANGLADESH, BARBADOS, BELARUS, BELGIUM, BELIZE, BENIN, BERMUDA, BHUTAN, BOLIVIA, BOSNIA-HER., BOTSWANA, BOUVET ISLAND, BRAZIL, BRUNEI DARUSSALAM, BULGARIA, BURKINA FASO, BURUNDI, CAMBODIA, CAMEROON, CAPE VERDE, CAYMAN ISLANDS, CENTRAL AFRICAN REP., CHAD, CHILE, CHINA, CHRISTMAS ISLAND, COCOS (KEELING) IS., COLOMBIA, COMOROS, CONGO, COOK ISLANDS, COSTA RICA, COTE D'IVOIRE, CROATIA, CUBA, CYPRUS, CZECH REPUBLIC, DENMARK, DJIBOUTI, DOMINICA, DOMINICAN REPUBLIC, EAST TIMOR, ECUADOR, EGYPT, EL SALVADOR, EQUATORIAL GUINEA, ERITREA, ESTONIA, ETHIOPIA, FAROE ISLANDS, FALKLAND ISLANDS, FIJI, FINLAND, FRANCE, FRENCH GUIANA, FRENCH POLYNESIA, FRENCH SOUTHERN TER., GABON, GAMBIA, GEORGIA, GERMANY, GHANA, GIBRALTAR, GREAT BRITAIN, GREECE, GREENLAND, GRENADA, GUADALOUPE, GUAM, GUATEMALA, GUINEA, GUINEA-BISSAU, GUYANA, HAITI, HOLY SEE, HONDURAS, HONG KONG, HUNGARY, ICELAND, INDIA, INDONESIA, IRAN, IRAQ, IRELAND, ISRAEL, ITALY, JAMAICA, JAPAN, JORDAN, KAZAKHSTAN, KENYA, KIRIBATI, KUWAIT, KYRGYZSTAN, LAO, LATVIA, LEBANON, LESOTHO, LIBERIA, LIBYA, LIECHTENSTEIN, LITHUANIA, LUXEMBOURG, MACAU, MACEDONIA, MADAGASCAR, MALAWI, MALAYSIA, MALDIVES, MALI, MALTA, MARSHAL ISLANDS, MARTINIQUE, MAURITANIA, MAURITIUS, MAYOTTE, MEXICO, MICRONESIA, MOLDOVA, MONACO, MONGOLIA, MONTENEGRO, MONTSERRAT, MOROCCO, MOZAMBIQUE, MYANMAR, NAMIBIA, NAURU, NEPAL, NETHERLANDS, NETHERLANDS ANTILLES, NEW CALEDONIA, NEW ZEALAND, NICARAGUA, NIGER, NIGERIA, NIUE, NORTHERN MARIANA ISLANDS, NORTH KOREA, NORWAY, OMAN, PAKISTAN, PALAU, PALESTINIAN TERRITORIES, PANAMA, PAPUA NEW GUINEA, PARAGUAY, PERU, PHILIPPINES, PITCAIRN ISLANDS, POLAND, PORTUGAL, PUERTO RICO, QATAR, REUNION ISLAND, ROMANIA, RUSSIA, RWANDA, SAINT KITTS AND NEVIS, SAINT LUCIA, SAINT VINCENT AND THE GREN., SAMOA, SAN MARINO, SAO TOME AND PRINCIPE, SAUDI ARABIA, SENEGAL, SERBIA, SEYCHELLES, SIERRA LEONE, SINGAPORE, SLOVAKIA, SLOVENIA, SOLOMON ISLANDS, SOMALIA, SOUTH AFRICA, SOUTH KOREA, SPAIN, SRI LANKA, SUDAN, SURINAME, SWAZILAND, SWEDEN, SWITZERLAND, SYRIA, TAIWAN, TAJIKISTAN, TANZANIA, THAILAND, TIBET, TIMOR-LESTE, TOGO, TOKELAU, TONGA, TRINIDAD AND TOBAGO, TUNISIA, TURKEY, TURKMENISTAN, TURKS AND CAICOS IS., TUVALU, UGANDA, UKRAINE, UNITED ARAB EMIRATES, URUGUAY, UZBEKISTAN, VANUATU, VATICAN CITY STATE, VENEZUELA, VIETNAM, VIRGIN ISLANDS (British), VIRGIN ISLANDS (U.S.), WALLIS AND FUTUNA IS., WESTERN SAHARA, YEMEN, ZAMBIA, ZIMBABWE
stateto - indicates destination state or province, required if field countryto is CA or US and field zipto is missing.
Possible values: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT, AL, AK, AZ, AR, CA, CO, CT, DE, DC, 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
cityto - indicates destination city, required if field zipto is missing or destination country is not CA or US.
zipto - indicates destination zip or postal code, required if field cityto is missing and destination country is CA or US.
pickup - indicates pickup/drop off type required and used only for leads where field countryto is not US and not CA. Possible values: ptp, dtd ptd, dtp this means: port to port, door to door, port to door and door to port.
date - indicates move date, required. Possible values: date in m/d/Y (01/31/2017) or Y-m-d (2017-01-31) format. Lead may be returned by moving companies if move date is more than 6 months from today.
size - indicates move size in lbs or quantity of bedrooms, required if field transport is not Only car transport. Possible values: number or "studio", "1 bedroom", "2 bedroom", "3 bedroom", "4 bedroom", "5 bedroom".
storage - indicates whether storage is needed, optional (default value: No) Possible values: Yes, No or anything else which means No
transport - indicates if customer wants to transport his car or may be only car without other stuff Possible values: N/A, Yes, Only car transport
year - indicates year of production of car, which customer wants to transport, required if field transport is not N/A Possible values: year in 4 digits format
make - indicates make of car, which customer wants to transport, required if field transport is not N/A
model - indicates model of car, which customer wants to transport, required if field transport is not N/A
running - indicates whether car, which customer wants to transport is or not in running condition, optional, default Yes Possible values: Yes, No or anything else which means No
first - indicates customer's first name, required.
last - indicates customer's last name, required.
phone - indicates customer's phone, required. Possible values: if origin and destination country is US or CA, valid USA or Canada phone is required. For other countries it have to be valid international number with country code.
email - indicates customer's e-mail, required.
ip - indicates IP address of person who posted this lead, required.
created - indicates date and time when lead was created, required. Possible values: date in m/d/Y H:i (01/31/2017 15:30) or Y-m-d H:i (2017-01-31 15:30) format, time can be also in 12 hours format (01/31/2017 03:30 PM).
freespots - indicates to how many moving companies this lead can be sold, optional.
soldto - indicates comma separated md5 encoded e-mails of customers, to which this lead was sold before. Used to avoid selling one lead to the same moving company twice. Optional.
reporturl - URL to which will be posted lead price request each time payout will be updated, optional. See lead price request for more information. Possible values: any valid URL, which will accept lead price request.
exclusive - indicates that lead is sold exclusively. If missing, lead is considered to be shared for accounts which can post exclusive and shared leads. Ignored for accounts, which can post exclusive leads only. Possible values: 1 for exclusive leads and 0 for not exclusive leads.
test - indicates that lead is for testing purposes or it is real lead. If missing, lead is considered to be real. Possible values: anything. If this field is present and it is non-blank and non-zero, lead is considered to be test lead.
Response to lead posting request contains JSON encoded array, which contains the following fields:
error - presence of this field indicates that lead wasn't posted successfully, contains string, which describes it.
id - indicates lead id in Leadspedia system, used for tracking purposes, indicates, that lead was posted successfully.
price - indicates price, for which exclusive lead were bought. Is present for exclusive leads only.
Revenue ping is a service to calculate revenue before posting lead. All fields are the same as for lead posting request except first, last, phone and email fields which are not used. For revenue ping request field have to be set to “ping”.
Response to revenue ping request contains JSON encoded array, which contains the following fields:
error - presence of this field indicates that posted data has an error, contains string, which describes it.
revenue - indicates revenue, which affiliate will receive for posting such lead.
sold - indicates quantity of buyers, to which such lead will be sold, present only for non-exclusive leads.
id - indicates ID of ping request.
affiliate - indicates affiliate login name (e-mail), which is used for posting leads, required.
key - indicates keycode of affiliate for posting leads (this is not the password, which is used to log in affiliate panel), required.
request - indicates type of the request, required. Possible values: for lead price request must be equal to “price”.
id - indicates lead id in Leadspedia system, which was received in response of lead posting request, required.
Response to lead price request contains JSON encoded array, which contains the following fields:
error - presence of this field indicates that lead wasn't posted successfully, contains string, which describes it.
id - indicates lead id in Leadspedia system.
pricecad - indicates price in CAD, which will be paid for this lead if it was sold to buyer for CAD (price may change if lead will be sold to someone additionally or may be someone, to whom the lead was sold, will return it, for example, because of invalid contact information)
priceusd - indicates price in USD, which will be paid for this lead if it was sold to buyer for USD.
Most of leads are sold to all buyers in one currency, but some leads can be sold to some buyers in CAD and to other in USD, than prices in both currencies will be present.
XML requests have similar structure as POST requests, instead of fields you use tags, and all of them are children of main tag named “Leadspedia”.
<?xml version="1.0" encoding="utf-8" ?>
<leadspedia>
<affiliate>Your login</affiliate>
<key>Your key here (not password for affiliate panel)</key>
<trackingid>Tracking id</trackingid>
<countryfrom>CA</countryfrom>
<statefrom>AB</statefrom>
<cityfrom>Calgary</cityfrom>
<countryto>CA</countryto>
<stateto>BC</stateto>
<zipto>V5Y3B9</zipto>
<date>01/01/2017</date>
<size>5000</size>
<storage>Yes</storage>
<transport>Yes</transport>
<year>2026</year>
<make>Porsche</make>
<model>Cayman</model>
<running>Yes</running>
<first>John</first>
<last>Smith</last>
<phone>555-444-3333</phone>
<email>user@domain.com</email>
<freespots>3</freespots>
<test>1</test>
</leadspedia>
<?xml version="1.0" encoding="utf-8" ?>
<leadspedia>
<affiliate>Your login</affiliate>
<key>Your key here (not password for affiliate panel)</key>
<request>price</request>
<id>posted leads ID</id>
</leadspedia>
<?xml version="1.0" encoding="utf-8" ?>
<leadspedia>
<affiliate>Your login</affiliate>
<key>Your key here (not password for affiliate panel)</key>
<request>ping</request>
<countryfrom>CA</countryfrom>
<statefrom>AB</statefrom>
<cityfrom>Calgary</cityfrom>
<countryto>CA</countryto>
<stateto>BC</stateto>
<zipto>V5Y3B9</zipto>
<date>01/01/2017</date>
<size>5000</size>
<storage>Yes</storage>
<transport>Yes</transport>
<year>2026</year>
<make>Porsche</make>
<model>Cayman</model>
<running>Yes</running>
<freespots>3</freespots>
</leadspedia>
<?php
$params=array(
"affiliate"=>"Your login",
"key"=>"Your key here (not password for affiliate panel)",
"trackingid"=>"Tracking id",
"countryfrom"=>"CA",
"statefrom"=>"AB",
"cityfrom"=>"Calgary",
"countryto"=>"CA",
"stateto"=>"BC",
"zipto"=>"V5Y3B9",
"date"=>"12/31/2026",
"size"=>6000,
"storage"=>"Yes",
"transport"=>"N/A",
"first"=>"John",
"last"=>"Smith",
"phone"=>"555-444-3333",
"email"=>"user@domain.com",
"freespots"=>3,
"test"=>1
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://affiliate.leadspedia.ca/post/");
curl_setopt($ch, CURLOPT_POST, count($params));
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$result=json_decode(curl_exec($ch));
if (isset($result->error)) {
echo "Error: ".$result->error;
} else {
echo "Lead posted with ID: ".$result->id;
}
?>
<?php
$params=array(
"affiliate"=>"Your login",
"key"=>"Your key here (not password for affiliate panel)",
"request"=>"price",
"id"=>"Lead id"
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://affiliate.leadspedia.ca/post/");
curl_setopt($ch, CURLOPT_POST, count($params));
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$result=json_decode(curl_exec($ch));
if (isset($result->error)) {
echo "Error: ".$result->error;
} else {
echo "Lead price: ".$result->price;
}
?>
<?php
$params=array(
"affiliate"=>"Your login",
"key"=>"Your key here (not password for affiliate panel)",
"trackingid"=>"Tracking id",
"request"=>"ping",
"countryfrom"=>"CA",
"statefrom"=>"AB",
"cityfrom"=>"Calgary",
"countryto"=>"CA",
"stateto"=>"BC",
"zipto"=>"V5Y3B9",
"date"=>"12/31/2026",
"size"=>6000,
"storage"=>"Yes",
"transport"=>"N/A",
"first"=>"John",
"last"=>"Smith",
"phone"=>"555-444-3333",
"email"=>"user@domain.com",
"freespots"=>3,
"test"=>1
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://affiliate.leadspedia.ca/post/");
curl_setopt($ch, CURLOPT_POST, count($params));
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$result=json_decode(curl_exec($ch));
if (isset($result->error)) {
echo "Error: ".$result->error;
} else {
echo "Payout for such lead: ".$result->revenue;
}
?>
© 2020 - 2025 Leadspedia.ca. All Rights Reserved.