A2Reviews Client API Info
#!/bin/bash
str_data = "handle=fashion-t-shirt&page=1&limit=20&sortBy=created_at&orderBy=desc&stars=1%2C2%2C3%2C4%2C5&hasPhoto=0
×tamp=1632280361" \
site_api_secret = "Your API Key" \
echo -n "$str_data" | openssl dgst -sha256 -hmac "$site_api_secret"
$params_data = [
'handle' => 'fashion-t-shirt',
'page' => 1,
'limit' => 20,
'sortBy' => 'created_at',
'orderBy' => 'desc',
'stars' => '1,2,3,4,5',
'hasPhoto' => false,
'timestamp' => time()
];
$data = http_build_query($params_data);
$sign = hash_hmac('sha256', $data, $site_api_secret);
/*
You you can install via npm install locutus and require it via require('locutus/php/url/http_build_query').
You could also require the url module in full so that you could access url.http_build_query instead.
*/
// npm install locutus
// npm i crypto-js
// require('locutus/php/url/http_build_query')
// var crypto = require("crypto-js");
let params_data = {
handle: 'fashion-t-shirt',
page: 1,
limit: 20,
sortBy: 'created_at',
orderBy: 'desc',
stars: '1,2,3,4,5',
hasPhoto: false,
timestamp: new Date().getTime()
}
let data = http_build_query(params_data);
let sign = crypto.HmacSHA256(data, SITE_API_SECRET).toString();
import collections
import urllib
import hmac
import hashlib
import binascii
def http_build_query(data):
dct = collections.OrderedDict()
for key, value in data.iteritems():
if isinstance(value, basestring):
dct[key] = value
elif isinstance(value, list):
for index, v in enumerate(value):
dct['{0}[{1}]'.format(key, index)] = v
return urllib.urlencode(dct)
def create_sha256_signature(key, message):
byte_key = binascii.unhexlify(key)
message = message.encode()
return hmac.new(byte_key, message, hashlib.sha256).hexdigest().upper()
params = {
'handle': 'women-shoe',
'limit': '20',
'page': '1',
'sortBy': 'id',
'orderBy': 'desc',
'stars': '3,4,5',
'hasPhoto': 'true',
'lang': 'en',
}
query_data = http_build_query(params)
sign = create_sha256_signature(SITE_API_SECRET, query_data)
The REST Client API lets you build apps, extensions or plugins to get reviews from the A2reviews APP. Including adding reviews to a store's products. It is used to import and export reviews through the API.
Site API Key and Site API Secret
For each website site or store is added to the A2Reviews application system or by the installation and connection method. Will generate default Site API Key and API secret. It looks like this:
- Site API Key: aTGu3hzrDhrbPqT4TDXHAYOoL
- Site API Secret: AbLXqdHHnGucaBL2s7ucxjSQMkydbkT0Gh4kauSZU2kuSu3ix2
How to build hmac in headers API
For example: In PHP
- Build from all data in an array of the data being sent.
- http_build_query - Generates a URL-encoded query string from the associative (or indexed) array provided.
- Create signature: hash_hmac — Generate a keyed hash value using the HMAC method
- $sign generated and sent with headers
- $headers = [...,"X-A2reviews-Hmac: {$sign}"]
Client Sites
APIs for client site, allows to get the settings global, setting languages.
Get global settings from a site
This API helps users get global settings from a site.
{endpoint}/v1/settings
Example request:
curl -X GET \
-G "https://api.a2rev.com/v1/settings" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.a2rev.com/v1/settings',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/settings"
);
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/settings'
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (404):
{
"success": false,
"message": "Site not found."
}
Example response (200):
{
"success": true,
"message": "Successfully.",
"data": {
"addition_languages": [
{
"code": "pt",
"name": "Portuguese"
},
{
"code": "th",
"name": "Thai"
},
{
"code": "af",
"name": "Afrikaans"
}
],
"lang_default": "en",
"widget": {
"isDark": false,
"loading_color": "orange",
"layout": "Masonry",
"paging_type": "paging",
"feature_layout": "Masonry",
"sort_images_first": true,
"order_latest": true,
"reviewsPerPage": 15,
"reviewsPerPageOnFeature": 15,
"date_format": "default",
"main_bgcolor": null,
"main_color": "",
"main_border": {
"active": 0,
"width": 1,
"type": "solid",
"color": "#999"
},
"main_border_radius": 0,
"width_type": "Full",
"width": "100%",
"max_width": "1200",
"main_margin_padding": {
"margin": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"font_size": "",
"notify_email_default": "",
"useCustomEmail": true,
"customEmail": "[email protected]",
"notify": {
"newReview": true,
"newQuestion": true,
"newReply": true
},
"senderName": "A2 Reviews",
"senderEmail": "[email protected]"
},
"widget_heading": {
"starStyle": "heart",
"starSize": 16,
"showTitle": {
"productPage": true,
"featurePage": true
},
"margin_padding": {
"margin": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
},
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"write_review_button": {
"textColor": "#EEF12E",
"bgcolor": "#DD1313",
"bgColorHover": "#ffb03b",
"color": "#FEC5C5",
"bgColor": "#1E1E1E",
"bgcolorHover": "#0BC20E"
},
"progress_bar": {
"color": "#9AE00E",
"bgcolor": "#c4c4c4"
},
"avg_star": {
"color": "#5AEE05",
"bgcolor": "#5AEE05"
},
"bgcolor": null,
"color": null,
"font_size": "",
"hideZeroCount": false,
"enable_bracket": true
},
"review_form": {
"disable": false,
"write_review_limit": "all",
"approval": false,
"write_one": false,
"deactivate_less_than": 2,
"bgcolor": null,
"color": null,
"star_color": {
"sp1": "#99A9BF",
"sp2": "#2AF779",
"sp3": "#5AEE05"
},
"font_size": ""
},
"reply_form": {
"status": true,
"disable": false,
"bgcolor": null,
"color": null,
"font_size": ""
},
"review_cards": {
"showImages": true,
"showTitle": true,
"bgcolor": null,
"color": null,
"font_size": "",
"starStyle": "awesome",
"rating_star": {
"status": true,
"style": "icon",
"color": "#ff9800",
"color_na": "#c4c4c4",
"size": 22
},
"customer_avatar": {
"status": true,
"type": "circle",
"size": "small",
"avatar_color_type": "One Color",
"avatar_color": "#0028A0"
},
"country_flag": {
"status": true
},
"like_button": {
"status": true
},
"verified_badge": {
"status": true,
"color": "#8BC34A"
},
"date_format": {
"status": true,
"type": "timeAgo"
},
"content_align": "left"
},
"questions": {
"enable": true,
"enable_leave_question": true,
"enable_leave_answer": true,
"questionPerPage": 15,
"ask_question_button": {
"icon": true,
"textColor": "#AAF105",
"bgColor": "#D01212",
"bgColorHover": "#0E3DE8",
"bgcolor": "#D20D0D",
"bgcolorHover": "#0004FF",
"color": "#77FF00"
},
"show_description": true,
"color": "#F26501",
"bgcolor": "#EFDDDD",
"main_border": {
"active": 1,
"width": 1,
"type": "solid",
"color": "#00BF56"
},
"main_border_radius": 0,
"main_margin_padding": {
"margin": {
"top": 20,
"right": 20,
"bottom": 20,
"left": 20
},
"padding": {
"top": 20,
"right": 20,
"bottom": 20,
"left": 20
}
},
"disable_leave_question": false,
"disable_leave_answer": false
},
"email_settings": {
"notify_email_default": "",
"useCustomEmail": true,
"customEmail": "[email protected]",
"customEmailStatus": "verified",
"notify": {
"newReview": true,
"newQuestion": true,
"newReply": true
},
"senderName": "A2Reviews.Net",
"senderEmail": "[email protected]",
"senderEmailStatus": "pending"
},
"csv_download_name": "{handle}-{datetime}.csv",
"feature_page": {
"layout_option": "custom",
"layout": "Masonry",
"reviewsPerPage": 20,
"page_id": 66554003561
}
}
}
HTTP Request
GET v1/settings
Get reviews languages
This API helps users get reviews languages.
{endpoint}/v1/languages/reviews
Example request:
curl -X GET \
-G "https://api.a2rev.com/v1/languages/reviews" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.a2rev.com/v1/languages/reviews',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/languages/reviews"
);
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/languages/reviews'
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (404):
{
"success": false,
"message": "Site not found."
}
Example response (200):
{
"success": true,
"message": "Successfully.",
"data": {
"de": {
"like": "Mögen",
"save": "Speichern",
"reply": "Antworten",
"cancel": "Stornieren",
"latest": "Neueste",
"oldest": "Älteste",
"photos": "Fotos",
"submit": "Einreichen",
"dislike": "Nicht mögen",
"feature": "Feature",
"loading": "Wird geladen...",
"replies": "Antworten",
"reviews": "Bewertungen",
"showing": "Zeigen",
"filter_by": "Filtern nach",
"load_more": "Mehr laden",
"label_1star": "1 Stern",
"label_2stars": "2 Sterne",
"label_3stars": "3 Sterne",
"label_4stars": "4 Sterne",
"label_5stars": "5 Sterne",
"widget_title": "A2 Bewertungen Widget!",
"click_to_sort": "Klicken Sie, um die zu sortieren ",
"message_liked": "Ihnen hat diese Bewertung gefallen.",
"no_more_reply": "Keine Antwort mehr",
"write_a_reply": "Eine Antwort schreiben",
"add_new_review": "Neue Bewertung hinzufügen",
"average_rating": "Durchschnittliche Bewertung",
"no_more_review": "Keine weitere Überprüfung",
"verified_buyer": "Verifizierter Käufer",
"filter_clear_all": "Alles löschen",
"reply_form_title": "Antwort überprüfen",
"write_new_review": "Neue Bewertung schreiben",
"not_found_reviews": "Keine passenden Bewertungen gefunden",
"filter_have_photos": "Fotos haben",
"message_email_valid": "Bitte geben Sie die korrekte E-Mail-Adresse ein",
"reply_form_label_name": "Name",
"reply_form_label_email": "Email",
"review_form_label_email": "Email",
"review_form_label_title": "Titel",
"message_thank_you_rating": "Vielen Dank für die Bewertung.",
"review_form_label_author": "Autorin",
"review_form_label_images": "Bilder",
"review_form_label_rating": "Bewertung",
"review_form_label_upload": "JPG \/ PNG-Dateien mit einer Größe von weniger als 3 MB",
"message_length_name_valid": "Die Länge sollte 3 bis 35 sein",
"review_form_label_content": "Inhalt",
"reply_form_msg_email_required": "Bitte geben Sie eine E-Mail",
"reply_form_msg_author_required": "Bitte geben Sie Ihren Namen ein",
"review_form_msg_email_required": "Bitte geben Sie eine E-Mail",
"review_form_msg_author_required": "Bitte geben Sie den Namen des Autors ein"
},
"en": {
"like": "Like",
"save": "Save",
"reply": "Reply",
"cancel": "Cancel",
"latest": "Latest",
"oldest": "Oldest",
"photos": "Photos",
"submit": "Submit",
"dislike": "Dislike",
"feature": "Feature",
"loading": "Loading...",
"replies": "Replies",
"reviews": "reviews",
"showing": "Showing",
"filter_by": "Filter by",
"load_more": "Load More",
"label_1star": "1 star",
"be_the_first": "Be the first to review this product.",
"label_2stars": "2 stars",
"label_3stars": "3 stars",
"label_4stars": "4 stars",
"label_5stars": "5 stars",
"widget_title": "Customer Reviews",
"click_to_sort": "Click to sort the ",
"message_liked": "You have liked this review.",
"no_more_reply": "No more reply",
"write_a_reply": "Write a reply",
"add_new_review": "Add A Review",
"average_rating": "Average rating",
"no_more_review": "No more review",
"verified_buyer": "Verified Buyer",
"filter_clear_all": "Clear all",
"reply_form_title": "Review Reply",
"write_new_review": "Write A Review",
"not_found_reviews": "No matching reviews found",
"filter_have_photos": "Have photos",
"message_email_valid": "Please input correct email address",
"reply_form_label_name": "Name",
"reply_form_label_email": "Email",
"review_form_label_email": "Email",
"review_form_label_title": "Title",
"message_thank_you_rating": "Thank you for rating.",
"review_form_label_author": "Author",
"review_form_label_images": "Images",
"review_form_label_rating": "Rating",
"review_form_label_upload": "JPG\/PNG files with a size less than 3Mb",
"message_length_name_valid": "Length should be 3 to 35",
"review_form_label_content": "Content",
"reply_form_msg_email_required": "Please input your email",
"reply_form_msg_author_required": "Please input your name",
"review_form_msg_email_required": "Please input email",
"review_form_msg_author_required": "Please input author name"
},
"fr": {
"like": "Comme",
"save": "Sauver",
"reply": "Répondre",
"cancel": "Annuler",
"latest": "Dernière",
"oldest": "Le plus ancien",
"photos": "Photos",
"submit": "Soumettre",
"dislike": "Ne pas aimer",
"feature": "Fonctionnalité",
"loading": "Chargement ...",
"replies": "Réponses",
"reviews": "avis",
"showing": "Montrant",
"filter_by": "Filtrer par",
"load_more": "Charger plus",
"label_1star": "1 étoile",
"label_2stars": "2 étoiles",
"label_3stars": "3 étoiles",
"label_4stars": "4 étoiles",
"label_5stars": "5 étoiles",
"widget_title": "Widget Avis A2!",
"click_to_sort": "Cliquez pour trier le ",
"message_liked": "Vous avez aimé cette critique.",
"no_more_reply": "Plus de réponse",
"write_a_reply": "Écrire une réponse",
"add_new_review": "Ajouter un nouvel avis",
"average_rating": "Note moyenne",
"no_more_review": "Pas plus d'avis",
"verified_buyer": "Acheteur vérifié",
"filter_clear_all": "Tout effacer",
"reply_form_title": "Répondre à la réponse",
"write_new_review": "Rédiger une nouvelle critique",
"not_found_reviews": "Aucun avis correspondant trouvé",
"filter_have_photos": "Avoir des photos",
"message_email_valid": "Veuillez saisir une adresse e-mail correcte",
"reply_form_label_name": "Prénom",
"reply_form_label_email": "Email",
"review_form_label_email": "Email",
"review_form_label_title": "Titre",
"message_thank_you_rating": "Merci pour votre évaluation.",
"review_form_label_author": "Auteure",
"review_form_label_images": "Images",
"review_form_label_rating": "Évaluation",
"review_form_label_upload": "Fichiers JPG \/ PNG d'une taille inférieure à 3Mb",
"message_length_name_valid": "La longueur doit être de 3 à 35",
"review_form_label_content": "Contenu",
"reply_form_msg_email_required": "Veuillez saisir votre email",
"reply_form_msg_author_required": "Veuillez saisir votre nom",
"review_form_msg_email_required": "Veuillez saisir un e-mail",
"review_form_msg_author_required": "Veuillez saisir le nom de l'auteur"
},
"jp": {
"like": "いいね",
"save": "セーブ",
"reply": "応答",
"cancel": "キャンセル",
"latest": "最新",
"oldest": "最古",
"photos": "写真",
"submit": "提出する",
"dislike": "嫌い",
"feature": "Feature",
"loading": "読み込み中...",
"replies": "返信",
"reviews": "レビュー",
"showing": "表示中",
"filter_by": "Filter by",
"load_more": "さらに読み込む",
"label_1star": "1つ星",
"label_2stars": "2つ星",
"label_3stars": "3つ星",
"label_4stars": "4つ星",
"label_5stars": "5つ星",
"widget_title": "A2レビューウィジェット!",
"click_to_sort": "クリックして並べ替え",
"message_liked": "You have liked this review.",
"no_more_reply": "これ以上の返信はありません",
"write_a_reply": "返事を書く",
"add_new_review": "新しいレビューを追加",
"average_rating": "平均評価",
"no_more_review": "これ以上のレビューはありません",
"verified_buyer": "確認済みの購入者",
"filter_clear_all": "Clear all",
"reply_form_title": "返信を確認",
"write_new_review": "新しいレビューを書く",
"not_found_reviews": "一致するレビューは見つかりませんでした",
"filter_have_photos": "Have photos",
"message_email_valid": "Please input correct email address",
"reply_form_label_name": "名",
"reply_form_label_email": "Eメール",
"review_form_label_email": "Eメール",
"review_form_label_title": "タイトル",
"message_thank_you_rating": "Thank you for rating.",
"review_form_label_author": "著者",
"review_form_label_images": "画像",
"review_form_label_rating": "格付け",
"review_form_label_upload": "サイズが3Mb未満のJPG \/ PNGファイル",
"message_length_name_valid": "Length should be 3 to 35",
"review_form_label_content": "コンテンツ",
"reply_form_msg_email_required": "Please input your email",
"reply_form_msg_author_required": "Please input your name",
"review_form_msg_email_required": "Please input email",
"review_form_msg_author_required": "Please input author name"
},
"ru": {
"like": "подобно",
"save": "Сохранить",
"reply": "Ответить",
"cancel": "Отмена",
"latest": "Последний",
"oldest": "самый старший",
"photos": "Фото",
"submit": "Разместить",
"dislike": "нелюбовь",
"feature": "Особенность",
"loading": "Загрузка ...",
"replies": "Ответы",
"reviews": "отзывы",
"showing": "показ",
"filter_by": "Сортировать по",
"load_more": "Загрузи больше",
"label_1star": "1 звезда",
"label_2stars": "2 звезд",
"label_3stars": "3 звезд",
"label_4stars": "4 звезд",
"label_5stars": "5 звезд",
"widget_title": "А2 Отзывы виджет!",
"click_to_sort": "Нажмите, чтобы отсортировать ",
"message_liked": "Вам понравился этот обзор.",
"no_more_reply": "Больше нет ответа",
"write_a_reply": "Напишите ответ",
"add_new_review": "Добавить новый отзыв",
"average_rating": "Средний рейтинг",
"no_more_review": "Нет больше обзора",
"verified_buyer": "Проверенный покупатель",
"filter_clear_all": "Очистить все",
"reply_form_title": "Отзыв Отзыв",
"write_new_review": "Написать новый отзыв",
"not_found_reviews": "Подходящих отзывов не найдено",
"filter_have_photos": "Есть фотографии",
"message_email_valid": "Пожалуйста, введите правильный адрес электронной почты",
"reply_form_label_name": "название",
"reply_form_label_email": "Эл. адрес",
"review_form_label_email": "Эл. адрес",
"review_form_label_title": "заглавие",
"message_thank_you_rating": "Спасибо за оценку.",
"review_form_label_author": "автор",
"review_form_label_images": "Картинки",
"review_form_label_rating": "Рейтинг",
"review_form_label_upload": "Файлы JPG \/ PNG размером менее 3 МБ",
"message_length_name_valid": "Длина должна быть от 3 до 35",
"review_form_label_content": "содержание",
"reply_form_msg_email_required": "Пожалуйста, введите адрес электронной почты",
"reply_form_msg_author_required": "Пожалуйста, введите ваше имя",
"review_form_msg_email_required": "Пожалуйста, введите адрес электронной почты",
"review_form_msg_author_required": "Пожалуйста, введите имя автора"
},
"vn": {
"like": "Thích",
"save": "Lưu",
"reply": "Trả lời",
"cancel": "Hủy Bỏ",
"latest": "Mới nhất",
"oldest": "Cũ nhất",
"photos": "Hình ảnh",
"submit": "Gửi",
"dislike": "Không thích",
"feature": "Feature",
"loading": "Đang tải...",
"replies": "Trả lời",
"reviews": "Đánh giá",
"showing": "Đang hiển thị",
"filter_by": "Filter by",
"load_more": "Tải thêm",
"label_1star": "1 sao",
"label_2stars": "2 sao",
"label_3stars": "3 sao",
"label_4stars": "4 sao",
"label_5stars": "5 sao",
"widget_title": "A2 Đánh giá widget!",
"click_to_sort": "Click để sắp xếp theo",
"message_liked": "You have liked this review.",
"no_more_reply": "Không có thêm trả lời",
"write_a_reply": "Viết trả lời",
"add_new_review": "Thêm đánh giá mới",
"average_rating": "Trung bình",
"no_more_review": "Không có thêm đánh giá",
"verified_buyer": "Đã xác thực",
"filter_clear_all": "Clear all",
"reply_form_title": "Trả lời đánh giá",
"write_new_review": "Viết đánh giá mới",
"not_found_reviews": "Không tìm thấy đánh giá",
"filter_have_photos": "Have photos",
"message_email_valid": "Please input correct email address",
"reply_form_label_name": "Tên",
"reply_form_label_email": "Email",
"review_form_label_email": "Email",
"review_form_label_title": "Tiêu đề",
"message_thank_you_rating": "Thank you for rating.",
"review_form_label_author": "Tác giả",
"review_form_label_images": "Hình ảnh",
"review_form_label_rating": "Đánh giá",
"review_form_label_upload": "Các files JPG\/PNG có kích thước không quá 3MB",
"message_length_name_valid": "Length should be 3 to 35",
"review_form_label_content": "Nội dung",
"reply_form_msg_email_required": "Please input your email",
"reply_form_msg_author_required": "Please input your name",
"review_form_msg_email_required": "Please input email",
"review_form_msg_author_required": "Please input author name"
},
"zh": {
"like": "喜欢",
"save": "保存",
"reply": "回复",
"cancel": "取消",
"latest": "最新",
"oldest": "最老的",
"photos": "相片",
"submit": "提交",
"dislike": "不喜欢",
"feature": "特征",
"loading": "载入中...",
"replies": "回覆",
"reviews": "评论",
"showing": "显示中",
"filter_by": "过滤",
"load_more": "装载更多",
"label_1star": "1星",
"be_the_first": "成为第一个评论该产品。",
"label_2stars": "2星",
"label_3stars": "3星",
"label_4stars": "4星",
"label_5stars": "5星",
"widget_title": "A2评论小部件",
"click_to_sort": "点击排序 ",
"message_liked": "您喜欢此评论。",
"no_more_reply": "没有更多回覆",
"write_a_reply": "写回信",
"add_new_review": "新增评论",
"average_rating": "平均评分",
"no_more_review": "没有更多评论",
"verified_buyer": "验证买家",
"filter_clear_all": "全部清除",
"reply_form_title": "查看回复",
"write_new_review": "新增评论",
"not_found_reviews": "找不到匹配的评论",
"filter_have_photos": "有照片",
"message_email_valid": "请输入正确的电子邮件地址",
"reply_form_label_name": "名称",
"reply_form_label_email": "电子邮件",
"review_form_label_email": "电子邮件",
"review_form_label_title": "标题",
"message_thank_you_rating": "感谢您的评分。",
"review_form_label_author": "作者",
"review_form_label_images": "图片",
"review_form_label_rating": "评分",
"review_form_label_upload": "大小小于3Mb的JPG \/ PNG文件",
"message_length_name_valid": "长度应为3到35",
"review_form_label_content": "内容",
"products_have_best_reviews": "产品评论最好",
"reply_form_msg_email_required": "请输入您的电子邮件",
"reply_form_msg_author_required": "请输入你的名字",
"review_form_msg_email_required": "请输入电子邮件",
"review_form_msg_author_required": "请输入作者姓名"
},
"pt": {
"add_new_review": "Adicionar um comentário",
"average_rating": "Classificação média",
"be_the_first": "Seja o primeiro a comentar este produto.",
"cancel": "Cancelar",
"click_to_sort": "Clique para classificar o",
"dislike": "Não gosto",
"feature": "Característica",
"filter_by": "Filtrar por",
"filter_clear_all": "Limpar tudo",
"filter_have_photos": "Tem fotos",
"label_1star": "1 estrela",
"label_2stars": "2 estrelas",
"label_3stars": "3 estrelas",
"label_4stars": "4 estrelas",
"label_5stars": "5 estrelas",
"latest": "Mais recentes",
"like": "Gostar",
"load_more": "Carregue mais",
"loading": "Carregando...",
"message_email_valid": "Insira o endereço de e-mail correto",
"message_length_name_valid": "O comprimento deve ser de 3 a 35",
"message_liked": "Você gostou deste comentário.",
"message_thank_you_rating": "Obrigado por avaliar.",
"no_more_reply": "Sem mais resposta",
"no_more_review": "Não há mais revisão",
"not_found_reviews": "Nenhum comentário correspondente encontrado",
"oldest": "Mais velho",
"photos": "Fotos",
"products_have_best_reviews": "Os produtos têm as melhores críticas",
"replies": "Respostas",
"reply": "Resposta",
"reply_form_label_email": "O email",
"reply_form_label_name": "Nome",
"reply_form_msg_author_required": "Por favor coloque seu nome",
"reply_form_msg_email_required": "Por favor insira seu email",
"reply_form_title": "Rever resposta",
"review_form_label_author": "Autor",
"review_form_label_content": "Conteúdo",
"review_form_label_email": "O email",
"review_form_label_images": "Imagens",
"review_form_label_rating": "Avaliação",
"review_form_label_title": "Título",
"review_form_label_upload": "Arquivos JPG \/ PNG com tamanho inferior a 3 MB",
"review_form_msg_author_required": "Insira o nome do autor",
"review_form_msg_email_required": "Por favor insira o email",
"reviews": "avaliações",
"save": "Salve ",
"showing": "Mostrando",
"submit": "Enviar",
"verified_buyer": "Comprador Verificado",
"widget_title": "Opinião dos consumidores",
"write_a_reply": "Escreva uma resposta",
"write_new_review": "Escreva uma crítica"
},
"th": {
"add_new_review": "เพิ่มบทวิจารณ์",
"average_rating": "คะแนนเฉลี่ย",
"be_the_first": "เป็นคนแรกที่วิจารณ์สินค้านี้.",
"cancel": "ยกเลิก",
"click_to_sort": "คลิกเพื่อจัดเรียงไฟล์",
"dislike": "ไม่ชอบ",
"feature": "ลักษณะเฉพาะ",
"filter_by": "กรองตาม",
"filter_clear_all": "ลบทั้งหมด",
"filter_have_photos": "มีรูปถ่าย",
"label_1star": "1 ดาว",
"label_2stars": "2 ดาว",
"label_3stars": "3 ดาว",
"label_4stars": "4 ดาว",
"label_5stars": "5 ดาว",
"latest": "ล่าสุด",
"like": "ชอบ",
"load_more": "โหลดเพิ่มเติม",
"loading": "กำลังโหลด ...",
"message_email_valid": "กรุณากรอกที่อยู่อีเมลที่ถูกต้อง",
"message_length_name_valid": "ความยาวควรอยู่ที่ 3 ถึง 35",
"message_liked": "คุณชอบบทวิจารณ์นี้",
"message_thank_you_rating": "ขอบคุณสำหรับการให้คะแนน",
"no_more_reply": "ไม่มีการตอบกลับ",
"no_more_review": "ไม่มีการตรวจสอบเพิ่มเติม",
"no_reviews": "ไม่มีบทวิจารณ์",
"not_found_reviews": "ไม่พบบทวิจารณ์ที่ตรงกัน",
"oldest": "เก่าที่สุด",
"photos": "รูปถ่าย",
"products_have_best_reviews": "สินค้ามีรีวิวดีที่สุด",
"replies": "ตอบกลับ",
"reply": "ตอบ",
"reply_form_label_email": "อีเมล์",
"reply_form_label_name": "ชื่อ",
"reply_form_msg_author_required": "กรุณาใส่ชื่อของคุณ",
"reply_form_msg_email_required": "กรุณากรอกอีเมลของคุณ",
"reply_form_title": "ตอบรีวิว",
"review_form_label_author": "ผู้เขียน",
"review_form_label_content": "เนื้อหา",
"review_form_label_email": "อีเมล์",
"review_form_label_images": "รูปภาพ",
"review_form_label_rating": "คะแนน",
"review_form_label_title": "หัวข้อ",
"review_form_label_upload": "ไฟล์ JPG \/ PNG ที่มีขนาดน้อยกว่า 3Mb",
"review_form_msg_author_required": "กรุณาใส่ชื่อผู้แต่ง",
"review_form_msg_email_required": "กรุณากรอกอีเมล",
"reviews": "บทวิจารณ์",
"save": "บันทึก",
"showing": "กำลังแสดง",
"submit": "ส่ง",
"verified_buyer": "ผู้ซื้อที่ได้รับการยืนยัน",
"widget_title": "ความคิดเห็นของลูกค้า",
"write_a_reply": "เขียนตอบกลับ",
"write_new_review": "แสดงความคิดเห็น"
}
}
}
HTTP Request
GET v1/languages/reviews
Get questions answers language
This API helps users get questions answers language.
{endpoint}/v1/languages/qa
Example request:
curl -X GET \
-G "https://api.a2rev.com/v1/languages/qa" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.a2rev.com/v1/languages/qa',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/languages/qa"
);
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/languages/qa'
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (404):
{
"success": false,
"message": "Site not found."
}
Example response (200):
{
"success": true,
"message": "Successfully.",
"data": {
"vi": {
"qa_answer": "Câu trả lời",
"qa_answers": "Đáp án",
"qa_ask_a_question": "Đặt một câu hỏi",
"qa_author": "Tác giả",
"qa_cancel": "Hủy bỏ",
"qa_description": "Sự miêu tả",
"qa_email": "E-mail",
"qa_enter_description": "Nhập mô tả",
"qa_enter_your_comment": "Nhập bình luận của bạn",
"qa_enter_your_email": "Nhập email của bạn",
"qa_enter_your_name": "Điền tên của bạn",
"qa_enter_your_question": "Nhập câu hỏi của bạn",
"qa_enter_your_question_here": "Nhập câu hỏi của bạn ở đây",
"qa_favorite": "Yêu thích",
"qa_latest": "Muộn nhất",
"qa_leave_an_answer": "Để lại một câu trả lời",
"qa_msg_answer_sent_success": "Câu trả lời của bạn đã được gửi thành công.",
"qa_msg_enter_email_valid": "Vui lòng nhập một email hợp lệ.",
"qa_msg_enter_your_comment": "Vui lòng nhập bình luận của bạn",
"qa_msg_error_occurred": "Đã xảy ra lỗi không mong muốn.",
"qa_msg_fill_required_fields": "Vui lòng điền vào các trường bắt buộc",
"qa_msg_length_50_to_500": "Độ dài phải từ 50 đến 500",
"qa_no_question_results": "Kết quả tìm kiếm không khớp hoặc không có câu hỏi nào.",
"qa_no_questions_found": "Không có câu hỏi nào được tìm thấy",
"qa_of": "của",
"qa_oldest": "Cũ nhất",
"qa_order_by": "Đặt bởi",
"qa_post_your_answer": "Gửi câu trả lời của bạn",
"qa_question": "Câu hỏi",
"qa_questions": "Câu hỏi",
"qa_report": "Báo cáo",
"qa_report_description_text": "Vui lòng giải thích ngắn gọn lý do tại sao bạn cảm thấy câu hỏi này nên được báo cáo.",
"qa_showing": "Đang hiển thị",
"qa_submit": "Gửi đi",
"qa_view_answers": "Xem câu trả lời",
"qa_website": "Trang mạng",
"qa_widget_title": "Câu hỏi và trả lời",
"qa_write_a_question": "Viết một câu hỏi"
},
"ja": {
"qa_answer": "回答",
"qa_answers": "答え",
"qa_ask_a_question": "質問する",
"qa_author": "著者",
"qa_cancel": "キャンセル",
"qa_description": "説明",
"qa_email": "Eメール",
"qa_enter_description": "説明を入力してください",
"qa_enter_your_comment": "コメントを入力してください",
"qa_enter_your_email": "メールアドレスを入力",
"qa_enter_your_name": "あなたの名前を入力してください",
"qa_enter_your_question": "質問を入力してください",
"qa_enter_your_question_here": "ここに質問を入力してください",
"qa_favorite": "お気に入り",
"qa_latest": "最新",
"qa_leave_an_answer": "答えを残す",
"qa_msg_answer_sent_success": "回答が送信されました。",
"qa_msg_enter_email_valid": "有効なメールアドレスを入力してください。",
"qa_msg_enter_your_comment": "コメントを入力してください",
"qa_msg_error_occurred": "予期しないエラーが発生しました。",
"qa_msg_fill_required_fields": "必須フィールドに記入してください",
"qa_msg_length_50_to_500": "長さは50〜500にする必要があります",
"qa_no_question_results": "検索結果が一致しないか、質問がありません。",
"qa_no_questions_found": "質問は見つかりませんでした",
"qa_of": "の",
"qa_oldest": "最古",
"qa_order_by": "並べ替え",
"qa_post_your_answer": "回答を投稿してください",
"qa_question": "質問",
"qa_questions": "ご質問",
"qa_report": "報告する",
"qa_report_description_text": "この質問を報告する必要があると思う理由を簡単に説明してください。",
"qa_showing": "表示中",
"qa_submit": "参加する",
"qa_view_answers": "回答を見る",
"qa_website": "ウェブサイト",
"qa_widget_title": "質問と答え",
"qa_write_a_question": "質問を書く"
},
"th": {
"qa_answer": "ตอบ",
"qa_answers": "คำตอบ",
"qa_ask_a_question": "ถามคำถาม",
"qa_author": "ผู้เขียน",
"qa_cancel": "ยกเลิก",
"qa_description": "ลักษณะ",
"qa_email": "อีเมล์",
"qa_enter_description": "ป้อนคำอธิบาย",
"qa_enter_your_comment": "ป้อนความคิดเห็นของคุณ",
"qa_enter_your_email": "กรอกอีเมล์ของคุณ",
"qa_enter_your_name": "ใส่ชื่อของคุณ",
"qa_enter_your_question": "ป้อนคำถามของคุณ",
"qa_enter_your_question_here": "ป้อนคำถามของคุณที่นี่",
"qa_favorite": "ที่ชื่นชอบ",
"qa_latest": "ล่าสุด",
"qa_leave_an_answer": "ทิ้งคำตอบไว้",
"qa_msg_answer_sent_success": "คำตอบของคุณถูกส่งเรียบร้อยแล้ว",
"qa_msg_enter_email_valid": "กรุณาใส่อีเมลที่ถูกต้อง",
"qa_msg_enter_your_comment": "กรุณาใส่ความคิดเห็นของคุณ",
"qa_msg_error_occurred": "เกิดความผิดพลาดอย่างไม่ได้คาดคิด.",
"qa_msg_fill_required_fields": "กรุณากรอกข้อมูลที่จำเป็น",
"qa_msg_length_50_to_500": "ความยาวควรเป็น 50 ถึง 500",
"qa_no_question_results": "ผลการค้นหาไม่ตรงกันหรือไม่มีคำถาม",
"qa_no_questions_found": "ไม่พบคำถาม",
"qa_of": "ของ",
"qa_oldest": "เก่าแก่ที่สุด",
"qa_order_by": "สั่งโดย",
"qa_post_your_answer": "โพสต์คำตอบของคุณ",
"qa_question": "คำถาม",
"qa_questions": "คำถาม",
"qa_report": "รายงาน",
"qa_report_description_text": "โปรดอธิบายสั้น ๆ ว่าเหตุใดคุณจึงควรรายงานคำถามนี้",
"qa_showing": "การแสดง",
"qa_submit": "เสนอ",
"qa_view_answers": "ดูคำตอบ",
"qa_website": "เว็บไซต์",
"qa_widget_title": "คำถามและคำตอบ",
"qa_write_a_question": "เขียนคำถาม"
},
"ko": {
"qa_answer": "대답",
"qa_answers": "대답",
"qa_ask_a_question": "질문하기",
"qa_author": "저자",
"qa_cancel": "취소",
"qa_description": "기술",
"qa_email": "이메일",
"qa_enter_description": "설명을 입력하십시오",
"qa_enter_your_comment": "귀하의 의견을 입력하십시오",
"qa_enter_your_email": "이메일을 입력하십시오",
"qa_enter_your_name": "당신의 이름을 입력",
"qa_enter_your_question": "질문을 입력하십시오",
"qa_enter_your_question_here": "여기에 질문을 입력하십시오",
"qa_favorite": "인기 있는 말",
"qa_latest": "최근",
"qa_leave_an_answer": "답변을 남겨주세요",
"qa_msg_answer_sent_success": "답변이 성공적으로 발송되었습니다.",
"qa_msg_enter_email_valid": "유효한 이메일을 입력하십시오.",
"qa_msg_enter_your_comment": "의견을 입력하십시오",
"qa_msg_error_occurred": "예기치 않은 오류가 발생했습니다.",
"qa_msg_fill_required_fields": "필수 입력란을 작성하십시오",
"qa_msg_length_50_to_500": "길이는 50 ~ 500이어야합니다",
"qa_no_question_results": "검색 결과가 일치하지 않거나 질문이 없습니다.",
"qa_no_questions_found": "질문이 없습니다",
"qa_of": "의",
"qa_oldest": "가장 오래된",
"qa_order_by": "주문",
"qa_post_your_answer": "답변 게시",
"qa_question": "질문",
"qa_questions": "질문",
"qa_report": "보고서",
"qa_report_description_text": "이 질문이보고되어야한다고 생각하는 이유를 간략하게 설명하십시오.",
"qa_showing": "전시",
"qa_submit": "제출",
"qa_view_answers": "답변보기",
"qa_website": "웹 사이트",
"qa_widget_title": "질문과 답변",
"qa_write_a_question": "질문 쓰기"
}
}
}
HTTP Request
GET v1/languages/qa
Get common languages
This API helps users get common languages.
{endpoint}/v1/languages/common
Example request:
curl -X GET \
-G "https://api.a2rev.com/v1/languages/common" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.a2rev.com/v1/languages/common',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/languages/common"
);
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/languages/common'
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (404):
{
"success": false,
"message": "Site not found."
}
Example response (200):
{
"success": true,
"message": "Successfully.",
"data": {
"vi": {
"cancel": "Hủy bỏ",
"code": "Mã",
"confirm_code_verify": "Mã xác minh",
"confirm_password": "Xác nhận mật khẩu",
"customer": "khách hàng",
"customer_login": "Đăng nhập của khách hàng",
"email": "E-mail",
"forgot_password": "Quên mật khẩu",
"hello": "xin chào",
"login": "Đăng nhập",
"logout": "Đăng xuất",
"msg_input_code": "Vui lòng nhập mã",
"msg_input_cpassword": "Vui lòng nhập mật khẩu xác nhận",
"msg_input_email": "Vui lòng nhập email của bạn",
"msg_input_name": "Vui lòng nhập tên của bạn",
"msg_input_password": "Vui lòng nhập mật khẩu",
"msg_length": "Độ dài phải là {từ} đến {đến}",
"msg_length_character": "Độ dài phải là {Count} ký tự",
"msg_register_success": "Đăng ký tài khoản thành công",
"msg_valid_email": "Vui lòng nhập địa chỉ email chính xác",
"name": "Tên",
"notify_check_mailbox": "Vui lòng kiểm tra hộp thư điện tử của bạn để lấy mã",
"password": "Mật khẩu",
"register": "Đăng ký",
"remember": "Nhớ lại",
"send_request": "Gửi yêu cầu",
"your_name": "Tên của bạn"
},
"ja": {
"cancel": "キャンセル",
"code": "コード",
"confirm_code_verify": "コード検証",
"confirm_password": "パスワードを認証する",
"customer": "お客様",
"customer_login": "お客様ログイン",
"email": "Eメール",
"forgot_password": "パスワードをお忘れですか",
"hello": "こんにちは",
"login": "ログインする",
"logout": "ログアウト",
"msg_input_code": "コードを入力してください",
"msg_input_cpassword": "確認パスワードを入力してください",
"msg_input_email": "メールアドレスを入力してください",
"msg_input_name": "名前を入力してください",
"msg_input_password": "パスワードを入力してください",
"msg_length": "長さは{from}から{to}でなければなりません",
"msg_length_character": "長さは{count}文字である必要があります",
"msg_register_success": "アカウント登録に成功しました",
"msg_valid_email": "正しいメールアドレスを入力してください",
"name": "名前",
"notify_check_mailbox": "コードを取得するにはメールボックスをチェックしてください",
"password": "パスワード",
"register": "登録",
"remember": "覚えて",
"send_request": "リクエストを送信",
"your_name": "あなたの名前"
},
"ko": {
"cancel": "취소",
"code": "암호",
"confirm_code_verify": "코드 확인",
"confirm_password": "비밀번호 확인",
"customer": "고객",
"customer_login": "고객 로그인",
"email": "이메일",
"forgot_password": "비밀번호를 잊으 셨나요",
"hello": "여보세요",
"login": "로그인",
"logout": "로그 아웃",
"msg_input_code": "코드를 입력하십시오",
"msg_input_cpassword": "확인 비밀번호를 입력하십시오",
"msg_input_email": "이메일을 입력 해주세요",
"msg_input_name": "이름을 입력 해주세요",
"msg_input_password": "비밀번호를 입력하십시오",
"msg_length": "길이는 {에서}에서 {to} 사이 여야합니다.",
"msg_length_character": "길이는 {count} 자 여야합니다.",
"msg_register_success": "계정 등록 성공",
"msg_valid_email": "정확한 이메일 주소를 입력하십시오",
"name": "이름",
"notify_check_mailbox": "코드를 받으려면 이메일 상자를 확인하십시오",
"password": "암호",
"register": "레지스터",
"remember": "생각해 내다",
"send_request": "요청 보내기",
"your_name": "당신의 이름"
},
"th": {
"cancel": "ยกเลิก",
"code": "รหัส",
"confirm_code_verify": "ตรวจสอบรหัส",
"confirm_password": "ยืนยันรหัสผ่าน",
"customer": "ลูกค้า",
"customer_login": "ลูกค้าเข้าสู่ระบบ",
"email": "อีเมล์",
"forgot_password": "ลืมรหัสผ่าน",
"hello": "สวัสดี",
"login": "เข้าสู่ระบบ",
"logout": "ออกจากระบบ",
"msg_input_code": "กรุณาใส่รหัส",
"msg_input_cpassword": "กรุณาใส่รหัสผ่านยืนยัน",
"msg_input_email": "กรุณาใส่อีเมลของคุณ",
"msg_input_name": "กรุณาใส่ชื่อของคุณ",
"msg_input_password": "กรุณาใส่รหัสผ่าน",
"msg_length": "ความยาวควรเป็น {from} ถึง {to}",
"msg_length_character": "ความยาวควรเป็นอักขระ {count}",
"msg_register_success": "การลงทะเบียนบัญชีสำเร็จ",
"msg_valid_email": "กรุณาใส่ที่อยู่อีเมลที่ถูกต้อง",
"name": "ชื่อ",
"notify_check_mailbox": "โปรดทำเครื่องหมายในช่องอีเมลของคุณเพื่อรับรหัส",
"password": "รหัสผ่าน",
"register": "สมัครสมาชิก",
"remember": "จำ",
"send_request": "ส่งคำร้อง",
"your_name": "ชื่อของคุณ"
}
}
}
HTTP Request
GET v1/languages/common
Product Reviews
APIs for reviews of product, allows to get the reviews of a product or all products. Make it possible to deploy on different platforms.
Get product reviews
This API helps users get reviews of a product.
{endpoint}/v1/reviews?handle={product-handle}&page=1&limit=20&sortBy=id&&orderBy=desc&stars=1&hasPhoto=true&lang=en
Example request:
curl -X GET \
-G "https://api.a2rev.com/v1/reviews?handle=women-shoe&page=1&limit=20&sortBy=id&orderBy=desc&stars=3%2C4%2C5&hasPhoto=true&lang=en" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.a2rev.com/v1/reviews',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
],
'query' => [
'handle'=> 'women-shoe',
'page'=> '1',
'limit'=> '20',
'sortBy'=> 'id',
'orderBy'=> 'desc',
'stars'=> '3,4,5',
'hasPhoto'=> 'true',
'lang'=> 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/reviews"
);
let params = {
"handle": "women-shoe",
"page": "1",
"limit": "20",
"sortBy": "id",
"orderBy": "desc",
"stars": "3,4,5",
"hasPhoto": "true",
"lang": "en",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/reviews'
params = {
'handle': 'women-shoe',
'page': '1',
'limit': '20',
'sortBy': 'id',
'orderBy': 'desc',
'stars': '3,4,5',
'hasPhoto': 'true',
'lang': 'en',
}
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (404):
{
"success": false,
"message": "Not found product handle."
}
Example response (200):
{
"success": true,
"message": "Successfully.",
"data": {
"reviews": [
{
"id": "03774860-a48a-4c04-82d2-18bd71a27e93",
"title": "csdcds",
"content": "cdscdsc",
"rating": 5,
"author": "Tai",
"email": "[email protected]",
"images": [
"https:\/\/cdn.a2rev.com\/images\/a2-vewjifqzvgjb1nxf.jpg",
"https:\/\/cdn.a2rev.com\/images\/a2-gbewzgcfm7hy8jek.jpg"
],
"active": 1,
"created_at": "2021-08-31 18:12:12"
}
],
"images": [],
"info": {
"handle": "100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017",
"page": 1,
"total": 3,
"limit": 1
}
}
}
HTTP Request
GET v1/reviews
Query Parameters
Parameter | Status | Description |
---|---|---|
handle |
required | The handle of product. |
page |
optional | The page number to return. Default is 1. |
limit |
optional | The number of record per page. Default is 20. |
sortBy |
optional | Field to sort by. Default is 'id'. |
orderBy |
optional | Data order by type 'asc' or 'desc'. Default is 'desc'. |
stars |
optional | Number star of rating include 1,2,3,4,5 star. |
hasPhoto |
optional | Option get photo type boolean. Default is false. |
lang |
optional | Your language code. Default is 'en'. |
Write review to product
This API allows users to write reviews for a product.
{endpoint}/v1/reviews
Example request:
curl -X POST \
"https://api.a2rev.com/v1/reviews" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }" \
-H "Content-Type: application/json" \
-d '{"review":{"rating":2,"author":"Charles Diya","email":"[email protected]","title":"This product is the best. I like it.","content":"This product is the best. Very good product.","avatar":"https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c","images":["https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c"]},"handle":"100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017"}'
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.a2rev.com/v1/reviews',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
'Content-Type' => 'application/json',
],
'json' => [
'review' => [
'rating' => 2,
'author' => 'Charles Diya',
'email' => '[email protected]',
'title' => 'This product is the best. I like it.',
'content' => 'This product is the best. Very good product.',
'avatar' => 'https://lh3.googleusercontent.com/a-/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c',
'images' => [
'https://lh3.googleusercontent.com/a-/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c',
],
],
'handle' => '100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/reviews"
);
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"review": {
"rating": 2,
"author": "Charles Diya",
"email": "[email protected]",
"title": "This product is the best. I like it.",
"content": "This product is the best. Very good product.",
"avatar": "https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c",
"images": [
"https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c"
]
},
"handle": "100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/reviews'
payload = {
"review": {
"rating": 2,
"author": "Charles Diya",
"email": "[email protected]",
"title": "This product is the best. I like it.",
"content": "This product is the best. Very good product.",
"avatar": "https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c",
"images": [
"https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c"
]
},
"handle": "100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017"
}
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (400):
{
"success": false,
"message": "The handle field is required."
}
Example response (400):
{
"success": false,
"message": "The review field is required."
}
Example response (400):
{
"success": false,
"message": "The title field is required."
}
Example response (200):
{
"success": true,
"message": "Successfully to reviews",
"data": {
"review": {
"id": "dbea48c7-3776-470f-ad46-d2045ae8a9ef",
"email": "[email protected]",
"title": "This product is the best. I like it.",
"active": 1,
"author": "Charles Diya",
"avatar": "https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c",
"gender": "F",
"handle": "100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017",
"images": [
"https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c"
],
"rating": 2,
"source": "customer",
"content": "This product is the best. Very good product.",
"feature": 0,
"customer": 1,
"anonymous": false,
"created_at": "2021-09-23 02:15:29",
"country_code": "Unknown"
}
}
}
HTTP Request
POST v1/reviews
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
review.rating |
integer | required | The rating of review with star 1,2,3,4 or 5. |
review.author |
string | required | The name of author reviewed. |
review.email |
required | The email of author reviewed. | |
review.title |
string | required | The title of review. |
review.content |
string | optional | The content of review. |
review.avatar |
string | optional | The avatar of author. |
review.images.* |
string | optional | The images of review. |
handle |
string | required | The handle of product. |
Update a review
This API allows users to update review by id for product.
{endpoint}/v1/reviews/{id}
Example request:
curl -X PUT \
"https://api.a2rev.com/v1/reviews/dbea48c7-3776-470f-ad46-d2045ae8a9ef" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }" \
-H "Content-Type: application/json" \
-d '{"review":{"author":"Charles Diya","email":"[email protected]","title":"Very good.","content":"This product is the best. Very good product.","avatar":"https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c","images":["https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c"]},"handle":"100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017"}'
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.a2rev.com/v1/reviews/dbea48c7-3776-470f-ad46-d2045ae8a9ef',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
'Content-Type' => 'application/json',
],
'json' => [
'review' => [
'author' => 'Charles Diya',
'email' => '[email protected]',
'title' => 'Very good.',
'content' => 'This product is the best. Very good product.',
'avatar' => 'https://lh3.googleusercontent.com/a-/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c',
'images' => [
'https://lh3.googleusercontent.com/a-/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c',
],
],
'handle' => '100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/reviews/dbea48c7-3776-470f-ad46-d2045ae8a9ef"
);
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"review": {
"author": "Charles Diya",
"email": "[email protected]",
"title": "Very good.",
"content": "This product is the best. Very good product.",
"avatar": "https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c",
"images": [
"https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c"
]
},
"handle": "100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/reviews/dbea48c7-3776-470f-ad46-d2045ae8a9ef'
payload = {
"review": {
"author": "Charles Diya",
"email": "[email protected]",
"title": "Very good.",
"content": "This product is the best. Very good product.",
"avatar": "https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c",
"images": [
"https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c"
]
},
"handle": "100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017"
}
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }',
'Content-Type': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (404):
{
"success": false,
"message": "Product not found."
}
Example response (404):
{
"success": false,
"message": "Review not found."
}
Example response (400):
{
"success": false,
"message": "The handle field is required."
}
Example response (400):
{
"success": false,
"message": "The review field is required."
}
Example response (400):
{
"success": false,
"message": "The title field is required."
}
Example response (200):
{
"success": true,
"message": "Successfully.",
"data": {
"review": {
"id": "dbea48c7-3776-470f-ad46-d2045ae8a9ef",
"email": "[email protected]",
"title": "Very good",
"active": 1,
"author": "Charles Diya",
"avatar": "https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c",
"gender": "F",
"handle": "100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017",
"images": [
"https:\/\/lh3.googleusercontent.com\/a-\/AOh14Gi9M0NY_0vcKvDlguWz5QzZUTxJ3myc9pZkWKSmwA=s96-c"
],
"rating": 2,
"source": "customer",
"content": "This product is the best. Very good product.",
"feature": 0,
"customer": 1,
"anonymous": false,
"created_at": "2021-09-23 09:29:14",
"country_code": "Unknown"
}
}
}
HTTP Request
PUT v1/reviews/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | The review id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
review.author |
string | required | The name of author reviewed. |
review.email |
required | The email of author reviewed. | |
review.title |
string | required | The title of review. |
review.content |
string | optional | The content of review. |
review.avatar |
string | optional | The avatar of author. |
review.images.* |
string | optional | The images of review. |
handle |
string | required | The handle of product. |
Upload image to a review
This API allows users to update review by id for product.
{endpoint}/v1/review-images
Example request:
curl -X POST \
"https://api.a2rev.com/v1/review-images" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }" \
-H "Content-Type: application/json" \
-d '{"review_id":"dbea48c7-3776-470f-ad46-d2045ae8a9ef","handle":"100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017"}'
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.a2rev.com/v1/review-images',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
'Content-Type' => 'application/json',
],
'json' => [
'review_id' => 'dbea48c7-3776-470f-ad46-d2045ae8a9ef',
'handle' => '100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/review-images"
);
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"review_id": "dbea48c7-3776-470f-ad46-d2045ae8a9ef",
"handle": "100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/review-images'
payload = {
"review_id": "dbea48c7-3776-470f-ad46-d2045ae8a9ef",
"handle": "100-cotton-digging-the-moon-print-casual-mens-o-neck-t-shirts-fashion-mens-tops-men-t-shirt-short-sleeve-men-tshirt-2017"
}
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (404):
{
"success": false,
"message": "Product not found."
}
Example response (404):
{
"success": false,
"message": "Review not found."
}
Example response (400):
{
"success": false,
"message": "The handle field is required."
}
Example response (400):
{
"success": false,
"message": "The review id field is required."
}
Example response (400):
{
"success": false,
"message": "The image field is required."
}
HTTP Request
POST v1/review-images
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
review_id |
string | required | The id of review. |
handle |
string | required | The handle of product. |
Get feature reviews
This API helps users get reviews is enabled as a feature. It requires some parameters as have been listed below.
{endpoint}/v1/feature-reviews?page=1&limit=20&sortBy=id&&orderBy=desc&stars=1&hasPhoto=true&lang=en
Example request:
curl -X GET \
-G "https://api.a2rev.com/v1/feature-reviews?page=1&limit=20&sortBy=id&orderBy=desc&stars=3%2C4%2C5&hasPhoto=true&lang=en" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.a2rev.com/v1/feature-reviews',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
],
'query' => [
'page'=> '1',
'limit'=> '20',
'sortBy'=> 'id',
'orderBy'=> 'desc',
'stars'=> '3,4,5',
'hasPhoto'=> 'true',
'lang'=> 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/feature-reviews"
);
let params = {
"page": "1",
"limit": "20",
"sortBy": "id",
"orderBy": "desc",
"stars": "3,4,5",
"hasPhoto": "true",
"lang": "en",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/feature-reviews'
params = {
'page': '1',
'limit': '20',
'sortBy': 'id',
'orderBy': 'desc',
'stars': '3,4,5',
'hasPhoto': 'true',
'lang': 'en',
}
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (200):
{
"success": true,
"message": "Successfully.",
"data": {
"reviews": [
{
"id": "6b64545c-8cd8-41f5-8d2e-0aef60ce7f94",
"title": "Color: And Silicon Strap Ships From: Spain Logistics: Entrega Local",
"content": "Received ahead of schedule, apparently everything ok. I 'd buy this salesman again. In the absence of further testing, started and updated correctly.",
"rating": 5,
"author": "J***s",
"email": "[email protected]",
"images": [
"https:\/\/ae01.alicdn.com\/kf\/U223401115b504031a7cc3733852cba1eC.jpg",
"https:\/\/ae01.alicdn.com\/kf\/U9d2eb61bf3ba49148bec894decb96f26P.jpg"
],
"active": 1,
"feature": 1,
"created_at": "31 Jul 2019 08:06"
}
],
"images": [],
"info": {
"page": 1,
"total": 40,
"limit": 1
}
}
}
HTTP Request
GET v1/feature-reviews
Query Parameters
Parameter | Status | Description |
---|---|---|
page |
optional | The page number to return. Default is 1. |
limit |
optional | The number of record per page. Default is 20. |
sortBy |
optional | Field to sort by. Default is 'id'. |
orderBy |
optional | Data order by type 'asc' or 'desc'. Default is 'desc'. |
stars |
optional | Number star of rating include 1,2,3,4,5 star. |
hasPhoto |
optional | Option get photo type boolean. Default is false. |
lang |
optional | Your language code. Default is 'en'. |
Get block list reviews
This API helps users get list of blocks review.
{endpoint}/v1/blocks?page=1&limit=2&sortBy=id&orderBy=desc
Example request:
curl -X GET \
-G "https://api.a2rev.com/v1/blocks?page=1&limit=20&sortBy=id&orderBy=desc" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.a2rev.com/v1/blocks',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
],
'query' => [
'page'=> '1',
'limit'=> '20',
'sortBy'=> 'id',
'orderBy'=> 'desc',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/blocks"
);
let params = {
"page": "1",
"limit": "20",
"sortBy": "id",
"orderBy": "desc",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/blocks'
params = {
'page': '1',
'limit': '20',
'sortBy': 'id',
'orderBy': 'desc',
}
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (200):
{
"success": true,
"message": "Successfully.",
"data": {
"blocks": [
{
"id": 5,
"name": "Home Reviews",
"created_at": "2020-05-29T02:09:07.000000Z"
},
{
"id": 6,
"name": "Home Reviews 2",
"created_at": "2020-05-29T02:09:07.000000Z"
}
],
"info": {
"page": 1,
"total": 4,
"limit": 2
}
}
}
HTTP Request
GET v1/blocks
Query Parameters
Parameter | Status | Description |
---|---|---|
page |
optional | The page number to return. Default is 1. |
limit |
optional | The number of record per page. Default is 20. |
sortBy |
optional | Field to sort by 'id', 'name' or 'created_at'. Default is 'id'. |
orderBy |
optional | Data order by type 'asc' or 'desc'. Default is 'desc'. |
Get block reviews
This API helps users get reviews of blocks.
{endpoint}/v1/blocks/{block_id}/reviews?page=1&limit=20&sortBy=id&&orderBy=desc&lang=en
Example request:
curl -X GET \
-G "https://api.a2rev.com/v1/blocks/6/reviews?page=1&limit=20&sortBy=id&orderBy=desc&lang=en" \
-H "User-Agent: A2reviews" \
-H "X-A2reviews-Hmac: { your_data_hmac }" \
-H "X-A2reviews-APIKey: { your_site_api_key }"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.a2rev.com/v1/blocks/6/reviews',
[
'headers' => [
'User-Agent' => 'A2reviews',
'X-A2reviews-Hmac' => '{ your_data_hmac }',
'X-A2reviews-APIKey' => '{ your_site_api_key }',
],
'query' => [
'page'=> '1',
'limit'=> '20',
'sortBy'=> 'id',
'orderBy'=> 'desc',
'lang'=> 'en',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://api.a2rev.com/v1/blocks/6/reviews"
);
let params = {
"page": "1",
"limit": "20",
"sortBy": "id",
"orderBy": "desc",
"lang": "en",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"User-Agent": "A2reviews",
"X-A2reviews-Hmac": "{ your_data_hmac }",
"X-A2reviews-APIKey": "{ your_site_api_key }",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
import requests
import json
url = 'https://api.a2rev.com/v1/blocks/6/reviews'
params = {
'page': '1',
'limit': '20',
'sortBy': 'id',
'orderBy': 'desc',
'lang': 'en',
}
headers = {
'User-Agent': 'A2reviews',
'X-A2reviews-Hmac': '{ your_data_hmac }',
'X-A2reviews-APIKey': '{ your_site_api_key }'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (403):
{
"success": false,
"message": "Missing API Key in headers."
}
Example response (404):
{
"success": false,
"message": "API key not found."
}
Example response (404):
{
"success": false,
"message": "Block review is not found."
}
Example response (200):
{
"success": true,
"message": "Successfully.",
"data": {
"reviews": [
{
"id": "77c13b99-e674-401a-ade2-9f0af7d0c0d1",
"title": "Color: And Silicon Strap Ships From: Spain Logistics: Entrega Local",
"content": "Received ahead of schedule, apparently everything ok. I 'd buy this salesman again. In the absence of further testing, started and updated correctly.",
"rating": 5,
"author": "J***s",
"email": "[email protected]",
"images": [
"https:\/\/ae01.alicdn.com\/kf\/U223401115b504031a7cc3733852cba1eC.jpg",
"https:\/\/ae01.alicdn.com\/kf\/U9d2eb61bf3ba49148bec894decb96f26P.jpg"
],
"blocks": "[6]",
"active": 1,
"created_at": "31 Jul 2019 08:06"
}
],
"images": [],
"info": {
"page": 1,
"total": 5,
"limit": 1
}
}
}
HTTP Request
GET v1/blocks/{block_id}/reviews
URL Parameters
Parameter | Status | Description |
---|---|---|
block_id |
required | The id of block review. |
Query Parameters
Parameter | Status | Description |
---|---|---|
page |
optional | The page number to return. Default is 1. |
limit |
optional | The number of record per page. Default is 20. |
sortBy |
optional | Field to sort by. Default is 'id'. |
orderBy |
optional | Data order by type 'asc' or 'desc'. Default is 'desc'. |
lang |
optional | Your language code. Default is 'en'. |