Book a slot from availability.get (classes need session_id, a course its series_id; appointments and rentals need starts_at). Pass hold_minutes to hold it instead, and idempotency_key so retries never book twice.
Request
- Base URL: https://daybag.io/api/v1
- URL: https://daybag.io/api/v1/bookings
- Auth: HTTP bearer
Request body
A course (offering course: true): the entry availability.get gives, booked whole from its first time to come
ISO 8601 instant, e.g. 2026-10-03T15:00:00Z
class: seats · appointment: people, 1 for one-on-one · rental: items
Rentals: how many periods (e.g. days)
Answers to the offering's questions (offerings.get), keyed by each question's id: text, a choice's option exactly as listed, or true/false for yes_no. A required one left out answers 400 answers_required with its question_id
A promo code the guest gave, in any case: taken off total_cents, or refused with 400 code_invalid, code_expired or code_used_up
A gift card's code the guest gave, in any case, spaced or not: it pays what's due at booking (after promo_code, and the offering's deposit where it asks one), all it has at most, and the booking keeps gift_card_id and gift_cents. Refused with 400 gift_card_invalid or gift_card_empty, or 409 gift_card_short when its balance moved
Hold the place this many minutes (status held) instead of confirming; then call bookings.confirm
A UUID you generate per booking: retrying with it returns the same booking instead of booking twice
Response
Success
Classes only; a course's, the first time it was booked from
A course's booking: the calendar entry it holds a seat in every time of, from session_id's on. Null for a booking of one time
ISO 8601 timestamp (UTC)
ISO 8601 timestamp (UTC)
class: seats · appointment: people, 1 for one-on-one · rental: items
In the org's currency, in the currency's minor units (cents; whole yen for zero-decimal currencies): what's left to pay after a promo code
The promo code it was booked with, as stored; kept after the code is deleted. Null without one
What the promo code took off, in the currency's minor units (cents; whole yen for zero-decimal currencies); 0 without one
The gift card that paid part of it (gift_cards_get); null without one
What the gift card paid, in the currency's minor units (cents; whole yen for zero-decimal currencies), counted as paid: taken off the card once the booking is confirmed, back on it if it's cancelled; 0 without one
Short code the guest sees, e.g. 0GWYRZ2V
held, confirmed or cancelled; a hold keeps its place until expires_at
Where it was made: dashboard, api, mcp, widget, octo (a reseller, over /api/octo), or assistant (held for a guest over /api/mcp/book/{slug}, who confirms it)
The guest's answers to its offering's questions, keyed by question id: text (a choice's option, as listed), or true or false for a yes or no
ISO 8601 timestamp (UTC)
ISO 8601 timestamp (UTC)
ISO 8601 timestamp (UTC)
Opens the guest's own page, /b/{handle}: their messages, bookings and cancel. daybooked sends it only to the guest's email; never give it to whoever is booking, who may have typed someone else's email. bookings.resend emails it to the guest again
Stripe Checkout for a hold being paid online
ISO 8601 timestamp (UTC)
What's been paid so far, online and by hand, in the currency's minor units (cents; whole yen for zero-decimal currencies): less than total_cents after a deposit, the rest due at the start. Null on bookings from before deposits: the whole total once paid_at is set
The Stripe payment, when paid online
What its Stripe Checkout charged, a deposit or the whole total, in the currency's minor units (cents; whole yen for zero-decimal currencies): all that cancelling can refund. Null when not paid online, and on bookings from before deposits (the whole total)
The Stripe refund of a payment made online, once Stripe took it (cancelling refunds in full, unless refund_cents says otherwise)
What cancelling refunds of a payment made online, as bookings.cancel's refund chose, in the currency's minor units (cents; whole yen for zero-decimal currencies): null the whole payment, 0 none (the business kept it), otherwise that part
ISO 8601 timestamp (UTC)
ISO 8601 timestamp (UTC)
Why the refund failed, as Stripe said
ISO 8601 timestamp (UTC)
The window promised when it was booked: the guest may cancel on their page, or change its time, until this many hours before the start (or by the org's rule now, if kinder)
ISO 8601 timestamp (UTC)
ISO 8601 timestamp (UTC)
When its offering asks guests to sign your waiver: the signing link for everyone on the booking, /w/{waiver_token}. It only lets someone sign
ISO 8601 timestamp (UTC)
ISO 8601 timestamp (UTC)
A reseller's own reference for a booking it made over OCTO
Why a reseller cancelled it, in its words
ISO 8601 timestamp (UTC)
ISO 8601 timestamp (UTC)
Changes
No recorded changes to this operation across all 1 revision of this API.