Name | Get Property Calendar |
---|---|
Description | Get the calendar of a property |
Method | GET |
URL | /properties/{property}/calendar[?check_in=03/17/2017][&check_out=03/31/2017][&status=all] |
Example | /api/properties/11111111/calendar?check_in=03/17/2017&check_out=03/31/2017&status=all | Access | EVERYONE |
Authorization | eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9... |
---|---|
Fields | Type | Required | Description |
---|---|---|---|
property | number | yes | Property id. |
check_in | text | no | Start date for period of calendar. |
check_out | text | no | End date for period of calendar. |
status | text | no | Status of reservations: "all", "reserved", "tentative", "blocked". Only owner or manager can specify values different to all. |
[
{
"id": 821683,
"serie": "552622624",
"check_in": "2017-03-15T00:00:00-0400",
"check_out": "2017-03-18T00:00:00-0400",
"status": "Reserved",
"nights": 3,
},
...
]
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 | [Don't show reservations on the calendar] |
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 doesn't 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" |
VID220 |
Invalid input for status |
Status is not in ["all", "reserved", "tentative", "blocked"] | [Call the API again using a valid value for status] |