HotelPlanet
Actions8
Overview
The node "HotelPlanet" provides a comprehensive hotel booking and management system integration. It allows users to retrieve detailed information about hotels, check availability, make bookings, and manage reservations. This node is particularly useful for travel agencies, booking platforms, or any workflow that requires automated hotel data retrieval and booking capabilities.
For the Get Hotel Details operation specifically, the node fetches detailed information about a particular hotel using its unique Hotel ID. This can be used in scenarios where you want to display or process detailed hotel data after selecting a hotel from a list or search results.
Practical Example
- After searching for hotels by location or name, use the Get Hotel Details operation to retrieve full details (such as amenities, address, description) of a selected hotel before presenting it to an end user or proceeding with booking.
Properties
| Name | Meaning |
|---|---|
| Hotel ID | The unique identifier of the hotel whose detailed information you want to retrieve. |
Output
The output JSON contains the response from the hotel API endpoint for the specified hotel. It includes detailed hotel information such as name, location, amenities, ratings, room types, pricing, and other metadata provided by the API.
If the API request is successful, the output JSON will have a structure similar to:
{
"success": true,
"hotel": {
"id": "string",
"name": "string",
"address": "string",
"city": "string",
"country": "string",
"rating": number,
"amenities": ["string", ...],
"rooms": [
{
"roomId": "string",
"type": "string",
"price": number,
...
}
],
...
}
}
If the request fails, the node throws an error or outputs an error message depending on the configuration.
The node does not output binary data.
Dependencies
- Requires an API key credential for authentication with the HotelPlanet API.
- The base URL for the API is obtained from the credentials; if not set, defaults to
http://localhost:3000. - Uses the Axios HTTP client library internally to make REST API calls.
Troubleshooting
Common Issues:
- Invalid or missing Hotel ID will cause the API to return an error.
- Network connectivity issues or incorrect base URL configuration may lead to request failures.
- API authentication failure if the API key credential is invalid or expired.
Error Messages:
"API request failed": General failure, check API endpoint and parameters.- Errors returned from the API are passed through in the
errorfield of the response JSON. - If the node is configured to continue on fail, errors will appear in the output JSON under an
errorproperty.
Resolution Tips:
- Verify the Hotel ID is correct and corresponds to an existing hotel.
- Ensure the API key credential is properly configured and valid.
- Confirm the base URL points to the correct HotelPlanet API server.
- Check network access and firewall settings if requests time out.
Links and References
- Axios HTTP Client
- Documentation for the HotelPlanet API (not publicly provided here; refer to your API provider's docs)
- n8n documentation on creating and using custom nodes: https://docs.n8n.io/creating-nodes/