---
title: "Cancel a booking or a hold and free its capacity; the guest is emailed. A payment made online (a deposit, or the whole total: charged_cents) is refunded in full, or as refund says: none, or a part (more than was paid online: 400 refund_too_large). Safe to repeat: a booking already cancelled keeps its first choice"
method: POST
path: "/bookings/{id}/cancel"
tags: ["bookings"]
---

# Cancel a booking or a hold and free its capacity; the guest is emailed. A payment made online (a deposit, or the whole total: charged_cents) is refunded in full, or as refund says: none, or a part (more than was paid online: 400 refund_too_large). Safe to repeat: a booking already cancelled keeps its first choice

`POST /bookings/{id}/cancel`

## Request

- Base URL: `https://daybag.io/api/v1`
- URL: `https://daybag.io/api/v1/bookings/{id}/cancel`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `refund` union: For a booking paid online: "full" (the default) refunds the whole payment, "none" keeps it, { amount_cents } refunds that part. Recorded as refund_cents. A booking not paid online ignores it
    - 'full' | 'none'
    - object
      - `amount_cents` integer, required: The part to refund, in the currency's minor units (cents; whole yen for zero-decimal currencies): 1 up to the amount paid online (charged_cents)

## Response `200`

Success

- object
  - `id` string, required
  - `org_id` string, required
  - `offering_id` string, required
  - `session_id` string, nullable, required: Classes only; a course's, the first time it was booked from
  - `series_id` string, nullable: 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
  - `customer_id` string, required
  - `starts_at` string, required: ISO 8601 timestamp (UTC)
  - `ends_at` string, required: ISO 8601 timestamp (UTC)
  - `quantity` integer, required: class: seats · appointment: people, 1 for one-on-one · rental: items
  - `total_cents` integer, required: 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
  - `promo_code` string, nullable: The promo code it was booked with, as stored; kept after the code is deleted. Null without one
  - `discount_cents` integer: What the promo code took off, in the currency's minor units (cents; whole yen for zero-decimal currencies); 0 without one
  - `gift_card_id` string, nullable: The gift card that paid part of it (gift_cards_get); null without one
  - `gift_cents` integer: 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
  - `reference` string, required: Short code the guest sees, e.g. 0GWYRZ2V
  - `status` 'held' | 'confirmed' | 'cancelled', required: held, confirmed or cancelled; a hold keeps its place until expires_at
  - `source` string, required: 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)
  - `notes` string, required
  - `answers` object: 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
  - `metadata` unknown, required
  - `cancelled_at` string, nullable, required: ISO 8601 timestamp (UTC)
  - `created_at` string, required: ISO 8601 timestamp (UTC)
  - `expires_at` string, nullable, required: ISO 8601 timestamp (UTC)
  - `handle` string, required: 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
  - `checkout_url` string, nullable, required: Stripe Checkout for a hold being paid online
  - `paid_at` string, nullable, required: ISO 8601 timestamp (UTC)
  - `paid_cents` integer, nullable: 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
  - `payment_intent_id` string, nullable, required: The Stripe payment, when paid online
  - `charged_cents` integer, nullable: 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)
  - `refund_id` string, nullable, required: The Stripe refund of a payment made online, once Stripe took it (cancelling refunds in full, unless refund_cents says otherwise)
  - `refund_cents` integer, nullable: 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
  - `refunded_at` string, nullable, required: ISO 8601 timestamp (UTC)
  - `refund_failed_at` string, nullable, required: ISO 8601 timestamp (UTC)
  - `refund_error` string, nullable, required: Why the refund failed, as Stripe said
  - `refund_next_at` string, nullable, required: ISO 8601 timestamp (UTC)
  - `guest_cancel_hours` integer, nullable: 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)
  - `nudged_at` string, nullable: ISO 8601 timestamp (UTC)
  - `choose_by` string, nullable: ISO 8601 timestamp (UTC)
  - `waiver_token` string, nullable: 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
  - `waiver` object, nullable: bookings.get and bookings.list: how many signatures of your waiver it needs and has; null when its offering doesn't ask, or it's cancelled or a lapsed hold
    - `needed` integer, required: One per seat or guest; one for a rental
    - `signed` integer, required: Signatures so far (waiver_signatures.list names them); more may sign than a rental needs
  - `confirmed_at` string, nullable: ISO 8601 timestamp (UTC)
  - `updated_at` string, nullable: ISO 8601 timestamp (UTC)
  - `reseller_reference` string, nullable: A reseller's own reference for a booking it made over OCTO
  - `cancel_reason` string, nullable: Why a reseller cancelled it, in its words
  - `checked_in_at` string, nullable: ISO 8601 timestamp (UTC)
  - `no_show_at` string, nullable: ISO 8601 timestamp (UTC)
  - `previous` object: bookings.move: where the booking was
    - `starts_at` string, required: ISO 8601 timestamp (UTC)
    - `ends_at` string, required: ISO 8601 timestamp (UTC)
    - `session_id` string, nullable, required
  - `offering` object, required
    - `id` string, required
    - `name` string, required
    - `kind` 'class' | 'appointment' | 'rental', required: class: sessions with seats, from its calendar · appointment: times from its calendar or weekly hours · rental: inventory over periods
    - `questions` object[]: bookings.get and bookings.list: its questions, which answers answers by id
      - `id` string, required: bookings.create takes the answer to this question under this id
      - `label` string, required: The question as guests read it
      - `type` string, required: text: a line in their words · yes_no: true or false · choice: one of its options
      - `options` string[]: A choice's options: its answer is one of them, as listed
      - `required` boolean, required: Guests must answer it to book online
  - `customer` object, required
    - `id` string, required
    - `name` string, required
    - `email` string, required
    - `phone` string, required

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/daybag/apis/daybooked-io-api.md) · [All operations](https://skmtc.dev/daybag/apis/daybooked-io-api/llms.txt) · [OpenAPI document](https://skmtc.dev/daybag/apis/daybooked-io-api/revisions/1f576dead370?raw)
