Apaleo Official icon

Apaleo Official

Interact with Apaleo API

Overview

This node allows users to modify the availability of a unit group within the Apaleo system. It is designed to update the availability data for specific unit groups over a defined time period, using JSON Patch operations. This functionality is useful in scenarios such as adjusting room or unit availability dynamically based on bookings, maintenance schedules, or other operational changes.

For example, a property manager could use this node to block out dates for a hotel room that is undergoing renovation or to open up additional availability during peak seasons by modifying the unit group's availability accordingly.

Properties

Name Meaning
Group The API group to interact with. Options include: AvailabilityV1, BookingV1, FinanceV1, InventoryV1, LogsV1, OperationsV1, RateplanV1, ReportsV1, SettingsV1, WebhookV1. For this operation, "AvailabilityV1" is used.
ID The unique identifier of the unit group whose availability is to be modified.
From The start date of the time period from which the availability modification will take effect.
To The end date of the time period until which the availability modification will apply.
TimeSliceTemplate The template defining how time slices are structured. Options are "DayUse" (availability per day) and "OverNight" (availability spanning overnight periods).
Body A JSON Patch formatted array describing the list of operations to apply to the resource's availability. This follows the JSON Patch standard (http://jsonpatch.com/) and allows fine-grained modifications like add, remove, replace.

Output

The node outputs the JSON response returned by the Apaleo API after applying the patch to the unit group's availability. This typically includes the updated state of the unit group's availability resource.

No binary data output is involved.

Dependencies

  • Requires an API authentication token credential configured in n8n to authenticate requests against the Apaleo API.
  • The node sends PATCH HTTP requests to the endpoint /availability/v1/unit-groups/{id} on the Apaleo API base URL https://api.apaleo.com.
  • The request content type is application/json.

Troubleshooting

  • Invalid ID: If the provided unit group ID does not exist or is malformed, the API will return an error. Verify the ID is correct.
  • Date Range Issues: Ensure the "From" date is before or equal to the "To" date. Invalid or missing dates may cause request failures.
  • JSON Patch Format Errors: The body must be a valid JSON Patch array. Malformed JSON or incorrect patch operations will result in errors. Use a JSON validator and refer to http://jsonpatch.com/ for correct formatting.
  • Authentication Failures: Missing or invalid API credentials will prevent successful requests. Confirm the API key/token is correctly set up in n8n.
  • TimeSliceTemplate Mismatch: Using an unsupported time slice template value will cause errors. Only "DayUse" and "OverNight" are accepted.

Links and References

Discussion