Service

Name Get Reservations
Description Get all reservations
Method GET
URL /reservations?[property=11111111][&status=tentative][&check_in=03/15/2017][&check_out=03/31/2017][&date_created=03/31/2017][&type_payment=0][&payment_requested=1][&deposit_completed=1][&unread=0]
Example /api/reservations?property=11111111&status=tentative...
Access OWNER, MANAGER, TRAVELER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
property number yes Property id to filter the reservations of this property.
status text no Values: reserved, tentative, blocked, cancelled, paid.
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.
date_created date no Date of created reservation.
type_payment number no 0 - Single Payment, 1 - Multi Payment.
payment_requested bool no If value is 1, only show reservation with request payment.
deposit_completed bool no If value is 1, only show reservation with deposit completed.
unread number no By default 0 return all, 1 only return unread.
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

            
                [ 
                  {
                   "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,
                   "status": "Reserved",
                   "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]
VID197 Invalid input for type_payment Type_payment is not in [0, 1] [Call the API again using a valid value for type_payment]
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"
VID220 Invalid input for status Status is not in ["blocked", "reserved", "paid", "tentative", "cancelled"] [Call the API again using a valid value for status]
VID222 Invalid input for unread Unread is not in [0,1] [Call the API again using a valid value for unread]
VID223 Invalid input for payment_requested Payment_requested is not in [0, 1] [Call the API again using a valid value for payment_requested]
VID224 Invalid input for deposit_completed Deposit_completed is not in [0, 1] [Call the API again using a valid value for deposit_completed]
VID233 Invalid input for date_created Date_created doesn't meet the date's format "Please enter a valid date of creation"
VID280 Invalid input for sort Sort is not a number between 1-4 [Call the API again using a valid value for sort]