Reviews
Returns latest published reviews.
Parameters
includequery string
Include associations (delimited with comma). Available associations: user, business, pictures, products.
sortquery string
Sort ascending or descending order.
pagequery integer
Page offset to fetch.
per_pagequery integer
Number of results to return per page.
{
const res = await fetch(`${BASE_URL}/api/v1/reviews`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)});
const data = await res.json();
}
Review by id
Return a Review.
Parameters
idpath integerRequired
Return a Delivery by specific
id
.includequery string
Include associations (delimited with comma). Available associations: user, business, pictures, products.
languagequery string
Return results of Business by language ISO 639‑1 code.
{
const res = await fetch(`${BASE_URL}/api/v1/reviews/${id}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)});
const data = await res.json();
}
Request Object
The required Request Object used for CRUD. The only difference is with Create Review no review id
needs to be provided.
{
"data": {
"id": "62a05bd2-2f0e-4bac-8f8b-63947f4df16f",
"type": "reviews",
"attributes": {
"atmosphere_review": "",
"atmosphere_review_feedback": "",
"cleanliness_review": "",
"cleanliness_review_feedback": "",
"comfort_score": "",
"concept_review": "",
"concept_review_feedback": "",
"cooking_technique_score": "",
"decoration_score": "",
"dishes_score": "",
"experience_score": "",
"food_review": "",
"food_review_feedback": "",
"kind_of_service": "takeaway",
"kindness_score": "",
"newness_score": "",
"perfect_for": [""],
"place_score": "",
"presentation_of_dishes_score": "",
"presentation_score": "",
"price_range": "",
"pricing_review": "",
"pricing_review_feedback": "",
"professionalism_score": "",
"quality_of_products_score": "",
"quality_to_price_score": "",
"rapidity_score": "",
"service_review": "",
"service_review_feedback": "",
"state": "",
"sonority": "quiet",
"summary": "",
"table_style_score": "",
"tables_score": "",
"taste_score": "",
"title": "",
"visit_for": "",
}
}
}
Create Review
Create a Review.
Parameters
dataformData, objectRequired
Form Data needed when creating a new Review.
typestringRequired
Provide Review
type
. Current selection is only reviews.attributesformData, object
Attributes object.
atmosphere_reviewstring
atmosphere_review_feedbackstring
cleanliness_reviewstring
cleanliness_review_feedbackstring
comfort_scorestring
concept_reviewstring
concept_review_feedbackstring
cooking_technique_scorestring
decoration_scorestring
dishes_scorestring
experience_scorestring
food_reviewstring
food_review_feedbackstring
kind_of_servicestring
Available values: eat_in, takeaway, delivery.
kindness_scorestring
newness_scorestring
perfect_forstring[]
place_scorestring
presentation_of_dishes_scorestring
presentation_scorestring
price_rangestring
pricing_reviewstring
pricing_review_feedbackstring
professionalism_scorestring
quality_of_products_scorestring
quality_to_price_scorestring
rapidity_scorestring
service_reviewstring
service_review_feedbackstring
statestring
sonoritystring
Available values: quiet, moderate, loud.
summarystring
table_style_scorestring
tables_scorestring
taste_scorestring
titlestring
visit_forstring
relationshipsformData, object
Relationships object with
business
object.businessformData, object
Add a Business relationships link.
idstring
Related Business
id
.typestring
Business
type
; business.
{
const res = await fetch(`${BASE_URL}/api/v1/reviews`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)});
const data = await res.json();
}
Update Review
Update a Review
Parameters
idpath integerRequired
Update a Review by specific
id
.dataformData, objectRequired
Form Data needed when updating a Review.
idstringRequired
Provide Review
id
.typestringRequired
Provide Review
type
. Current selection is only reviews.attributesformData, object
Attributes object.
atmosphere_reviewstring
atmosphere_review_feedbackstring
cleanliness_reviewstring
cleanliness_review_feedbackstring
comfort_scorestring
concept_reviewstring
concept_review_feedbackstring
cooking_technique_scorestring
decoration_scorestring
dishes_scorestring
experience_scorestring
food_reviewstring
food_review_feedbackstring
kind_of_servicestring
kindness_scorestring
newness_scorestring
perfect_forstring[]
place_scorestring
presentation_of_dishes_scorestring
presentation_scorestring
price_rangestring
pricing_reviewstring
pricing_review_feedbackstring
professionalism_scorestring
quality_of_products_scorestring
quality_to_price_scorestring
rapidity_scorestring
service_reviewstring
service_review_feedbackstring
statestring
sonoritystring
Available values: quiet, moderate, loud.
summarystring
table_style_scorestring
tables_scorestring
taste_scorestring
titlestring
visit_forstring
{
const res = await fetch(`${BASE_URL}/api/v1/reviews/${id}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)});
const data = await res.json();
}
Delete Review
Delete a Review.
Parameters
idpath integerRequired
Delete a Review by specific
id
.
{
const res = await fetch(`${BASE_URL}/api/v1/reviews/${id}`, {
method: 'DELETE',
headers: {
'Content-Type': 'application/json'
}});
const data = await res.json();
}