Service

Name Get Message
Description Get a message
Method GET
URL /messages/{message}
Example /api/messages/123456789
Access OWNER, MANAGER, TRAVELER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
message number yes Message id.

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"
                    "replys": [                     
                      {
                       "id": 8232,
                       "date_created": "2017-04-11T13:29:58-0400",
                       "message": "Hello traveler",
                       "name": "John Owner",
                       "path": "https://www.homeescape.com/",
                       "user_type": "owner"
                      },
                      {
                       "id": 8233,
                       "date_created": "2017-04-11T13:31:27-0400",
                       "message": "Hello owner",
                       "name": "John Doe",
                       "path": "https://www.homeescape.com/bundles/common/images/profile-default.jpg",
                       "user_type": "traveler"
                      }
                    ]
                }
            
            

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!"
EC006 Inquiry not found Message id doesn't match our records "Sorry, We couldn't find that message!"
EC031 Reservation not belong to that user The user logged in is not the message traveler or the owner "Sorry, you do not have access to that message!"
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]
VID150 Invalid input for message Message id is not a number "Sorry, We couldn't find that message!" - [Call the API again using a valid value for message id]