Search leads
Last updated: 27-Sep-2021
Rate this article:
Overview
Use the searchLeads method to retrieve leads created in the 2Checkout system.
Request Parameters
Parameters | Required | Type/Description |
---|---|---|
Page | Required | String. The page in the result set. |
Limit | Required | Number. The number of items to be retrieved on each page. |
Request Example
<?php
require ('PATH_TO_AUTH');
$LeadSearchInput = new stdClass();
$LeadSearchInput->Type = "New";
$LeadSearchInput->Language = "BG";
$LeadSearchInput->Country = "RO";
$LeadSearchInput->Page = 1;
$LeadSearchInput->Limit = 200;
$jsonRpcRequest = array (
'method' => 'searchLeads',
'params' => array($sessionID, $LeadSearchInput),
'id' => $i++,
'jsonrpc' => '2.0'
);
var_dump (callRPC((Object)$jsonRpcRequest, $host, true));
Response Example
class stdClass#4 (2) {
public $Items =>
class stdClass#5 (1) {
public $0 =>
class stdClass#6 (14) {
public $LeadCode =>
string(10) "60E6C4B574"
public $GeneratedFrom =>
string(3) "API"
public $CartId =>
string(11) "CartIdValue"
public $Currency =>
string(3) "EUR"
public $Language =>
string(2) "BG"
public $ExternalReference =>
string(18) "REST_API_3CHECKOUT"
public $MachineId =>
string(6) "123asd"
public $LocalTime =>
string(19) "2019-11-05 16:48:28"
public $Items =>
class stdClass#7 (1) {
public $0 =>
class stdClass#8 (15) {
public $Code =>
string(10) "04C26C50F8"
public $Quantity =>
string(1) "2"
public $SKU =>
NULL
public $Name =>
string(5) "softy"
public $Description =>
NULL
public $IsDynamic =>
bool(false)
public $Tangible =>
bool(false)
public $PurchaseType =>
string(7) "PRODUCT"
public $PriceOptions =>
NULL
}
public $RecurringOptions =>
class stdClass#10 (5) {
public $CycleLength =>
NULL
public $CycleUnit =>
NULL
public $CycleAmount =>
NULL
public $ContractLength =>
NULL
public $ContractUnit =>
NULL
}
public $RenewalInformation =>
class stdClass#11 (1) {
public $SubscriptionReference =>
NULL
}
public $MarketingCampaigns =>
class stdClass#12 (3) {
public $Type =>
string(2) "23"
public $ParentCode =>
string(1) "m"
public $CampaignCode =>
string(2) "23"
}
public $Price =>
class stdClass#13 (2) {
public $Amount =>
string(2) "20"
public $Type =>
string(6) "CUSTOM"
}
public $AdditionalFields =>
NULL
public $SubscriptionStartDate =>
string(19) "2019-11-05 16:48:28"
}
}
public $BillingDetails =>
class stdClass#14 (12) {
public $FirstName =>
string(8) "Customer"
public $LastName =>
string(9) "2Checkout"
public $Phone =>
NULL
public $Company =>
NULL
public $FiscalCode =>
string(8) "32423423"
public $Email =>
string(22) "customer@2checkout.com"
public $Address1 =>
string(12) "Test Address"
public $Address2 =>
NULL
public $City =>
string(2) "LA"
public $Zip =>
string(5) "12345"
public $CountryCode =>
string(2) "RO"
public $State =>
string(2) "CA"
}
public $DeliveryDetails =>
class stdClass#15 (12) {
public $FirstName =>
string(8) "Customer"
public $LastName =>
string(9) "2Checkout"
public $Phone =>
NULL
public $Company =>
NULL
public $FiscalCode =>
string(8) "32423423"
public $Email =>
string(22) "customer@2checkout.com"
public $Address1 =>
string(12) "Test Address"
public $Address2 =>
NULL
public $City =>
string(2) "LA"
public $Zip =>
string(5) "12345"
public $CountryCode =>
string(2) "RO"
public $State =>
string(2) "CA"
}
public $DeliveryInformation =>
class stdClass#16 (1) {
public $ShippingMethod =>
class stdClass#17 (1) {
public $Code =>
string(5) "sdfsd"
}
}
public $PaymentDetails =>
class stdClass#18 (4) {
public $Type =>
string(2) "CC"
public $Currency =>
string(3) "EUR"
public $PaymentMethod =>
class stdClass#19 (2) {
public $RecurringEnabled =>
bool(false)
public $CardPayment =>
class stdClass#20 (1) {
public $InstallmentsNumber =>
string(2) "23"
}
}
public $CustomerIP =>
string(7) "1.2.3.4"
}
public $Promotions =>
array(1) {
[0] =>
string(0) ""
}
}
}
public $Pagination =>
class stdClass#21 (3) {
public $Page =>
int(1)
public $Limit =>
int(200)
public $Count =>
int(1)
}
}
Related articles
Rate this article: