Black Friday
Skip to documentation content

Developer Reference

Use the external-inventory block write contract

Core exposes a provider-neutral inventory write boundary for authorized add-ons. It is not a public unauthenticated endpoint or a theme API for editing reservations.

Core exposes a provider-neutral inventory write boundary for authorized add-ons. It is not a public unauthenticated endpoint or a theme API for editing reservations.

Probe kimorapro_hb_external_inventory_block_contract_version() and obtain kimorapro_hb_external_inventory_blocks(). The manager implements KimoraPro\HotelBooking\Contracts\ExternalInventoryBlockManagerInterface.

Current operations

upsert accepts sourceChannel, externalId, roomId, checkIn, checkOut, quantity (default 1) and nullable revision, returning a Booking model. release accepts sourceChannel, externalId and optional expectedRevision, returning the matching model or null.

Use a stable source-plus-external identity. Dates represent a check-out-exclusive interval, and quantity must be valid for the room inventory. Core handles the room lock and idempotent block update; callers must retain their own authentication, entitlement, provider evidence and safe source identity.

The returned domain model does not authorize another operation. Do not mutate it through ordinary booking repositories or treat its code as customer access.

Preserve safety boundaries

The external_block record type shares occupancy accounting but is closed to ordinary booking lifecycle, payment/refund, customer claim/cancellation and email workflows. A released block changes occupancy through its owner; it is not an ordinary staff cancellation command.

Pro owns feed URLs, parser, snapshot reconciliation, synchronization health and source presentation. Core does not need those secrets to enforce already stored blocks, including when Pro is unavailable.

Snapshot import should validate a complete source, recheck configuration/authorization before commit and roll back conflicts rather than leaving partial occupancy. Missing events may release only that source’s blocks under its verified complete-snapshot semantics.

Verify a provider

Use isolated synthetic inventory to test replay, revision conflict, overlapping bookings, quantity limits and denied ordinary mutations. Do not call the write manager from a frontend GET or expose it through an unguarded custom REST route. Preserve original external evidence without logging raw feed credentials.

See external block operations and schema/data integrity.

Was this article helpful?

Your feedback helps us improve the documentation.