### Manual Installation of Leadspedia SDK Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/README.md Include the autoload.php file manually if not using Composer for installation. ```php require_once('/path/to/Leadspedia/vendor/autoload.php'); ``` -------------------------------- ### Install Leadspedia PHP SDK via Composer Source: https://context7.com/diablomedia/leadspedia-php-sdk/llms.txt Add the Leadspedia PHP SDK repository to your composer.json file and run composer install to integrate the library into your project. ```json { "repositories": [ { "type": "vcs", "url": "https://github.com/diablomedia/leadspedia-php-sdk.git" } ], "require": { "diablomedia/leadspedia-php-sdk": "*@dev" } } ``` -------------------------------- ### Get Revenue Cap Info - PHP Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/CallRoutingContractsApi.md Example of how to fetch revenue cap information for a contract using the Leadspedia PHP SDK. Ensure your API keys are set. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\CallRoutingContractsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $contractID = 56; // int | try { $result = $apiInstance->callRoutingContractsgetRevenueCapInfodo($contractID); print_r($result); } catch (Exception $e) { echo 'Exception when calling CallRoutingContractsApi->callRoutingContractsgetRevenueCapInfodo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### GET /leads/getAll.do Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/README.md Retrieves all leads. ```APIDOC ## GET /leads/getAll.do ### Description Retrieves all leads. ### Method GET ### Endpoint /leads/getAll.do ``` -------------------------------- ### GET /offers/getAll.do Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/OffersApi.md Retrieves all offers. ```APIDOC ## GET /offers/getAll.do ### Description Get All ### Method GET ### Endpoint /offers/getAll.do ### Response #### Success Response (200) - **offers** (array) - An array of offer objects. - **offerID** (int) - The ID of the offer. - **name** (string) - The name of the offer. #### Response Example ```json { "offers": [ { "offerID": 1, "name": "Example Offer 1" }, { "offerID": 2, "name": "Example Offer 2" } ] } ``` ``` -------------------------------- ### GET /leadDistributionContracts/getLeadsSettings.do Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadDistributionContractsApi.md Retrieves the current settings for lead distribution. ```APIDOC ## GET /leadDistributionContracts/getLeadsSettings.do ### Description Get Leads Settings ### Method GET ### Endpoint /leadDistributionContracts/getLeadsSettings.do ### Response #### Success Response (200) - **(object)** - Lead settings details ``` -------------------------------- ### GET /leadDistributionContracts/getPortalSettings.do Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadDistributionContractsApi.md Retrieves the current settings for the lead portal. ```APIDOC ## GET /leadDistributionContracts/getPortalSettings.do ### Description Get Portal Settings ### Method GET ### Endpoint /leadDistributionContracts/getPortalSettings.do ### Response #### Success Response (200) - **(object)** - Portal settings details ``` -------------------------------- ### GET /affiliates/getAll.do Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/README.md Retrieves a list of all affiliates. ```APIDOC ## GET /affiliates/getAll.do ### Description Retrieves a list of all affiliates. ### Method GET ### Endpoint /affiliates/getAll.do ``` -------------------------------- ### GET /leadDistributionContracts/getReturnsSettings.do Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadDistributionContractsApi.md Retrieves the current settings for lead returns. ```APIDOC ## GET /leadDistributionContracts/getReturnsSettings.do ### Description Get Returns Settings ### Method GET ### Endpoint /leadDistributionContracts/getReturnsSettings.do ### Response #### Success Response (200) - **(object)** - Returns settings details ``` -------------------------------- ### GET /verticalGroups/all Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/VerticalGroupsApi.md Retrieves a list of all vertical groups. Supports pagination with start and limit parameters. ```APIDOC ## GET /verticalGroups/all ### Description Retrieves a list of all vertical groups. Supports pagination with start and limit parameters. ### Method GET ### Endpoint /verticalGroups/all ### Parameters #### Query Parameters - **start** (int) - Optional - Defaults to 0. - **limit** (int) - Optional - Defaults to 100. ### Request Example ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\VerticalGroupsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->verticalGroupsgetAlldo($start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling VerticalGroupsApi->verticalGroupsgetAlldo: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Response #### Success Response (200) - **data** (object) - Description of the data field #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### Retrieve Lead Returns with PHP Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadsApi.md Demonstrates how to initialize the LeadsApi client and call the leadsgetReturnsdo method to fetch return data. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $fromDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | $campaignID = 56; // int | $affiliateID = 56; // int | $verticalID = 56; // int | $advertiserID = 56; // int | $contractID = 56; // int | $status = 'status_example'; // string | $returnReasonID = 56; // int | $toDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->leadsgetReturnsdo($fromDate, $campaignID, $affiliateID, $verticalID, $advertiserID, $contractID, $status, $returnReasonID, $toDate, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadsApi->leadsgetReturnsdo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### GET /numbers/getAvailable.do Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/NumbersApi.md Retrieves a list of available numbers. You can specify the starting point and the number of results to return. ```APIDOC ## GET /numbers/getAvailable.do ### Description Get Available numbers. This endpoint allows you to retrieve a list of available numbers, with options to control the starting index and the total count of results. ### Method GET ### Endpoint /numbers/getAvailable.do ### Parameters #### Query Parameters - **start** (int) - Optional - Defaults to 0. The starting index for the list of numbers. - **limit** (int) - Optional - Defaults to 100. The maximum number of results to return. ### Request Example ``` GET /core/v2/numbers/getAvailable.do?start=0&limit=100 ``` ### Response #### Success Response (200) - **InlineResponse2001** (object) - An object containing the list of available numbers and related information. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Retrieve Queued Leads with PHP Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadsApi.md Demonstrates how to initialize the LeadsApi client and call the leadsgetQueuedo method with date and ID filters. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $fromDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | $campaignID = 56; // int | $affiliateID = 56; // int | $verticalID = 56; // int | $toDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->leadsgetQueuedo($fromDate, $campaignID, $affiliateID, $verticalID, $toDate, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadsApi->leadsgetQueuedo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### GET /leadDistributionContracts/getScheduledo Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadDistributionContractsApi.md Retrieves scheduled leads for a given contract ID. Supports pagination with start and limit parameters. ```APIDOC ## GET /leadDistributionContracts/getScheduledo ### Description Retrieves scheduled leads for a given contract ID. Supports pagination with start and limit parameters. ### Method GET ### Endpoint /leadDistributionContracts/getScheduledo ### Parameters #### Query Parameters - **contractID** (int) - Required - The ID of the contract. - **start** (int) - Optional - The starting index for pagination. Defaults to 0. - **limit** (int) - Optional - The maximum number of results to return. Defaults to 100. ### Response #### Success Response (200) - **InlineResponse2001** - The response object containing scheduled lead data. ### Request Example ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadDistributionContractsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $contractID = 56; // int | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->leadDistributionContractsgetScheduledo($contractID, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadDistributionContractsApi->leadDistributionContractsgetScheduledo: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Create an Advertiser using PHP Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/AdvertisersApi.md Initializes the AdvertisersApi with API key credentials and calls the advertiserscreatedo method. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\AdvertisersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $advertiserName = 'advertiserName_example'; // string | $accountManagerID = 56; // int | $status = 'status_example'; // string | try { $result = $apiInstance->advertiserscreatedo($advertiserName, $accountManagerID, $status); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdvertisersApi->advertiserscreatedo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Get All Campaigns with Filters Source: https://context7.com/diablomedia/leadspedia-php-sdk/llms.txt Retrieve campaigns with optional filtering by affiliate, offer, vertical, or status. Requires specifying start and limit for pagination. ```php campaignsgetAlldo( null, // campaignID (optional) 456, // affiliateID (optional) null, // offerID (optional) 5, // verticalID (optional) 'active', // status (optional) null, // search (optional) 0, // start 100 // limit ); print_r($result); } catch (Exception $e) { echo 'Exception: ' . $e->getMessage(); } ?> ``` -------------------------------- ### Retrieve Lead Info with PHP SDK Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadsApi.md Demonstrates how to configure API keys and call the leadsgetLeadInfodo method to fetch lead information. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $leadID = 'leadID_example'; // string | try { $result = $apiInstance->leadsgetLeadInfodo($leadID); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadsApi->leadsgetLeadInfodo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Get All Advertiser Credit Cards Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/AdvertisersCreditCardsApi.md Retrieve a list of all credit cards associated with a specific advertiser. Supports pagination with start and limit parameters. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\AdvertisersCreditCardsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $advertiserID = 56; // int | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->advertisersCreditCardsgetAlldo($advertiserID, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdvertisersCreditCardsApi->advertisersCreditCardsgetAlldo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Get All Vertical Groups Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/VerticalGroupsApi.md Fetches a paginated list of all vertical groups. Requires API key configuration. Default start is 0 and limit is 100. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\VerticalGroupsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->verticalGroupsgetAlldo($start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling VerticalGroupsApi->verticalGroupsgetAlldo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Retrieve all offers using PHP SDK Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/OffersApi.md Demonstrates how to configure the API client and call the offersgetAlldo method to fetch a list of offers. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\OffersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $verticalID = 56; // int | $revenueModel = 'revenueModel_example'; // string | $payoutModel = 'payoutModel_example'; // string | $advertiserID = 56; // int | $status = 'status_example'; // string | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->offersgetAlldo($verticalID, $revenueModel, $payoutModel, $advertiserID, $status, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling OffersApi->offersgetAlldo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Get All Offers with Filters Source: https://context7.com/diablomedia/leadspedia-php-sdk/llms.txt Retrieve offers with optional filtering by vertical, revenue model, advertiser, and status. Requires specifying start and limit for pagination. ```php offersgetAlldo( 5, // verticalID (optional) 'cpa', // revenueModel (optional) null, // payoutModel (optional) 123, // advertiserID (optional) 'active', // status (optional) 0, // start 100 // limit ); print_r($result); } catch (Exception $e) { echo 'Exception: ' . $e->getMessage(); } ?> ``` -------------------------------- ### Create Lead Distribution Contract Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadDistributionContractsApi.md Demonstrates how to initialize the API client with authentication and call the leadDistributionContractscreatedo method. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadDistributionContractsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $verticalID = 56; // int | $advertiserID = 56; // int | $revenueModel = 'revenueModel_example'; // string | $contractName = 'contractName_example'; // string | $defaultPrice = 3.4; // float | try { $result = $apiInstance->leadDistributionContractscreatedo($verticalID, $advertiserID, $revenueModel, $contractName, $defaultPrice); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadDistributionContractsApi->leadDistributionContractscreatedo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Retrieve all lead distribution contracts Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadDistributionContractsApi.md Demonstrates how to initialize the LeadDistributionContractsApi and call the leadDistributionContractsgetAlldo method with optional filters. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadDistributionContractsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $advertiserID = 56; // int | $contractID = 56; // int | $verticalID = 56; // int | $status = 'status_example'; // string | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->leadDistributionContractsgetAlldo($advertiserID, $contractID, $verticalID, $status, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadDistributionContractsApi->leadDistributionContractsgetAlldo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Get Returns Settings - PHP Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/CallRoutingContractsApi.md This PHP code retrieves the returns settings for a given contract ID. It requires the SDK to be installed and API keys to be configured. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\CallRoutingContractsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $contractID = 56; // int | try { $result = $apiInstance->callRoutingContractsgetReturnsSettingsdo($contractID); print_r($result); } catch (Exception $e) { echo 'Exception when calling CallRoutingContractsApi->callRoutingContractsgetReturnsSettingsdo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Run Leadspedia SDK Unit Tests Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/README.md Execute unit tests for the Leadspedia SDK after installation. ```bash composer install ./vendor/bin/phpunit ``` -------------------------------- ### Call Routing Contracts API - Get Scheduled Pause Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/CallRoutingContractsApi.md Retrieves scheduled pause information for a call routing contract, with optional start and limit parameters. ```APIDOC ## POST /api/callRoutingContracts/getScheduledPause ### Description Retrieves scheduled pause information for a call routing contract. ### Method POST ### Endpoint /api/callRoutingContracts/getScheduledPause ### Parameters #### Path Parameters - **contractID** (int) - Optional - The ID of the contract. - **start** (int) - Optional - The starting index for the results. Defaults to 0. - **limit** (int) - Optional - The maximum number of results to return. Defaults to 100. ### Request Example ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\CallRoutingContractsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $contractID = 56; // int | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->callRoutingContractsgetScheduledPausedo($contractID, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling CallRoutingContractsApi->callRoutingContractsgetScheduledPausedo: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Response #### Success Response (200) - **InlineResponse2001** (object) - #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Retrieve basic offer information using PHP SDK Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/OffersApi.md Demonstrates how to configure the API client and call the offersgetBasicInfodo method to fetch details for a specific offer ID. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\OffersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $offerID = 56; // int | try { $result = $apiInstance->offersgetBasicInfodo($offerID); print_r($result); } catch (Exception $e) { echo 'Exception when calling OffersApi->offersgetBasicInfodo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Get Returns Settings for Lead Distribution Contract Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadDistributionContractsApi.md This PHP code retrieves the returns settings for a given contract ID. It requires the Leadspedia SDK to be installed and API keys to be configured. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadDistributionContractsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $contractID = 56; // int | try { $result = $apiInstance->leadDistributionContractsgetReturnsSettingsdo($contractID); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadDistributionContractsApi->leadDistributionContractsgetReturnsSettingsdo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Retrieve Lead Data with PHP SDK Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadsApi.md Demonstrates how to configure API keys and call the leadsgetLeadDatado method to fetch lead data. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $leadID = 'leadID_example'; // string | try { $result = $apiInstance->leadsgetLeadDatado($leadID); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadsApi->leadsgetLeadDatado: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Get Scheduled Leads for Contract - PHP Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadDistributionContractsApi.md Use this method to retrieve scheduled leads for a specific contract. Ensure API keys are configured correctly. The `start` and `limit` parameters control pagination. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadDistributionContractsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $contractID = 56; // int | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->leadDistributionContractsgetScheduledo($contractID, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadDistributionContractsApi->leadDistributionContractsgetScheduledo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Search Offers with PHP SDK Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/OffersApi.md Demonstrates how to configure the API client and perform a search for offers using the offerssearchdo method. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\OffersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $name = 'name_example'; // string | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->offerssearchdo($name, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling OffersApi->offerssearchdo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Retrieve Offers Leads Cap Report Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/LeadsReportsApi.md Demonstrates how to initialize the LeadsReportsApi and call the leadsReportsgetOffersLeadsCapReportdo method. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\LeadsReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $verticalID = 56; // int | $verticalGroupID = 56; // int | try { $result = $apiInstance->leadsReportsgetOffersLeadsCapReportdo($verticalID, $verticalGroupID); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadsReportsApi->leadsReportsgetOffersLeadsCapReportdo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Get Scheduled Pauses for Call Routing Contract Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/CallRoutingContractsApi.md Retrieve scheduled pause information for a call routing contract. Optional parameters for start and limit can be provided for pagination. Ensure API key is configured. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\CallRoutingContractsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $contractID = 56; // int | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->callRoutingContractsgetScheduledPausedo($contractID, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling CallRoutingContractsApi->callRoutingContractsgetScheduledPausedo: ', $e->getMessage(), PHP_EOL; } ?> ``` -------------------------------- ### Get All Affiliate Contacts Source: https://github.com/diablomedia/leadspedia-php-sdk/blob/master/docs/Api/AffiliatesContactsApi.md Retrieves a list of all affiliate contacts. Supports filtering by contact ID, affiliate ID, portal access, and pagination with start and limit parameters. Ensure API keys are configured. ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure API key authorization: apiKey1 $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKey('api_secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Leadspedia\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_secret', 'Bearer'); $apiInstance = new Leadspedia\Api\AffiliatesContactsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $contactID = 56; // int | $affiliateID = 56; // int | $portalAccess = 'portalAccess_example'; // string | $start = 0; // int | $limit = 100; // int | try { $result = $apiInstance->affiliatesContactsgetAlldo($contactID, $affiliateID, $portalAccess, $start, $limit); print_r($result); } catch (Exception $e) { echo 'Exception when calling AffiliatesContactsApi->affiliatesContactsgetAlldo: ', $e->getMessage(), PHP_EOL; } ?> ```