PHP code example of retargeting / rest-api-client
1. Go to this page and download the library: Download retargeting/rest-api-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
retargeting / rest-api-client example snippets
etargeting\Client;
// use your REST API KEY from Retargeting Admin Panel
$client = new Client("REST_API_KEY");
// set response format to JSON
$client->setResponseFormat("json");
// not decode the string
$client->setDecoding(false);
// check discount code
$response = $client->discount->check("DISCOUNT_CODE");
var_dump($response);