Service

Name Add Message
Description Add a message
Method POST
URL /messages
Example /api/messages
Access TRAVELER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
property number yes Property id.
first_name text yes First name of the traveler.
last_name text yes Last name of the traveler.
email email yes Email of the traveler.
phone_code number no Country calling code.
phone_number number no Traveler phone number.
check_in date no Tentative check in.
check_out date no Tentative check out.
adults number no Number of adults, by default 1
children number no Number of children, by default 0
message text yes Message for the owner.

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: "inquiry" doesn't match our records "Oops! Looks like we hit a snag. Try closing the app and reopening it."
EC024 Range of date not valid The range of date is not valid Please enter valid dates
EC025 Error when try to send email Error trying to send the email
EC028 Reservation no available in that date The reservation's dates are not available "This property is not available on these dates"
SC003 Invalid email address The email is not a valid email address "email@domain" is not a valid email address"
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]
R000 Fail The message wasn't created
R111 Success The operation was successful [Show the confirmation popup]
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)"
VID104 Invalid input for phone_code Phone_code is empty or it doesn't have only numbers "Please fill out this field" - "Phone code must have only numbers"
VID105 Invalid input for phone_number Phone_number is empty or doesn't have only numbers "Please fill out this field" - "Phone must have only numbers"
VID106 Invalid input for first_name First name is empty or it doesn't have only letters "Please fill out this field" - "First name must have only letters"
VID107 Invalid input for last_name Last name is empty or it doesn't have only letters "Please fill out this field" - "Last name must have only letters"
VID112 Invalid input for property Property id is not a number [Call the API again using a valid value for property id]
VID150 Invalid input for message Message has only characters not allowed(" ", ', ’, ‘, ’, ", &, \, <, >, --) "Please enter a valid message"
VID202 Invalid input for check_in Check_in doesn't meet the date's format "Please enter a valid Check In date"
VID203 Invalid input for check_out Check_out doesn't meet the date's format "Please enter a valid Check Out date"
VID229 Invalid input for adults Adults is empty or it is not a number [Call the API again using a valid value for adults]
VID230 Invalid input for children Children is empty or it is not a number [Call the API again using a valid value for children]