Actions5
Overview
This node operation retrieves a list of all available unit groups for a specified property within a given time period. It is useful in scenarios where you need to understand the availability structure of a property, such as for booking systems, inventory management, or reporting purposes. For example, a hotel management system could use this to fetch all room categories (unit groups) available during a certain date range to display options to customers or to synchronize availability data with other platforms.
Properties
| Name | Meaning |
|---|---|
| Group | Selects the API group to use; here it defaults to "AvailabilityV1" which relates to availability operations. |
| PropertyId | The unique identifier of the property for which to retrieve unit groups. |
| From | The start date of the requested time period (inclusive). Defines the first day for which availability data is requested. |
| To | The end date of the requested time period (inclusive). Defines the last day for which availability data is requested. |
| Adults | (Optional) Number of adults for whom availability is requested. Defaults to 1 if not set. |
| ChildrenAges | (Optional) Ages of children for whom availability is requested, provided as a string. |
| OnlySellable | (Optional) Boolean flag; when true, only returns unit groups that are sellable by the specified time slice template and definition IDs. When false, returns all unit groups. |
| PageNumber | (Optional) The page number for paginated results, starting at 1. If no items exist on the page, a 204 response is returned. Defaults to 1 if not set or invalid. |
| PageSize | (Optional) Number of items per page. If not set or invalid, pagination is ignored and all items are returned. |
| TimeSliceDefinitionIds | (Optional) Comma-separated string of time slice definition IDs to filter the results. |
| TimeSliceTemplate | (Optional) The time slice template to use; can be "DayUse" or "OverNight". Defaults to "DayUse". |
| UnitGroupIds | (Optional) Comma-separated string of specific unit group IDs to filter the results. |
| UnitGroupTypes | (Optional) Comma-separated string to filter results by unit group types. |
Output
The node outputs JSON data representing the list of unit groups available for the specified property and time period. Each item in the output typically includes details about a unit group such as its ID, name, type, and possibly availability metadata depending on the API response.
If the API supports binary data (not indicated here), it would be summarized accordingly, but this operation primarily deals with JSON data.
Dependencies
- Requires an API key credential for authenticating with the Apaleo API.
- The base URL for requests is
https://api.apaleo.com. - The node expects OAuth2 authentication configured in n8n for secure access.
- Date/time inputs must be provided in ISO 8601 format (the node converts them appropriately).
Troubleshooting
- Missing or invalid PropertyId: The request will fail if the property ID is missing or incorrect. Ensure the property ID is valid and correctly entered.
- Invalid date range: The 'From' and 'To' dates must be valid ISO 8601 dates and 'From' should not be after 'To'.
- Pagination issues: Setting a page number with no results returns HTTP 204 (No Content). Adjust page number or page size accordingly.
- Authentication errors: Ensure the API key or OAuth2 credentials are correctly configured and have sufficient permissions.
- Filtering parameters: Incorrectly formatted filters like
TimeSliceDefinitionIdsorUnitGroupIdsmay cause empty results or errors. Use comma-separated strings without extra spaces.