API Partner (1.8.0)

Download OpenAPI specification:Download

Terms of use

The terms of use gather all the rules to follow to use the API.

Technical side

Your API key and the grains of salt of the checksums must remain secret, they represent your private parameters. It is strictly forbidden to communicate them to third parties. For security reasons, if one of these rules is not respected, we would be forced to deactivate your API key.

Advices

It is strongly recommended to use cache if you are using the API to display your rating and reviews on your site. This will ensure that the display of your page does not depend on the API responses and therefore does not affect its display time.

Display the notices on your media

On your website:

You must clearly display the source of the reviews, namely Aviseniors. Thus, the Aviseniors logo or the label of confidence must appear clearly on the page displaying the reviews, with a link in the href, scanned by the search engines, and pointing towards the company file of the Aviseniors site. This point is essential so that search engines can make the link between the 2 pages, and avoid duplicate content. The review pages of your site must be validated by our partnership department before being put into production. You must also display a textual mention indicating that the reviews come from the Aviseniors site.

Our partnership manager can be reached at 07 88 50 48 11 or by email at agnes@aviseniors.com

On other communication supports:

You must always display the Aviseniors logo and indicate that the reviews are from the Aviseniors solution.

Field Order Requirement in requests

In requests, the order of fields is crucial for successful processing. Ensure that fields are sent in the exact sequence specified in the documentation; any deviation in order may result in errors. Please follow the defined field structure precisely to avoid issues.

Checksum

For each call to the API, a checksum must be sent. This checksum is calculated as follows:

Concatenation of the following values, all formatted in SHA1 :

  • apikey
  • values of parameters sent in the order specified in the doc, formatted in JSON for arrays and objects.
  • checksum_salt_in

PHP code example

private function calcChecksumIn($api_key, $checksum_salt_in, $datas = array())
    {
        $checksum = "";
        $checksum .= $api_key;
        foreach ($datas as $k => $v) {
            if ($v instanceof File) {
                $file = $v->getFilename();
                $file .= $v->getMimeType();
                $file .= $v->getSize();
                $v = $file;
            } elseif (is_array($v) || is_object($v)) {
                $v = json_encode($v, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
            } elseif ($v === true) {
                $v = 1;
            } elseif ($v === false) {
                $v = 0;
            }
            $checksum .= $v;
        }
        $checksum .= $checksum_salt_in;
        return sha1($checksum);
    }

company

Company's informations

Company List

Retrieves information from companies related to the partner.

Authorizations:
apikey
query Parameters
company_id
integer

Aviseniors identifier of the company you want to retrieve specifically

company_siret
string

SIRET of the company you want to retrieve specifically

checksum
required
string

request's validity checksum

nbr_reviews
integer

Nb of reviews you want to retrieve per company (5 max), if parameter missing or value = 0, no review sent.

header Parameters
APIVERSION
required
string

API's used version

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": [
    ],
  • "checksum": "string"
}

pro

Management of pros

A pro account must be associated with at least one of the companies linked to the partner.

If a pro account is associated with a brand, it is automatically considered as associated with all the companies in the park managed by the brand. If it is associated with a company in the park, it is considered as an unnecessary duplication, even if it is tolerated.

Find professional informations

Search for active professionals with e-mail.

Authorizations:
apikey
query Parameters
email
required
string

e-mail of the professional you are looking for

checksum
required
string

request's validity checksum

header Parameters
APIVERSION
required
string

API's used version.

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": {
    },
  • "checksum": "string"
}

List of professionals

Retrieves the list of all the professionals associated with a company, or all the professionals in the the whole park.

Authorizations:
apikey
query Parameters
company_id
required
integer

Aviseniors identifier of the company you want to retrieve specifically (company or brand)

email
string

e-mail of the professional you are looking for

enable
string

if true, search only for active professionals among active companies (true by default)

checksum
required
string

request's validity checksum

header Parameters
APIVERSION
required
string

API's used version

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": {
    },
  • "checksum": "string"
}

Create a professional

Creation of a new professional account, directly associated with a company in the park. The professional will automatically receive his login information by e-mail.

Authorizations:
apikey
header Parameters
APIVERSION
required
string

API's used version.

Request Body schema: application/x-www-form-urlencoded
company_id
required
integer

Aviseniors identifier of the company (company or brand) to which the pro account will be associated

firstname
required
string <= 40 characters

professional's firstname

lastname
required
string <= 40 characters

professional's lastname

email
required
string

e-mail address of the professional, necessary to login

language
string <= 3 characters

professional's language (ISO code 639-1). 'fr' or 'en' accepted.

checksum
required
string

request's validity checksum

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": {
    },
  • "checksum": "string"
}

review

Management of reviews

These services allow you to recover all the reviews and to automate the collection with your your information system.

List of reviews

Retrieves reviews from one or all companies in the park.

Date filters are based on the date of publication as well as the date of response or modification. All inputs work as filters.

Tip: Save the reviews in your data system, via an automated script that retrieves only the reviews of the period not yet retrieved, for example week by week, or month by month.

Authorizations:
apikey
query Parameters
company_id
integer

unique Aviseniors identifier of the company

company_siret
string

SIRET of the company you want to retrieve specifically

date_start
string

start date of the search (YYYY-MM-DD : year + month + day). The date indicated is included. If the start date is not indicated, then it takes the value of the date of creation of the company on Aviseniors.

date_stop
string

search's end date (same format accepted). If the end date is not filled in, then it takes the value of the current date.

checksum
required
string

request's validity checksum

header Parameters
APIVERSION
required
string

API's used version.

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": [
    ],
  • "checksum": "string"
}

List of rejected or archived reviews

Retrieves rejected or archived reviews from one or all companies. Allows you to bring up reviews that should no longer be displayed.

All inputs work as filters. For companies of type 'company', the first input is useless.

Authorizations:
apikey
query Parameters
company_id
integer

unique Aviseniors identifier of the company

checksum
required
string

request's validity checksum

header Parameters
APIVERSION
required
string

API's used version.

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": [
    ],
  • "checksum": "string"
}

Review statistics

This service allows you to retrieve statistics about the companies linked to the partner.

Authorizations:
apikey
query Parameters
company_id
integer

Aviseniors identifier of the company you want to retrieve specifically

checksum
required
string

request's validity checksum

header Parameters
APIVERSION
required
string

API's used version.

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": [
    ],
  • "checksum": "string"
}

Create a collection

Create an e-mail / SMS / link collection for a customer. This service allows you to collect reviews one by one as soon as a transaction is recorded in your systems.

The collection sends an invitation by e-mail / SMS to the customer or returns a link. In case no review is filed, an automatic reminder is sent 7 days later (except in the case of the link).

For the agencies having subscribed to our offer "Avis Garantis" and Google reviews, the collection allows to deposit an opinion on Aviseniors or on Google if a Google account is detected. If the customer has only subscribed to the offer Google reviews then the collection allows only a deposit on Google.

If the contact has a review or request that is less than 15 days old, the collection will be blocked.

Authorizations:
apikey
header Parameters
APIVERSION
required
string

API's used version.

Request Body schema: application/x-www-form-urlencoded
company_id
required
integer

unique Aviseniors identifier of the company

email
required
string <= 80 characters

e-mail of your customer

mobile
string <= 20 characters

mobile number of your customer. If filled in, the recipient will receive an SMS request instead of an email, unless the request type is specified. Furthermore, if this field is not filled in and an SMS reminder should be sent, it will be sent by email instead.

firstname
required
string <= 40 characters

firstname of your customer

lastname
required
string <= 40 characters

lastname of your customer

pro_id
integer

Aviseniors identifier of the professional at the origin of the review

highlight_id
integer

Aviseniors unique identifier of the custom survey related to the business. If the custom surveys are activated on the company and have been defined, you can transmit the Aviseniors unique identifier of the custom survey that will be associated with the review, and for the statistics of the custom survey to be updated.

custom_ref
string <= 40 characters

Your solicitation reference. You can transmit an internal reference for each solicitation, which will then be returned in the reviews returned by the API.

collect_type
string

the desired request method. Possible value: email, sms, link.

Tip : As soon as a mobile number is sent, the API will send an SMS to your customer. If you want to send an email, just don't specify the customer's mobile. Link will return a link to put a new review.

reminder_type
string

The desired request method for the reminder. Possible value: email, sms.

reminder_delay
integer

The desired request delay, in hours, min. 1, for the reminder.

folder_ref
string <= 45 characters

Reference of the file/program to which the notice is to be attached. If this reference is known, the link will be established, otherwise the file will be created.

lang
string
Enum: "fr" "en" "pt"

Language associated with the collection for translation of the email and the deposit. If this is not specified, it will be determined either by the mobile code, if specified, or by the company's default selection.

checksum
required
string

Request's validity checksum

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": {
    },
  • "checksum": "string"
}

Add an evidence

This service allows you to add evidence to a review.

Authorizations:
apikey
header Parameters
APIVERSION
required
string

API's used version.

Request Body schema: application/x-www-form-urlencoded
review_id
required
integer

unique Aviseniors identifier of the review

file
required
string <binary>

js object of the file to upload

checksum
required
string

request's validity checksum

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": { },
  • "checksum": "string"
}

Add an answer

This service allows you to respond to a review.

Authorizations:
apikey
header Parameters
APIVERSION
required
string

API's used version.

Request Body schema: application/x-www-form-urlencoded
review_id
required
integer

unique Aviseniors identifier of the review

answer
required
string

text of the answer

job
string <= 80 characters

profession of the professional who provides the answer

signature
string <= 80 characters

signature of the professional who provides the answer

checksum
required
string

request's validity checksum

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": { },
  • "checksum": "string"
}

solicitation

Solicitation information

Solicitations are the collection of e-mail or SMS sent to prospects to make them depositaries.

List of solicitations

Retrieves the list of all solicitations or only those related to a company.

Authorizations:
apikey
query Parameters
company_id
integer

unique Aviseniors identifier of the company

checksum
required
string

request's validity checksum

header Parameters
APIVERSION
required
string

API's used version

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": {
    },
  • "checksum": "string"
}

highlight

Management of surveys

Customized surveys are defined by brand or company and can replace the default survey for filing reviews.

List of custom surveys

Retrieves information from custom surveys.

Authorizations:
apikey
query Parameters
company_id
integer

Aviseniors identifier of the company you want to retrieve specifically

checksum
required
string

request's validity checksum

header Parameters
APIVERSION
required
string

API's used version

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": {
    },
  • "checksum": "string"
}

utils

Endpoint utilities

Check if API available

This service allows you to test the availability of the API

Authorizations:
apikey
query Parameters
checksum
required
string

request's validity checksum

header Parameters
APIVERSION
required
string

API's used version.

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": {
    },
  • "checksum": "string"
}

API's configurations

Retrieves the configuration associated to the API key.

Authorizations:
apikey
query Parameters
checksum
required
string

request's validity checksum

header Parameters
APIVERSION
required
string

API's used version

Responses

Response samples

Content type
application/json
{
  • "status": true,
  • "error": null,
  • "datas": {
    },
  • "checksum": "string"
}