Use

The private API allows you to send your customers' orders to us.

  • Usage Quotas: unlimited
    This API is not subject to a quota of requests.
  • Authentication: yes
    A key authentication is required to access and send data.
  • Email sending delay: 10 days
    Starting from the date of receipt of your orders via the API, your customers will be contacted 10 days later by email.


Order shipping

The following parameters must be used to customize the query:

  • api_key string, mandatory
    Unique private key to access the API
  • orders json, mandatory
    Orders table (encoded in JSON)
    • id_order string, mandatory
      Unique order ID
    • order_date string, mandatory
      Order date and time in the format YYYY-MM-DD HH:MM:SS
    • firstname string, mandatory
      Customer's first name
    • lastname string, mandatory
      Customer name
    • email string, mandatory
      Customer email address
    • reference string
      Unique order reference
    • store_id integer
      Unique store ID (if applicable)
    • products array
      Table containing the list of ordered products
      • id integer, mandatory
        Unique product ID
      • name string, mandatory
        Product name
      • category_id string
        Product category ID
      • category_name string
        Product category name
      • qty integer
        Quantity of the product in the order
      • unit_price float
        Unit price of the product (tax included)
      • mpn string
        Product MPN code
      • ean13 string
        Product EAN13 code
      • sku string
        Product SKU code
      • upc string
        Product UPC code
      • url string
        Product URL
Endpoint
https://api.guaranteed-reviews.com/private/v3/orders
Example call (PHP cURL)
<?php // Define API endpoint and API key $apiEndPoint = "https://api.guaranteed-reviews.com/private/v3/orders"; $apiKey = "YOUR_PRIVATE_KEY"; // Prepare data $post = array( 'api_key' => $apiKey, 'orders' => json_encode( array( array( 'id_order' => '1234', 'order_date' => '2019-01-01 12:00:00', 'firstname' => 'John', 'lastname' => 'Doe', 'email' => '[email protected]', 'reference' => '12345678', 'store_id' => 0, 'products' => array( array( 'id' => '100', 'name' => 'My Product 100', 'category_id' => 'cat1', 'category_name' => 'Category 1', 'qty' => '1', 'unit_price' => '25.90', 'mpn' => 'MPN100', 'ean13' => '1234567890123', 'sku' => 'SKU100', 'upc' => 'UPCCODE', 'url' => 'https://www.mywebsite.com/myproduct/', ), ), ), ), ), ); // Prepare CURL request $ch = curl_init($apiEndPoint); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); // Execute CURL request $response = curl_exec($ch); // Close the connection, release resources used curl_close($ch); // Do anything you want with your response ! var_dump($response); ?>

Values returned by the API

The API returns a response containing a 'success' object.

  • success integer
    Return '1' if at least one order has been imported or '0' if no orders have been imported.
  • orders_count integer
    Returns the total number of orders transmitted in the call
  • orders_imported integer
    Returns the total number of orders actually imported
    WARNING: An order will not be re-imported if another order with the same id_order or reference has already been sent.
  • message string
    Returns a possible message containing more information about an error during import.

Example of an API response for a successfully imported order:

JSON
{ "success": 1, "orders_count": 1, "orders_imported": 1, "message": null }

Example of an API response in the case of already imported orders:

JSON
{ "success": 0, "orders_count": 1, "orders_imported": 0, "message": "Some orders were not imported because they had already been sent (see documentation)" }