Name | Get Traveler Trips |
---|---|
Description | Get a list of the reservations |
Method | GET |
URL | /traveler/trips?page=[page]&per_page=[per_page]&filter=[status]&fields=[fields] |
Example | /api/traveler/trips?page=&per_page=&filter=upcoming&fields= | Access | TRAVELER |
Authorization | eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9... |
---|---|
Fields | Type | Required | Description |
---|---|---|---|
filter | text | yes | (pending, upcoming or past). By default upcoming. |
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. |
status | text | no | By default "upcoming" returns upcoming trips, "pending", "past". |
fields | text | no | Optional you can use this by retrieve complete object: property. |
{
"items_total": "2",
"items": [
{
"id": "505505853",
"status": "Reserved",
"date_created": "2018-03-15T09:45:48-0400",
"check_in": "2018-03-16T00:00:00-0400",
"check_in_hour": "17",
"check_out": "2018-03-22T00:00:00-0400",
"check_out_hour": "4",
"nights": 6,
"adults": 1,
"children": 0,
"message": "hello",
"price": 0,
"first_payment": 606.28,
"first_payment_date": "2018-03-20T13:46:13-0400",
"second_payment": "null",
"second_payment_date": "null",
"quote_total_USD": 606.28,
"damage_deposit_USD": 2,
"payment": true,
"payment_partial": false,
"payment_request": false,
"payment_request_online": false,
"property": "92264472",
},
...
]
}
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!" |
EC004 |
Not found result |
There are problems finding the data in our database | "No Record Found" |
EC011 |
Status not found |
The status doesn't match our records | "Oops! Looks like we hit a snag. Try closing the app and reopening it." |
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] |
VID220 |
Invalid input for status |
Status is not in ["upcoming", "pending", "past"] | [Call the API again using a valid value for status] |