MENU navbar-image

Introduction

This API allows for the usage of the Rec.Reviews service in a custom integration. All fields are required unless stated otherwise.

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can create an API token on your subscription's details page, by enabling Custom Integration.

Shop

Get current ID

requires authentication

Returns the shop ID for the currently authentified subscription, if any

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/shop';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://dashboard.recreviews.com/api/shop" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://dashboard.recreviews.com/api/shop"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request   

GET api/shop

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get configuration

requires authentication

Returns the configuration of the authentified shop

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/shop/configuration';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://dashboard.recreviews.com/api/shop/configuration" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://dashboard.recreviews.com/api/shop/configuration"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request   

GET api/shop/configuration

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Update configuration

requires authentication

Updates the shop's stored configuration. Must be called on each configuration update on your side.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/module/configuration';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'configuration' => [
                'name' => 'My shop',
                'cmsName' => 'PrestaShop',
                'cmsVersion' => '8.1.1',
                'websiteUrl' => 'https://recreviews.com',
                'logoUrl' => 'https://recreviews.com/img/logo_bleu.png',
                'initialDelay' => 3,
                'reminderDelay' => 5,
                'color' => '#ff0000',
                'PVR_STATUS_SELECTION' => 1,
                'PVR_ENABLE_VOUCHER' => false,
                'PVR_VOUCHER_PREFIX' => 'molestias',
                'PVR_VOUCHER_TYPE' => 'itaque',
                'PVR_VOUCHER_AMOUNT' => 3,
                'PVR_VOUCHER_PERCENT' => 10,
                'PVR_VOUCHER_CURRENCY' => 6,
                'PVR_VOUCHER_CURRENCY_CODE' => 'elm',
                'PVR_VOUCHER_TAX' => true,
                'PVR_VOUCHER_DESC' => 'ut',
                'PVR_VOUCHER_GENERATE' => 'eos',
                'PVR_VOUCHER_QTY' => 10,
                'PVR_VOUCHER_MIN_AMOUNT' => 4,
                'PVR_VOUCHER_MIN_AMOUNT_DESC' => [
                    'ipsam',
                ],
                'PVR_VOUCHER_VALIDITY' => 19,
                'PVR_VOUCHER_HIGHLIGHT' => true,
                'PVR_VOUCHER_CUMULATE' => true,
                'PVR_VOUCHER_INCENTIVE_TEXT' => [
                    'velit',
                ],
                'PVR_PRODUCT_REVIEW_LINES' => 19,
                'PVR_PRODUCT_NB_LOAD_ITEM' => 11,
                'PVR_ENABLE_BATTLE' => false,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/module/configuration" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"configuration\": {
        \"name\": \"My shop\",
        \"cmsName\": \"PrestaShop\",
        \"cmsVersion\": \"8.1.1\",
        \"websiteUrl\": \"https:\\/\\/recreviews.com\",
        \"logoUrl\": \"https:\\/\\/recreviews.com\\/img\\/logo_bleu.png\",
        \"initialDelay\": 3,
        \"reminderDelay\": 5,
        \"color\": \"#ff0000\",
        \"PVR_STATUS_SELECTION\": 1,
        \"PVR_ENABLE_VOUCHER\": false,
        \"PVR_VOUCHER_PREFIX\": \"molestias\",
        \"PVR_VOUCHER_TYPE\": \"itaque\",
        \"PVR_VOUCHER_AMOUNT\": 3,
        \"PVR_VOUCHER_PERCENT\": 10,
        \"PVR_VOUCHER_CURRENCY\": 6,
        \"PVR_VOUCHER_CURRENCY_CODE\": \"elm\",
        \"PVR_VOUCHER_TAX\": true,
        \"PVR_VOUCHER_DESC\": \"ut\",
        \"PVR_VOUCHER_GENERATE\": \"eos\",
        \"PVR_VOUCHER_QTY\": 10,
        \"PVR_VOUCHER_MIN_AMOUNT\": 4,
        \"PVR_VOUCHER_MIN_AMOUNT_DESC\": [
            \"ipsam\"
        ],
        \"PVR_VOUCHER_VALIDITY\": 19,
        \"PVR_VOUCHER_HIGHLIGHT\": true,
        \"PVR_VOUCHER_CUMULATE\": true,
        \"PVR_VOUCHER_INCENTIVE_TEXT\": [
            \"velit\"
        ],
        \"PVR_PRODUCT_REVIEW_LINES\": 19,
        \"PVR_PRODUCT_NB_LOAD_ITEM\": 11,
        \"PVR_ENABLE_BATTLE\": false
    }
}"
const url = new URL(
    "https://dashboard.recreviews.com/api/module/configuration"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "configuration": {
        "name": "My shop",
        "cmsName": "PrestaShop",
        "cmsVersion": "8.1.1",
        "websiteUrl": "https:\/\/recreviews.com",
        "logoUrl": "https:\/\/recreviews.com\/img\/logo_bleu.png",
        "initialDelay": 3,
        "reminderDelay": 5,
        "color": "#ff0000",
        "PVR_STATUS_SELECTION": 1,
        "PVR_ENABLE_VOUCHER": false,
        "PVR_VOUCHER_PREFIX": "molestias",
        "PVR_VOUCHER_TYPE": "itaque",
        "PVR_VOUCHER_AMOUNT": 3,
        "PVR_VOUCHER_PERCENT": 10,
        "PVR_VOUCHER_CURRENCY": 6,
        "PVR_VOUCHER_CURRENCY_CODE": "elm",
        "PVR_VOUCHER_TAX": true,
        "PVR_VOUCHER_DESC": "ut",
        "PVR_VOUCHER_GENERATE": "eos",
        "PVR_VOUCHER_QTY": 10,
        "PVR_VOUCHER_MIN_AMOUNT": 4,
        "PVR_VOUCHER_MIN_AMOUNT_DESC": [
            "ipsam"
        ],
        "PVR_VOUCHER_VALIDITY": 19,
        "PVR_VOUCHER_HIGHLIGHT": true,
        "PVR_VOUCHER_CUMULATE": true,
        "PVR_VOUCHER_INCENTIVE_TEXT": [
            "velit"
        ],
        "PVR_PRODUCT_REVIEW_LINES": 19,
        "PVR_PRODUCT_NB_LOAD_ITEM": 11,
        "PVR_ENABLE_BATTLE": false
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request   

POST api/module/configuration

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

configuration   object   

An object containing the configuration of the shop.

name   string   

The name of the shop. This value will be used for both display and emails content. Example: My shop

cmsName   string  optional  

The name of the CMS, if any. Example: PrestaShop

Must be one of:
  • PrestaShop
  • Magento
  • WooCommerce
  • Shopify
  • PrestaShop (RBM)
cmsVersion   string  optional  

The version of the CMS, if any. Example: 8.1.1

websiteUrl   string   

The URL of the website. Must be a valid URL. Example: https://recreviews.com

logoUrl   string   

The direct URL to the shop logo. Must be a valid URL. Example: https://recreviews.com/img/logo_bleu.png

initialDelay   integer  optional  

The number of days to wait after a command has been marked as valid before we send the initial rating invitation. Must be at least 1. Example: 3

reminderDelay   integer  optional  

The number of days to wait after the initial invitation before we send a reminder (0 to disable reminder). Must be at least 0. Example: 5

color   string  optional  

The HEX color code of the shop. This color will be used for the border of video reviews, and cannot be modified on already recorded reviews. Example: #ff0000

PVR_STATUS_SELECTION   integer  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: 1

PVR_ENABLE_VOUCHER   boolean  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: false

PVR_VOUCHER_PREFIX   string  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: molestias

PVR_VOUCHER_TYPE   string  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: itaque

PVR_VOUCHER_AMOUNT   integer  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: 3

PVR_VOUCHER_PERCENT   integer  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: 10

PVR_VOUCHER_CURRENCY   integer  optional  

This field is required when configuration.cmsName is PrestaShop or Magentod. Example: 6

PVR_VOUCHER_CURRENCY_CODE   string  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Must be 3 characters. Example: elm

PVR_VOUCHER_TAX   boolean  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: true

PVR_VOUCHER_DESC   string  optional  

Example: ut

PVR_VOUCHER_GENERATE   string  optional  

Example: eos

PVR_VOUCHER_QTY   integer  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: 10

PVR_VOUCHER_MIN_AMOUNT   integer  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: 4

PVR_VOUCHER_MIN_AMOUNT_DESC   string[]  optional  

This field is required when configuration.cmsName is PrestaShop or Magento.

PVR_VOUCHER_VALIDITY   integer  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: 19

PVR_VOUCHER_HIGHLIGHT   boolean  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: true

PVR_VOUCHER_CUMULATE   boolean  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: true

PVR_VOUCHER_INCENTIVE_TEXT   string[]  optional  
PVR_PRODUCT_REVIEW_LINES   integer  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: 19

PVR_PRODUCT_NB_LOAD_ITEM   integer  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: 11

PVR_ENABLE_BATTLE   boolean  optional  

This field is required when configuration.cmsName is PrestaShop or Magento. Example: false

Orders

Create an order

requires authentication

Creates a new order and its associated customer and products with the provided data

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/orders';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'order' => [
                'reference' => 'AZE001',
                'validStatus' => true,
                'order_date' => '1970-01-01 12:00:00',
                'products' => [
                    [
                        'id' => 7,
                        'name' => 'My product name',
                        'image' => 'https://mywebsite.com/myproductpage/myimage.png',
                        'price' => 777.0,
                        'currency' => 'EUR',
                        'ratingUrl' => 'https://mywebsite.com/myproductpage',
                    ],
                ],
            ],
            'customer' => [
                'id' => 7,
                'first_name' => 'Sylvester',
                'last_name' => 'Stallone',
                'email' => 'example@recreviews.com',
                'birthdate' => '1970-01-01',
                'gender' => 'M',
                'lang' => 'en',
                'id_shop_lang' => 1,
                'phone' => '+33699999999',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/orders" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": {
        \"reference\": \"AZE001\",
        \"validStatus\": true,
        \"order_date\": \"1970-01-01 12:00:00\",
        \"products\": [
            {
                \"id\": 7,
                \"name\": \"My product name\",
                \"image\": \"https:\\/\\/mywebsite.com\\/myproductpage\\/myimage.png\",
                \"price\": 777,
                \"currency\": \"EUR\",
                \"ratingUrl\": \"https:\\/\\/mywebsite.com\\/myproductpage\"
            }
        ]
    },
    \"customer\": {
        \"id\": 7,
        \"first_name\": \"Sylvester\",
        \"last_name\": \"Stallone\",
        \"email\": \"example@recreviews.com\",
        \"birthdate\": \"1970-01-01\",
        \"gender\": \"M\",
        \"lang\": \"en\",
        \"id_shop_lang\": 1,
        \"phone\": \"+33699999999\"
    }
}"
const url = new URL(
    "https://dashboard.recreviews.com/api/orders"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": {
        "reference": "AZE001",
        "validStatus": true,
        "order_date": "1970-01-01 12:00:00",
        "products": [
            {
                "id": 7,
                "name": "My product name",
                "image": "https:\/\/mywebsite.com\/myproductpage\/myimage.png",
                "price": 777,
                "currency": "EUR",
                "ratingUrl": "https:\/\/mywebsite.com\/myproductpage"
            }
        ]
    },
    "customer": {
        "id": 7,
        "first_name": "Sylvester",
        "last_name": "Stallone",
        "email": "example@recreviews.com",
        "birthdate": "1970-01-01",
        "gender": "M",
        "lang": "en",
        "id_shop_lang": 1,
        "phone": "+33699999999"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "result": true
}
 

Example response (200):


{
    "result": false
}
 

Request   

POST api/orders

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

order   object   

An object describing the order.

reference   string   

The reference of the order. Example: AZE001

validStatus   boolean   

Whether this order should be considered as valid, meaning we can start notifying the customer to get a rating after the configured delay has elapsed. If this value is set to true, the "Update order status" call is not required to mark the order as ready. Example: true

order_date   string   

The order date in the "Y-m-d H:i:s" format. Must be a valid date. Example: 1970-01-01 12:00:00

products   object[]   
id   integer   

The product ID, as an integer. Example: 7

name   string   

The name of the product. Example: My product name

image   string   

The URL to the main image of the product. Must be a valid URL. Example: https://mywebsite.com/myproductpage/myimage.png

price   number   

The price of the product, as a numeric value. The format must comply with PHP's is_numeric. Example: 777

currency   string   

The currency of the order, in the ISO 4217 format (EUR, USD, etc...). Example: EUR

ratingUrl   string  optional  

An URL pointing to the page where the product can be rated. Must be a valid URL. Example: https://mywebsite.com/myproductpage

customer   object   

An object describing the customer.

id   integer   

The ID of the customer, as an integer. Example: 7

first_name   string   

The first name of the customer. Example: Sylvester

last_name   string   

The last name of the customer. Example: Stallone

email   string   

The email address of the customer. Must be a valid email address. Example: example@recreviews.com

birthdate   string  optional  

The customer birthdate, in the "Y-m-d" format. Must be a valid date. Example: 1970-01-01

gender   string  optional  

The gender of the customer. Accepted values: M, F. Example: M

Must be one of:
  • M
  • F
lang   string   

The lang in which we'll contact the customer. Accepted values: fr, en. Example: en

id_shop_lang   integer  optional  

The ID lang of the customer in the shop, if available. Example: 1

phone   string   

The phone number of the customer. Example: +33699999999

Update order status

requires authentication

Updates the status of the order to allow for rating reminders to be sent If the status is valid, this call will automatically create a review for each product in the order, making the recorder URL available when fetching reviews right away If the order was already created with the validStatus field set to true, this request is not required.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/orders/status';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'order' => [
                'reference' => 'AZE001',
                'validStatus' => false,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/orders/status" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": {
        \"reference\": \"AZE001\",
        \"validStatus\": false
    }
}"
const url = new URL(
    "https://dashboard.recreviews.com/api/orders/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": {
        "reference": "AZE001",
        "validStatus": false
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "result": true
}
 

Example response (200):


{
    "result": false,
    "error": "Unknown order"
}
 

Request   

POST api/orders/status

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

order   object   

An object containing the order details we need.

reference   string   

The reference of the order. Example: AZE001

validStatus   boolean   

Whether this order should be considered as valid, meaning we can start notifying the customer for a rating. Example: false

Get orders without reviews

requires authentication

Returns the orders of a shop that have no reviews

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/orders';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'idCustomer' => 12,
            'minDate' => '2025-01-22T14:38:12',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://dashboard.recreviews.com/api/orders" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCustomer\": 12,
    \"minDate\": \"2025-01-22T14:38:12\"
}"
const url = new URL(
    "https://dashboard.recreviews.com/api/orders"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCustomer": 12,
    "minDate": "2025-01-22T14:38:12"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "result": true,
    "orders": [
        {
            "reference": "AZE",
            "order_date": "2021-06-24T13:26:41.000000Z",
            "id_product": 12,
            "id_customer": 1
        }
    ]
}
 

Example response (200):


{
    "result": false
}
 

Request   

GET api/orders

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCustomer   integer  optional  

Example: 12

minDate   string  optional  

Must be a valid date. Example: 2025-01-22T14:38:12

Get vouchers

requires authentication

Returns the vouchers associated to the orders of the shop

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/orders/vouchers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'idCustomer' => 11,
            'minDate' => '2025-01-22T14:38:12',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://dashboard.recreviews.com/api/orders/vouchers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCustomer\": 11,
    \"minDate\": \"2025-01-22T14:38:12\"
}"
const url = new URL(
    "https://dashboard.recreviews.com/api/orders/vouchers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCustomer": 11,
    "minDate": "2025-01-22T14:38:12"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "result": true,
    "vouchers": [
        {
            "order_reference": "AZE",
            "order_date": "2021-06-24T13:26:41.000000Z",
            "code": "REVIEWS-AZE",
            "mode": "order",
            "percentage": null,
            "amount": 15,
            "min_amount": 0,
            "tax": 0,
            "currency": "€",
            "expiration_date": "2022-10-11 11:48:02",
            "id_customer": 1
        }
    ]
}
 

Example response (200):


{
    "result": false
}
 

Request   

GET api/orders/vouchers

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCustomer   integer  optional  

Example: 11

minDate   string  optional  

Must be a valid date. Example: 2025-01-22T14:38:12

Update order voucher

requires authentication

Updates the voucher information of the orders to be sent

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/orders/voucher';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'order' => [
                'reference' => 'repellendus',
            ],
            'voucher' => [
                'code' => 'quam',
                'percentage' => 'voluptas',
                'amount' => 546.477,
                'currency' => 'nesciunt',
                'tax' => true,
                'min_amount' => 16216.2,
                'validity' => '2025-01-22T14:38:12',
                'mode' => 'customer',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/orders/voucher" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": {
        \"reference\": \"repellendus\"
    },
    \"voucher\": {
        \"code\": \"quam\",
        \"percentage\": \"voluptas\",
        \"amount\": 546.477,
        \"currency\": \"nesciunt\",
        \"tax\": true,
        \"min_amount\": 16216.2,
        \"validity\": \"2025-01-22T14:38:12\",
        \"mode\": \"customer\"
    }
}"
const url = new URL(
    "https://dashboard.recreviews.com/api/orders/voucher"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": {
        "reference": "repellendus"
    },
    "voucher": {
        "code": "quam",
        "percentage": "voluptas",
        "amount": 546.477,
        "currency": "nesciunt",
        "tax": true,
        "min_amount": 16216.2,
        "validity": "2025-01-22T14:38:12",
        "mode": "customer"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "result": true
}
 

Example response (200):


{
    "result": false,
    "error": "Unknown order"
}
 

Request   

POST api/orders/voucher

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

order   object   
reference   string   

Example: repellendus

voucher   object  optional  
code   string  optional  

This field is required when voucher is present. Example: quam

percentage   string  optional  

This field is required when voucher.amount is not present. Example: voluptas

amount   number  optional  

This field is required when voucher.percentage is not present. Example: 546.477

currency   string  optional  

This field is required when voucher is present. Example: nesciunt

tax   boolean  optional  

This field is required when voucher is present. Example: true

min_amount   number  optional  

This field is required when voucher is present. Example: 16216.2

validity   string  optional  

Must be a valid date. This field is required when voucher is present. Example: 2025-01-22T14:38:12

mode   string   

The type of voucher (customer, order or product) Example: customer

Reviews

Get reviews

requires authentication

Returns all of the shop's reviews that have a video

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/reviews';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'min_date' => '2025-01-22T14:38:12',
            'id_customer' => 11,
            'published' => false,
            'deleted' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://dashboard.recreviews.com/api/reviews" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"min_date\": \"2025-01-22T14:38:12\",
    \"id_customer\": 11,
    \"published\": false,
    \"deleted\": true
}"
const url = new URL(
    "https://dashboard.recreviews.com/api/reviews"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "min_date": "2025-01-22T14:38:12",
    "id_customer": 11,
    "published": false,
    "deleted": true
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "result": true,
    "reviews": [
        {
            "id": "59ff99be-4c2b-4687-b152-2f3061bfe50b",
            "date": "2021-06-24T13:26:41.000000Z",
            "published_at": null,
            "unpublished_at": null,
            "previous_id_review": null,
            "recorder_url": "https://recorder_url",
            "video_url": "https://video_url.mp4",
            "thumbnail_url": "https://thumbnail_url.png",
            "preview_url": "https://preview_url.mp4",
            "rating": 5,
            "is_demo_review": true,
            "id_order_product": 2,
            "order_reference": "JYQFCSHDW",
            "id_customer": 144,
            "product": {
                "name": "Product name"
            },
            "author": {
                "email": "test@test.com",
                "first_name": "Jean",
                "last_name": "Bon"
            }
        }
    ]
}
 

Request   

GET api/reviews

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

min_date   string  optional  

Minimal creation date for the reviews to retrieve Example: libero

id_customer   integer  optional  

The customer ID to retrieve the reviews of Example: 19

published   string  optional  

boolean Provide this value to get only published or unpublished reviews. Leave to null to fetch whatever their status might be. Example: velit

deleted   string  optional  

boolean Provide this value to get only deleted/declined reviews. Leave to null to fetch whatever their status might be. Example: in

Body Parameters

min_date   string  optional  

Must be a valid date. Example: 2025-01-22T14:38:12

id_customer   integer  optional  

Example: 11

published   boolean  optional  

Example: false

deleted   boolean  optional  

Example: true

Create a review

requires authentication

Creates a new review entry and returns the URL to use to record the video review

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/reviews';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id_customer' => 6,
            'order_reference' => 'qui',
            'id_product' => 10,
            'rating' => 0,
            'previous_id_review' => '382e9ec5-b690-3074-81d0-5103386dfd03',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/reviews" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id_customer\": 6,
    \"order_reference\": \"qui\",
    \"id_product\": 10,
    \"rating\": 0,
    \"previous_id_review\": \"382e9ec5-b690-3074-81d0-5103386dfd03\"
}"
const url = new URL(
    "https://dashboard.recreviews.com/api/reviews"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id_customer": 6,
    "order_reference": "qui",
    "id_product": 10,
    "rating": 0,
    "previous_id_review": "382e9ec5-b690-3074-81d0-5103386dfd03"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "result": true,
    "reviewId": "59ff99be-4c2b-4687-b152-2f3061bfe50b",
    "recorderUrl": "https://recorder_url.com"
}
 

Example response (200):


{
    "result": false,
    "error": "Unknown shop"
}
 

Example response (200):


{
    "result": false,
    "error": "Unknown customer"
}
 

Example response (200):


{
    "result": false,
    "error": "Unknown order"
}
 

Example response (200):


{
    "result": false,
    "error": "Unknown product"
}
 

Request   

POST api/reviews

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id_customer   integer   

Example: 6

order_reference   string   

Example: qui

id_product   integer   

Example: 10

rating   integer   

Must be between 0 and 5. Example: 0

previous_id_review   string  optional  

Must be a valid UUID. Example: 382e9ec5-b690-3074-81d0-5103386dfd03

Publish a deleted review

requires authentication

Marks the received review as published again, restores the video.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/publish-deleted';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/publish-deleted" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/publish-deleted"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "result": true
}
 

Example response (200):


{
    "result": false
}
 

Request   

POST api/reviews/{deleted_review}/publish-deleted

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

deleted_review   string   

Example: 00011578-dcde-4a7e-a8ed-ff5ec221a8b1

review   string   

The ID of the review to re-publish Example: 59ff99be-4c2b-4687-b152-2f3061bfe50b

Publish a review

requires authentication

Marks the received review as published, setting the required fields on the entity.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/publish';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/publish" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/publish"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "result": true
}
 

Example response (200):


{
    "result": false
}
 

Request   

POST api/reviews/{review_id}/publish

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

review_id   string   

The ID of the review. Example: 00011578-dcde-4a7e-a8ed-ff5ec221a8b1

review   string   

The ID of the review to publish Example: 59ff99be-4c2b-4687-b152-2f3061bfe50b

Unpublish a review

requires authentication

Unpublishes the received review

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/unpublish';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/unpublish" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/unpublish"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "result": true
}
 

Example response (200):


{
    "result": false
}
 

Request   

POST api/reviews/{review_id}/unpublish

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

review_id   string   

The ID of the review. Example: 00011578-dcde-4a7e-a8ed-ff5ec221a8b1

review   string   

The ID of the review to unpublish Example: 59ff99be-4c2b-4687-b152-2f3061bfe50b

Decline a review

requires authentication

Declines a review and remove its associated video

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/decline';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/decline" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1/decline"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "result": true
}
 

Example response (200):


{
    "result": false
}
 

Request   

POST api/reviews/{review_id}/decline

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

review_id   string   

The ID of the review. Example: 00011578-dcde-4a7e-a8ed-ff5ec221a8b1

review   string   

The ID of the review to decline Example: 59ff99be-4c2b-4687-b152-2f3061bfe50b

Get a review

requires authentication

Returns the details of the review having the provided ID

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "result": true,
    "review": {
        "id": "59ff99be-4c2b-4687-b152-2f3061bfe50b",
        "date": "2021-06-24T13:26:41.000000Z",
        "recorded_at": "2021-07-24T13:26:41.000000Z",
        "published_at": null,
        "unpublished_at": null,
        "previous_id_review": null,
        "recorder_url": "https://recorder_url",
        "video_url": "https://video_url.mp4",
        "thumbnail_url": "https://thumbnail_url.png",
        "preview_url": "https://preview_url.mp4",
        "rating": 5,
        "is_demo_review": true,
        "id_order_product": 2,
        "order_reference": "JYQFCSHDW",
        "id_customer": 144,
        "product": {
            "name": "Product name"
        },
        "author": {
            "email": "test@test.com",
            "first_name": "Jean",
            "last_name": "Bon"
        }
    }
}
 

Example response (200):


{
    "result": false
}
 

Request   

GET api/reviews/{review_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

review_id   string   

The ID of the review. Example: 00011578-dcde-4a7e-a8ed-ff5ec221a8b1

review   string   

The ID of the review for which we want details Example: 59ff99be-4c2b-4687-b152-2f3061bfe50b

Get an updated review

requires authentication

Returns the new review details based on the previous review's ID. This endpoint can be used to retrieve the details of the review that replaces a previous one (e.g. when a customer changes their review)

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/reviews/updated/00011578-dcde-4a7e-a8ed-ff5ec221a8b1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://dashboard.recreviews.com/api/reviews/updated/00011578-dcde-4a7e-a8ed-ff5ec221a8b1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://dashboard.recreviews.com/api/reviews/updated/00011578-dcde-4a7e-a8ed-ff5ec221a8b1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "result": true,
    "review": {
        "id": "59ff99be-4c2b-4687-b152-2f3061bfe50b",
        "date": "2021-06-24T13:26:41.000000Z",
        "published_at": null,
        "unpublished_at": null,
        "previous_id_review": null,
        "recorder_url": "https://recorder_url",
        "video_url": "https://video_url.mp4",
        "thumbnail_url": "https://thumbnail_url.png",
        "preview_url": "https://preview_url.mp4",
        "rating": 5,
        "id_order_product": 2,
        "order_reference": "JYQFCSHDW",
        "id_customer": 144
    }
}
 

Example response (200):


{
    "result": false
}
 

Request   

GET api/reviews/updated/{review_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

review_id   string   

The ID of the review. Example: 00011578-dcde-4a7e-a8ed-ff5ec221a8b1

review   string   

The ID of the old review Example: unde

Update a rating

requires authentication

Updates the rating of a review

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'rating' => 5,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"rating\": 5
}"
const url = new URL(
    "https://dashboard.recreviews.com/api/reviews/00011578-dcde-4a7e-a8ed-ff5ec221a8b1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "rating": 5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "result": true
}
 

Example response (200):


{
    "result": false
}
 

Request   

POST api/reviews/{review_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

review_id   string   

The ID of the review. Example: 00011578-dcde-4a7e-a8ed-ff5ec221a8b1

review   string   

The ID of the review to update Example: 59ff99be-4c2b-4687-b152-2f3061bfe50b

Body Parameters

rating   integer   

The new rating, on a scale from 0 to 5. Example: 5