One booking. A saved operation.
Run on your trusted Linux backend. The TypeScript or Python helper keeps the original request before you send it once.
On this page
Set up in test
Create one resource, its future hours and a bookable offering. In dashboard API keys, select that workspace and test, grant Read and Book, then download the once-shown key. No published page or customer email is needed for this backend booking.
Choose one language below. Use Node 24+ or Python 3.11–3.15, a trusted local filesystem and a new example directory. Keep private/ outside source control. Replace every YOUR_* placeholder; the workspace key stays in its protected file.
mkdir availkit-first-booking
cd availkit-first-booking
mkdir -m 700 private
printf 'private/\n' >> .gitignore
mv ~/Downloads/YOUR_DOWNLOADED_KEY.key private/availkit-test.key
chmod 600 private/availkit-test.key
export AVAILKIT_BASE_URL=https://api.availkit.com
export AVAILKIT_WORKSPACE_ID=YOUR_WORKSPACE_ID
export AVAILKIT_OFFERING_ID=YOUR_TEST_OFFERING_ID
export AVAILKIT_ENVIRONMENT=test
export AVAILKIT_CREDENTIAL_FILE="$PWD/private/availkit-test.key"
mkdir -m 700 private/booking-operation
export AVAILKIT_OPERATION_DIR="$PWD/private/booking-operation"Choose a returned time
In the dashboard’s test New booking form, choose the offering, inspect availability and copy a future returned UTC start. Do not submit that dashboard booking. Alternatively, after installing TypeScript below, use npx --no-install availkit availability YOUR_OFFERING_ID FROM_UTC TO_UTC with a future range of at most seven days. Availability does not reserve capacity.
export AVAILKIT_START=YOUR_RETURNED_UTC_STARTTypeScript: prepare, send, inspect
npm init -y
npm install https://availkit.dev/downloads/availkit-booking-0.4.0.tgz
node node_modules/@availkit/booking/examples/durable-booking.mjs prepare
node node_modules/@availkit/booking/examples/durable-booking.mjs send
node node_modules/@availkit/booking/examples/durable-booking.mjs inspectprepare saves the exact original and a generated idempotency key without sending a booking. send durably records unknown before its single API attempt. A validated reply settles the local operation as confirmed. inspect prints only safe state metadata and makes no API request. A second send cannot silently create another operation.
Python: the same three actions
python3 -m venv .venv
. .venv/bin/activate
python -m pip install https://availkit.dev/downloads/availkit-0.2.0-py3-none-any.whl
python -m availkit.examples.durable_booking prepare
python -m availkit.examples.durable_booking send
python -m availkit.examples.durable_booking inspectUse this instead of the TypeScript sequence. The environment and protected-file configuration above are the same. Each action is deliberate; reopening the operation store sends nothing.
Confirm the booking
Open test Bookings in the same dashboard workspace and find the offering and selected time. The example sends no customer email. Cancel only this owned booking in the dashboard after checking it. Cancellation does not refund its monthly create count.
The SDKs also support create, read, move and cancel: see the complete backend lifecycle tutorial or TypeScript reference. Choose a separate operation ID and save a new intent for each intentionally separate operation.
If the result is unknown, keep the operation
Stop writes and retain the private directory. An interrupted process or lost reply can follow a committed booking. Run the installed example’s inspect, then its separate reconcile read to inspect current candidates. That read examines only the first 100 bookings and reports whether another page exists; it neither proves the original outcome nor automatically settles or resends anything.
The example’s separate acknowledge-interruption action requires your explicit assertion that all previous workers have stopped and joined. Its separate replay action can then reuse only the original body, key and authority within 24 hours. Do not create a new ID, key or request to recover this booking. A rejected replay does not establish that the earlier unknown attempt failed.
The default local operation ID is stable across restarts; keep it with this directory. Filesystem and optional SQLite adapters are bounded local stores, with no automatic claim expiry, eviction or retry. They are not a distributed queue or host-loss backup. Protect the stored requests and any backups as private data. Read operation-specific recovery limits.