Service

Name Get Messages
Description Get the messages
Method GET
URL /messages?[property=11111111][&check_in=03/15/2017][&check_out=03/31/2017][&unread=1]
Example /api/messages?property=11111111&check_in=03/15/2017&check_out=03/31/2017&unread=0
Access OWNER, MANAGER, TRAVELER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
property number no Property id.
check_in text no Check in date to filter the messages starting on this date. Format: mm/dd/aaaa.
check_out text no Check out date to filter the messages ending on this date. Format: mm/dd/aaaa.
unread number no By default 0 return all, 1 only return unread.
text_filter text no Any text for filter the messages by series, email, first name or last name.

Response

            
                [ 
                  {
                   "id": "807685075",
                   "date_created": "2017-03-16T09:43:59-0400",
                   "check_in": "2017-03-24T00:00:00-0400",
                   "check_in_hour": "15",
                   "check_out": "2017-03-26T00:00:00-0400",
                   "check_out_hour": "11",
                   "nights": 3,
                   "adults": 2,
                   "children": 0,
                   "message": "I want rent your house per 3 week",
                   "guest": "John Doe",
                   "email": "john.traveler@homeescape.com",
                   "phone_code": 1,
                   "phone_number": 7863334444,
                   "property": "11111111",
                   "property_name": "My First Home"
                  } 
                ]
            
            

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!"
EC004 Not found result There are problems finding the data in our database "No Record Found"
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 not 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]
VID112 Invalid input for property Property id is not a number [Call the API again using a valid value for property id]
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"
VID222 Invalid input for unread Unread is not in [0,1] [Call the API again using a valid value for unread]
VID280 Invalid input for sort Sort is not a number between 1-4 [Call the API again using a valid value for sort]