This endpoint allows you to list
, create
, retrieve
, update
and delete
reviews on your TastyIgniter site.
Key | Type | Description |
---|---|---|
sale_id |
int |
Required. The ID of the sale or reservation the review references |
sale_type |
string |
Required. The type of review, one of orders or reservations |
author |
integer or null |
The ID of the admin user writing the review or null |
quality |
integer |
Score from 0 to 5 for the quality of the food received |
delivery |
integer |
Score from 0 to 5 for the quality of the delivery service received |
service |
integer |
Score from 0 to 5 for the quality of the customer service received |
review_text |
string |
The customer text review (if any) |
review_status |
boolean |
Has the value true if the category is enabled or the value false if the category is disabled. |
location |
object |
The location associated with the review (see Locations) |
customer |
object |
The customer associated with the review (see Customers) |
{
"review_id": 1,
"customer_id": 1,
"sale_id": 1,
"sale_type": "orders",
"author": 1,
"location_id": 1,
"quality": 5,
"delivery": 5,
"service": 5,
"review_text": "This restaurant is amazing!",
"date_added": "2020-06-03 09:17:12",
"review_status": true,
"location": {},
"customer": {}
}
Creates a new review.
Required abilities: reviews:write
POST /api/reviews
Key | Type | Description |
---|---|---|
sale_id |
int |
Required. The ID of the sale or reservation the review references |
sale_type |
string |
Required. The type of review, one of orders or reservations |
author |
integer or null |
The ID of the admin user writing the review or null |
quality |
integer |
Score from 0 to 5 for the quality of the food received |
delivery |
integer |
Score from 0 to 5 for the quality of the delivery service received |
service |
integer |
Score from 0 to 5 for the quality of the customer service received |
review_text |
string |
The customer text review |
review_status |
boolean |
Has the value true if the review is enabled or the value false if the review is disabled. |
location_id |
integer |
The ID of the location associated with the review |
customer_id |
integer |
The ID of the customer associated with the review |
{
"sale_id": 1,
"sale_type": "orders",
"quality": 4,
"delivery": 5,
"service": 5,
"review_text": "This restaurant is amazing!",
"review_status": true,
"customer_id": 1,
"location_id": 1
}
Status: 201 Created
{
"review_id": 1,
"customer_id": 1,
"sale_id": 1,
"sale_type": "orders",
"author": 1,
"location_id": 1,
"quality": 4,
"delivery": 5,
"service": 5,
"review_text": "This restaurant is amazing!",
"date_added": "2020-06-03 09:17:12",
"review_status": true,
"location": {},
"customer": {}
}
Retrieves a review.
Required abilities: reviews:read
GET /api/reviews/:review_id
No parameters.
Status: 200 OK
{
"review_id": 1,
"customer_id": 1,
"sale_id": 1,
"sale_type": "orders",
"author": 1,
"location_id": 1,
"quality": 5,
"delivery": 5,
"service": 5,
"review_text": "This restaurant is amazing!",
"date_added": "2020-06-03 09:17:12",
"review_status": true,
"location": {},
"customer": {}
}
Updates a review.
Required abilities: reviews:write
PATCH /api/reviews/:review_id
Key | Type | Description |
---|---|---|
sale_id |
int |
Required. The ID of the sale or reservation the review references |
sale_type |
string |
Required. The type of review, one of orders or reservations |
author |
integer or null |
The ID of the admin user writing the review or null |
quality |
integer |
Score from 0 to 5 for the quality of the food received |
delivery |
integer |
Score from 0 to 5 for the quality of the delivery service received |
service |
integer |
Score from 0 to 5 for the quality of the customer service received |
review_text |
string |
The customer text review |
review_status |
boolean |
Has the value true if the review is enabled or the value false if the review is disabled. |
location_id |
integer |
The ID of the location associated with the review |
customer_id |
integer |
The ID of the customer associated with the review |
{
"quality": 4,
"review_text": "This restaurant is *really* amazing!"
}
Status: 200 OK
{
"review_id": 1,
"customer_id": 1,
"sale_id": 1,
"sale_type": "orders",
"author": 1,
"location_id": 1,
"quality": 5,
"delivery": 5,
"service": 5,
"review_text": "This restaurant is *really* amazing!",
"date_added": "2020-06-03 09:17:12",
"review_status": true,
"location": {},
"customer": {}
}
Permanently deletes a review. It cannot be undone.
Required abilities: reviews:write
DELETE /api/reviews/:review_id
No parameters.
Returns an object with a deleted parameter on success. If the review ID does not exist, this call returns an error.
Status: 200 OK
{
"id": 1,
"object": "review",
"deleted": true
}