Service

Name Get Owner's Inbox
Description Get the messages or reservations of the owner
Method GET
URL /owner/inbox[?page=1] [&per_page=10] [&unread={0|1}] [&type={all|reservation|message}] [&property=11111111] [&check_in=mm/dd/aaaa] [&check_out=mm/dd/aaaa] [&text_filter=homeescape] [&sort={1|2|3|4}]
Example /api/owner/inbox?page=1&per_page=10&unread=0&type=all&property=11111111&check_in=11/11/2018 &check_out=11/18/2018&text_filter=john&sort=2
Access OWNER, MANAGER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
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.
unread number no By default 0 return all, 1 only return unread.
type text no By default "all" return all, "message" only return inquiries, "reservation" only return reservations.
property number no Property id to filter the reservations of this property.
check_in date no Check in date to filter the reservations starting on this date. Format: mm/dd/aaaa.
check_out date no Check out date to filter the reservations ending on this date. Format: mm/dd/aaaa.
text_filter text no Any text for filter the reservations by series, email, first name or last name.
sort number no By default it is ordered by Date Update DESC, 1-Date Created DESC, 2-Check In ASC, 3-Check Out ASC, 4-Quote Total DESC.

Response

            
                {
                    "items_total": 10,
                    "items": [
                        {
                         "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": "",
                         "status": "Reserved",
                         "guest": "John Doe",
                         "email": "john.traveler@homeescape.com",
                         "phone_code": 1,
                         "phone_number": 7863334444,
                         "property": {
                            "id": "111111111",
                            "name": "My first home",
                            "image": "http://homeescape.com/.../111111.jpg"
                        },
                        "user": {
                            "name": "John Traveler",
                            "photo": "null"
                        }
                        }, {...}                        
                    ],
                    "extra": {
                        "alls": "1",
                        "messages": "0",
                        "reservations": "1"
                    }
                }
            
            

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"
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]
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]
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]
VID276 Invalid input for type Type is not in ["all", "message", "reservation"] [Call the API again using a valid value for type]
VID280 Invalid input for sort Sort is not a number between 1-4 [Call the API again using a valid value for sort]