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.
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.
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
You must always display the Aviseniors logo and indicate that the reviews are from the Aviseniors solution.
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.
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 :
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);
}
Retrieves information from companies related to the partner.
| 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. |
| APIVERSION required | string API's used version |
{- "status": true,
- "error": null,
- "datas": [
- {
- "nbr_companies": 0,
- "companies": [
- {
- "id": "string",
- "id_parent": "string",
- "type": "string",
- "profession": "string",
- "satisfaction_rate": 0,
- "rating": 0,
- "nbr_recommended": "string",
- "nbr_reviews": "string",
- "link": "string",
- "city": "string",
- "siret": "string",
- "email": "string",
- "phone": "string",
- "widget_api_key": "string",
- "rating_google": 0,
- "nbr_reviews_google": 0,
- "reviews": [
- {
- "id": "string",
- "id_company": "string",
- "id_company_parent": "string",
- "date": "string",
- "last_update": "string",
- "lang": "string",
- "title": "string",
- "description": "string",
- "rating": "string",
- "need_evidence": "string",
- "link": "string",
- "is_recommended": "string",
- "custom_ref": "string",
- "user": {
- "login": "string",
- "email": "string"
}, - "pro": {
- "email": "string"
}, - "exp": {
- "name": "string",
- "date": "string"
}, - "criterions": {
- "id": "string",
- "rating": "string",
- "name": "string"
}, - "answer": {
- "job": "string",
- "name": "string",
- "text": "string",
- "date": "string"
}
}
]
}
]
}
], - "checksum": "string"
}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.
Search for active professionals with e-mail.
| email required | string e-mail of the professional you are looking for |
| checksum required | string request's validity checksum |
| APIVERSION required | string API's used version. |
{- "status": true,
- "error": null,
- "datas": {
- "id": "string",
- "custom_id": "string",
- "email": "string",
- "enable": true,
- "firstname": "string",
- "lastname": "string",
- "job": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "zipcode": "string",
- "city": "string"
}, - "contact": {
- "phone": "string",
- "mobile": "string"
}, - "language": "string",
- "acls": {
- "app": true,
- "pro": true
}, - "companies": [
- {
- "id": 0
}
]
}, - "checksum": "string"
}Retrieves the list of all the professionals associated with a company, or all the professionals in the the whole park.
| company_id required | integer Aviseniors identifier of the company you want to retrieve specifically (company or brand) |
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 |
| APIVERSION required | string API's used version |
{- "status": true,
- "error": null,
- "datas": {
- "nbr_pros": 0,
- "pros": [
- {
- "id": "string",
- "custom_id": "string",
- "email": "string",
- "enable": true,
- "firstname": "string",
- "lastname": "string",
- "job": "string",
- "address": {
- "address": "string",
- "address2": "string",
- "zipcode": "string",
- "city": "string"
}, - "contact": {
- "phone": "string",
- "mobile": "string"
}, - "language": "string",
- "acls": {
- "app": true,
- "pro": true
}, - "companies": [
- {
- "id": 0
}
]
}
]
}, - "checksum": "string"
}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.
| APIVERSION required | string API's used version. |
| 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 |
{- "status": true,
- "error": null,
- "datas": {
- "id_pro": 0
}, - "checksum": "string"
}Management of reviews
These services allow you to recover all the reviews and to automate the collection with your your information system.
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.
| 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 |
| APIVERSION required | string API's used version. |
{- "status": true,
- "error": null,
- "datas": [
- {
- "nbr_reviews": 0,
- "reviews": [
- {
- "id": "string",
- "id_company": "string",
- "id_company_parent": "string",
- "date": "string",
- "last_update": "string",
- "lang": "string",
- "title": "string",
- "description": "string",
- "rating": "string",
- "need_evidence": "string",
- "link": "string",
- "is_recommended": "string",
- "custom_ref": "string",
- "user": {
- "login": "string",
- "email": "string"
}, - "pro": {
- "email": "string"
}, - "exp": {
- "name": "string",
- "date": "string"
}, - "criterions": {
- "id": "string",
- "rating": "string",
- "name": "string"
}, - "answer": {
- "job": "string",
- "name": "string",
- "text": "string",
- "date": "string"
}
}
]
}
], - "checksum": "string"
}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.
| company_id | integer unique Aviseniors identifier of the company |
| checksum required | string request's validity checksum |
| APIVERSION required | string API's used version. |
{- "status": true,
- "error": null,
- "datas": [
- {
- "nbr_reviews": 0,
- "reviews": [
- {
- "id": 0
}
]
}
], - "checksum": "string"
}This service allows you to retrieve statistics about the companies linked to the partner.
| company_id | integer Aviseniors identifier of the company you want to retrieve specifically |
| checksum required | string request's validity checksum |
| APIVERSION required | string API's used version. |
{- "status": true,
- "error": null,
- "datas": [
- {
- "statistics": [
- {
- "id_company": {
- "id_company": 0,
- "nbr_solicitations": 0,
- "nbr_review": 0,
- "source_review": {
- "source": 0
}
}
}
]
}
], - "checksum": "string"
}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.
| APIVERSION required | string API's used version. |
| 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 |
{- "status": true,
- "error": null,
- "datas": {
- "link": "string"
}, - "checksum": "string"
}This service allows you to add evidence to a review.
| APIVERSION required | string API's used version. |
| 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 |
{- "status": true,
- "error": null,
- "datas": { },
- "checksum": "string"
}This service allows you to respond to a review.
| APIVERSION required | string API's used version. |
| 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 |
{- "status": true,
- "error": null,
- "datas": { },
- "checksum": "string"
}Solicitation information
Solicitations are the collection of e-mail or SMS sent to prospects to make them depositaries.
Retrieves the list of all solicitations or only those related to a company.
| company_id | integer unique Aviseniors identifier of the company |
| checksum required | string request's validity checksum |
| APIVERSION required | string API's used version |
{- "status": true,
- "error": null,
- "datas": {
- "nbr_solicitations": 0,
- "solicitations": [
- {
- "id_company": "string",
- "email": "string",
- "date": "string",
- "state": "string",
- "type": "string"
}
]
}, - "checksum": "string"
}Management of surveys
Customized surveys are defined by brand or company and can replace the default survey for filing reviews.
Retrieves information from custom surveys.
| company_id | integer Aviseniors identifier of the company you want to retrieve specifically |
| checksum required | string request's validity checksum |
| APIVERSION required | string API's used version |
{- "status": true,
- "error": null,
- "datas": {
- "nbr_highlights": 0,
- "highlights": [
- {
- "id": "string",
- "number": 0,
- "id_company": "string",
- "name": "string",
- "activity": {
- "id": "string",
- "name": "string"
}
}
]
}, - "checksum": "string"
}This service allows you to test the availability of the API
| checksum required | string request's validity checksum |
| APIVERSION required | string API's used version. |
{- "status": true,
- "error": null,
- "datas": {
- "message": "string"
}, - "checksum": "string"
}Retrieves the configuration associated to the API key.
| checksum required | string request's validity checksum |
| APIVERSION required | string API's used version |
{- "status": true,
- "error": null,
- "datas": {
- "id_partner": 0,
- "api_key": "string",
- "salt_checksum_in": "string",
- "salt_checksum_out": "string",
- "version": {
- "current": "string",
- "used": "string"
}
}, - "checksum": "string"
}