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

Feefo will accept sales order data in the form of a single sales line at a time. This is executed using a call to a Java Server Page, entersaleremotely. It’s not the preferred method as it has the following limitations:

  • Reports generated in the Feefo Hub from uploaded sales are primarily built around loading sales order files as described elsewhere. There are fewer reports for entersaleremotely and their content is limited. 
  • Feefo’s experience from working with many merchants is that this approach generally is more unreliable than manually uploaded or hosted sales order files. 
  • If an entersaleremotely call fails before reaching Feefo, errors won’t be recorded on the Feefo system. Debugging failure uploads will often be heavily dependent upon the error logs provided by the merchant and therefore it is recommended that systems are put in place to provide detailed error logs.

To use this method, a call is made to the following secure URL:

https://api.feefo.com/api/entersaleremotely
 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:

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

//The Feefo URL 
$url = 'https://api.feefo.com/api/entersaleremotely'; 

//The parameters 
$params = array( 
    'apikey' => '2de0a1ad-331b-49b1-a3d2-39a908c05209', 
    'merchantidentifier' => 'example-retail-merchant', 
    'email' => 'someone@merchantsemailaddress.com', 
    'name' => 'John', 
    'date' => '2012-11-06', 
    'description' => 'Falcon Mach V', 
    'productsearchcode' => '132', 
    'orderref' => 'order_query_test1', 
    'currency' => 'EUR',
    'amount' => '2599.90', 
    'productlink' => 'http://www.exampleretailmerchant.com/product_info.php?products_id=132',
    'customerref' => 'GTD' ),
    'locale' => 'fr'; 

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