In this article we introduce the entersaleremotely API method for supplying sales data orders to Feefo.

The entersaleremotely API is a great way of sending transactional data to Feefo in real time, especially if you want the customer to receive their feedback request shortly after the transaction has taken place. A separate request to the API is required for each order line belonging to a transaction using the common orderref parameter to link them together.

To use this method, a call is made to the following secure URL:
 The URL is appended with a number of parameters, some of which are always required and others that are optional. A full list can be found in the Entersaleremotely API Parameter Summary.

Although entersaleremotely works with both POST HTTP and GET HTTP methods, it is recommended that the request is made using HTTP POST. The primary reason for this is that the parameters will be encoded and shown in the POST body but if this is done via HTTPS the customer data will be secure as it will not be exposed in plain text as part of the request.

The request can also be submitted using GET, in which case the parameters should be included in the request string. This is not recommended since it exposes customer data in plain text anywhere where the request URL is shown (such as in router logs).

An example of using entersaleremotely with PHP is shown below:

//Feefo php example.
//You will need the PHP cURL module installed for this to run. 

//The Feefo URL 
$url = ''; 

//The parameters 
$params = array( 
    'apikey' => '2de0a1ad-331b-49b1-a3d2-39a908c05209', 
    'merchantidentifier' => 'example-retail-merchant', 
    'email' => '', 
    'name' => 'John', 
    'date' => '2012-11-06', 
    'description' => 'Falcon Mach V', 
    'productsearchcode' => '132', 
    'orderref' => 'order_query_test1', 
    'currency' => 'EUR',
    'amount' => '2599.90', 
    'productlink' => '',
    'customerref' => 'GTD',
    'locale' => 'fr'

//Build up the query and use curl to execute it. 
$data = http_build_query($params, '', '&'); 
    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_POST, 1); 
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
echo "The response received was: $reply";