Service

Name Add Property Review
Description Add a review to a property
Method POST
URL /properties/{property}/reviews
Example /api/properties/11111111/reviews
Access TRAVELER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
property number yes Property id.
guest text yes Name of the traveler
email text yes Email of the traveler
stay_date date no The date that generated the review
title text yes Title of the review
message text yes Message of the review
valoration number no Values between 0 to 5, by default 0

Response

            
                {
                    "code": R111,
                    "message": "Success"
                }
            
            

Response Codes

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!"
EC011 Status not found Status: "pending" doesn't match our records "Oops! Looks like we hit a snag. Try closing the app and reopening it."
R000 Fail The review were not created
R111 Success The operation was successful "Your message has been sent!" or [Show popup]
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]
VID112 Invalid input for property Property id is not a number [Call the API again using a valid value for property id]
VID101 Invalid input for email Email is empty or it doesn't meet the email's format "Please fill out this field" - "Please enter a valid email address (ex: email@homeescape.com)"
VID150 Invalid input for message Message is empty or it has only characters not allowed(" ", ', ’, ‘, ’, ", &, \, <, >, --) "Please fill out this field" - "Please enter a valid message"
VID225 Invalid input for stay_date Stay_date doesn't meet the date's format "Please enter a valid Stay Date"
VID226 Invalid input for guest Guest is empty, has more than 255 characters or it has only characters not allowed(" ", ', ’, ‘, ’, ", &, \, <, >, --) "Please fill out this field" - "Please enter a valid guest name"
VID227 Invalid input for title Title is empty, has more than 255 characters or it has only characters not allowed(" ", ', ’, ‘, ’, ", &, \, <, >, --) "Please fill out this field" - "Please enter a valid title"
VID228 Invalid input for valoration Valoration is empty or it is not a number between 1-5 "Please rate your stay"