Skip to documentation content

Developer Reference

Handle external inventory blocks

Use the provider-neutral External Inventory Block contract for iCal occupancy while keeping blocks read-only and inside the Free inventory path.

The Free-owned ExternalInventoryBlockManagerInterface exposes provider-neutral upsert and release operations. Pro iCal materializes a record with record_type external_block and a source ID plus UID hash. Blocks use the shared hb_booking_items overlap path, are counted by availability and are protected by a room lock and final availability recheck.

Keep the block boundary

  • Reconciliation is a full source snapshot. A valid empty feed releases only that source’s active blocks; a fetch, parse, license or storage failure keeps the last known good snapshot. Partial commits are forbidden.
  • The interval is check-in inclusive and check-out exclusive. Quantity must be at least one and never exceed room inventory. The same source UID is idempotent. Represent the interval explicitly as [check_in,check_out) in adapters and tests so boundary-night behavior cannot drift.
  • An external block is read-only. It has no guest identity, customer email, payment, confirmation, cancellation, refund, no-show or normal status transition. The source OTA remains authoritative.
  • Existing blocks survive Pro deactivation, license loss and uninstall. Do not clear occupancy as part of an entitlement check.

Free must remain bootable without Pro and must not contain an iCal parser, serializer, feed URL storage, scheduler, sync log or commercial schema. Pro owns those implementations while Free owns safety and inventory enforcement.

Next: use hooks, filters and versioning.

Was this article helpful?

Your feedback helps us improve the documentation.