Skip to guide
AvailKit/ developers
Browse documentation

Handle a lost response without a second booking.

The request may have committed even when your client never received its success response.

Retain the intent before sending

Before sending a mutation, retain its exact body, method, API origin, workspace/page, test/live scope, creation time, authority fingerprint and idempotency key where supported. Guest operations additionally retain the original booking capability and contact-reuse proof privately. Save on your server before the send; do not log secrets or put them in URLs.

Not sent
Local validation or preparation failed before a request. Correct the input; no network effect occurred.
Rejected
A recognized API rejection arrived. Handle its structured code; never infer every HTTP error proves no commit.
Confirmed success
A validated success response arrived. Preserve the receipt and booking ID.
Unknown
The response was lost, timed out, malformed or otherwise insufficient. The mutation may have committed. Stop and retain the original intent.

Read current state with the original authority. A current read can confirm what exists; it cannot reconstruct a missing acknowledgment or prove a booking never existed. Never generate a fresh key or a replacement request to recover an unknown result.

Replay is operation-specific
OperationSafe handling after an unknown outcome
Workspace or public booking create, move, cancelRetain the original body and key. The server keeps booking receipts for 24 hours. Only an explicitly authorized, identical replay within that window and original scope/authority can use that receipt. A changed body conflicts. A new key means a new intent.
Catalog, hours, customers, webhooks, booking-page settings and maintenanceThese do not share booking replay receipts. Inspect current state and reconcile manually. Secret issuance has no secret recovery; listing cannot reveal the secret again.
Account/passkey/session ceremoniesUse the same-origin dashboard and the specific ceremony’s continuation rules; backend SDKs do not automate them. Use the dashboard’s Account & security controls for supported recovery; keep a spare passkey and offline recovery codes.

Exercise the installed examples

The Python and PHP lifecycle examples save each create/move/cancel intent in private/ before sending, along with original authority fingerprint and scope. A second invocation of that mutation refuses to send. Use reconcile to read current bookings. Keep confirmed receipts as well as uncertain intents.

For a deliberate transport-loss test in your own test environment, forward exactly one request, let the API commit, then drop its response in a test transport. The SDK must report unknown; your application must retain the intent and send no automatic follow-up mutation. Read the existing booking before considering an explicit identical replay within its supported receipt window. Do not simulate loss by creating a second intent.

The browser tutorial likewise holds guest tokens, exact body and key in memory before send and offers a private save. On loss keep that tab/record; a fresh token or key cannot recover the same booking.