Name | Get Property Reviews |
---|---|
Description | Returns the reviews of the property |
Method | GET |
URL | /properties/{property}/reviews[?page=1][&per_page=10][&status=all] |
Example | /api/properties/11111111/reviews?page=1&per_page=&status=all | Access | EVERYONE |
Authorization | eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9... |
---|---|
Fields | Type | Required | Description |
---|---|---|---|
property | number | yes | Property id |
page | number | no | It can be used to paginate the result. By default 0 returns all. |
per_page | number | no | It can be used to limit the result. By default 10 items per page. If page = 0, this field doesn't apply. |
status | text | no | Only owner or manager can specify this value: all, pending, posted |
{
"items_total": 6,
"items": [
{
"id": 6387,
"guest": "Dev Traveler",
"created": "2017-03-15T00:00:00-0400",
"stay_date": "2017-03-15T00:00:00-0400",
"title": "Nice House",
"description": "This property is very nice and owner is friendly.",
"valoration": 4,
"status": "posted",
"property": "55853851"
},
{
"id": 6388,
"guest": "Dev Traveler",
"created": "2017-03-15T00:00:00-0400",
"stay_date": "2017-03-12T00:00:00-0500",
"title": "No like",
"description": "No like this house.",
"valoration": 2,
"status": "pending",
"property": "55853851"
}
]
}
Code | Message | Cause | Possible Frontend Message [Behavior] |
---|---|---|---|
EC000 |
Internal error in API |
Internal error connecting the database | "Oops! Looks like we hit a snag. Try closing the app and reopening it." |
EC001 |
User not found |
Token user id doesn't match our records | "Sorry, We couldn't find your information!" |
EC002 |
Property not found |
Property id doesn't match our records | "Sorry, We couldn't find that property!" |
EC004 |
Not found result |
There are problems finding the data in our database | [Don't show reviews] |
EC011 |
Status not found |
Status doesn't match our records | "Oops! Looks like we hit a snag. Try closing the app and reopening it." |
EC014 |
Property doesn't belong to that user |
The user logged in is not the property's owner | "Sorry, you do not have access to that property!" |
SC006 |
User no authorization |
The token role is not valid for using the API services | "You have been logged out." - [Take the user to the login screen] |
SC014 |
Expired token |
The token has expired | "You have been logged out." - [Take the user to the login screen] |
VID110 |
Invalid input for page |
Page is not a number | [Call the API again using a valid value for page] |
VID111 |
Invalid input for per_page |
Per_page is not a number | [Call the API again using a valid value for per_page] |
VID112 |
Invalid input for property |
Property id is not a number | [Call the API again using a valid value for property id] |
VID220 |
Invalid input for status |
Status is not in ["all", "pending", "posted"] | [Call the API again using a valid value for status] |