HotelPlanet
Actions8
Overview
This node integrates with a hotel booking and management system API, enabling workflows to search hotels, check availability, make bookings, and manage reservations. Specifically, the "Get User Bookings" operation retrieves all hotel bookings associated with a given user's email address.
This operation is useful for travel agencies, booking platforms, or hotel management systems that need to fetch and display all reservations made by a particular user. For example, a customer support workflow could use this node to quickly pull up a user's booking history based on their email.
Properties
| Name | Meaning |
|---|---|
| User Email | The email address of the user whose bookings you want to retrieve |
Output
The output JSON contains the full response from the API under the json field. It includes:
- A
successboolean indicating if the request was successful. - If successful, the data will include an array or list of bookings associated with the specified user email.
- If unsuccessful, an error message describing the failure.
No binary data is output by this operation.
Example output structure (simplified):
{
"success": true,
"bookings": [
{
"bookingId": "12345",
"hotelName": "Hotel Example",
"checkIn": "2024-07-01",
"checkOut": "2024-07-05",
"guestInfo": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com"
},
...
},
...
]
}
Dependencies
- Requires an API key credential for authentication with the hotel booking system's API.
- The base URL for the API is obtained from the credentials configuration.
- Uses HTTP requests via Axios library to communicate with the external API.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Providing an invalid or empty user email may result in no bookings found or an error.
- Network connectivity problems can cause request timeouts or failures.
Error messages:
"API request failed": Generic failure; check API endpoint availability and credentials.- Errors returned from the API are passed through and should be reviewed for details.
Resolution tips:
- Verify the API key and ensure it has proper permissions.
- Confirm the user email is correctly formatted and corresponds to existing bookings.
- Check network access to the configured API base URL.
Links and References
- No direct links available from the source code.
- Refer to your hotel's booking system API documentation for detailed information on endpoints and data formats.