Retrieve a lead

Use the getLead method to retrieve leads created in the 2Checkout systems by fetching the lead code.

Request parameters

Parameters
Required

LeadCode

Optional (string / array of strings) Retrieves all leads based on their unique identification code (system-generated).

Email

Optional (string) A valid email address used by the customer

Type

Optional (string)

Must be one of the existing types of leads:

  • New

  • Used

  • UsedSuccess

  • Stopped

  • NotStopped

StartDate

Optional (string) The start date of the interval; format must be yyyy-mm-dd.

EndDate

Optional (string) The end date of the interval; format must be yyyy-mm-dd.

ProductCode

Optional (string / array of strings) Searches for all leads containing the product code.

Language

Optional (string) The language of the shopper cart; ISO 639-1 two-letter code.

Country

Optional (string) The customers billing country; ISO 3166 two-letter code.

GeneratedFrom

Optional (string) API, shopping cart, ConvertPlus. Display the leads based on the source where they were created – via API or via the 2Checkout ordering engines.

Request sample

<?php

require ('PATH_TO_AUTH');

$jsonRpcRequest = array (
    'method' => 'getLead',
    'params' => array($sessionID, '60E6C4B574'),
    'id' => $i++,
    'jsonrpc' => '2.0'
);

var_dump (callRPC((Object)$jsonRpcRequest, $host, true));

Response sample

Last updated

Was this helpful?