Actions12
Overview
This node integrates with the Bookla API to update booking details for a specified company. It allows users to modify various aspects of an existing booking such as its duration, price, assigned resource, number of spots, start time, status, and metadata. This is useful in scenarios where bookings need adjustments after creation, for example, changing the appointment time, updating pricing, or marking a booking as confirmed or cancelled.
Practical examples include:
- Updating the start time of a booking when a client reschedules.
- Changing the number of spots reserved for group bookings.
- Adjusting the price due to discounts or additional charges.
- Modifying booking status to reflect current state (e.g., confirmed, cancelled).
- Adding or updating custom metadata related to the booking.
Properties
| Name | Meaning |
|---|---|
| Server | Select which Bookla server to connect to. Options: "US Server" or "EU Server". |
| Company ID | The unique identifier of the company owning the booking. Required to specify the context for the booking update. |
| Booking ID | The unique identifier of the booking to update. |
| Duration | Duration of the booking in ISO8601 format (e.g., PT1H for 1 hour). |
| Price | Price of the booking expressed in fractional units (e.g., 1000 represents $10.00). |
| Resource ID | Identifier of the resource associated with this booking (e.g., a room, staff member, or equipment). |
| Spots | Number of spots reserved for the booking, useful for group bookings. |
| Start Time | Start time of the booking in RFC3339 date-time format (e.g., 2023-01-01T10:00:00Z). |
| Status | Current status of the booking. Options include: Confirmed, Pending, Cancelled, Finished, No Show, Rejected. |
| Meta Data | Allows updating a metadata object associated with the booking. Includes: - Expected Version: Numeric version expected for concurrency control. - Path: JSON path within the metadata to update. - Value: JSON value to set. |
Output
The node outputs the updated booking data in the json field of the output item. This typically includes all booking details as returned by the Bookla API after the update operation, reflecting the new state of the booking.
If the booking contains any binary data (not indicated in this implementation), it would be included in the binary output fields; however, this node primarily deals with JSON data representing booking information.
Dependencies
- Requires an API key credential for authenticating with the Bookla API.
- The node dynamically selects the base URL depending on the chosen server (
us.bookla.comoreu.bookla.com). - Proper configuration of the API key credential in n8n is necessary for successful requests.
Troubleshooting
- Invalid or missing Company ID or Booking ID: The API will fail if these required identifiers are not provided or incorrect. Ensure these IDs are accurate and present.
- Incorrect date/time formats: The
startTimemust be in valid RFC3339 format, anddurationmust follow ISO8601 duration format. Invalid formats may cause request failures. - Status value errors: Selecting an invalid status or leaving it empty when required might result in errors. Use one of the predefined status options.
- Metadata update issues: If the metadata JSON is malformed or the expected version does not match the current version on the server, the update may be rejected. Verify JSON syntax and version correctness.
- API authentication errors: Ensure the API key credential is correctly configured and has sufficient permissions.
- Server selection mismatch: Using the wrong server option may lead to connection errors or unexpected data. Confirm the correct server region for your company.
Links and References
- Bookla API Documentation (Assumed official API docs for reference)
- ISO8601 Duration Format
- RFC3339 Date-Time Format