Booking Codes

Per-range availability for the appointment type bound to a booking code

Changed on

Unauthenticated, code-gated per-range availability for an appointment type.

POST /public/booking/appointment-type-availability/ ports public_api.queries.Query.appointment_type_availability_with_code to REST. A POST (not GET) because it takes a list of ranges, matching the existing authenticated AppointmentTypeViewSet.availability action, which is also a POST for the same reason. The appointment type comes from the resolved token (token.appointment_type, falling back to token.event.appointment_type); a single-calendar code is rejected via the same uniform 403.

post/public/booking/appointment-type-availability/

Request

  • The document declares no server URL.
  • Auth: none declared. Required headers: X-Booking-Code

Query parameters

limitinteger

Number of results to return per page.

offsetinteger

The initial index from which to return the results.

Headers

X-Booking-Codestring required

Single-use booking code. Every failure -- invalid, expired, used, revoked, or wrong-scope -- returns the same 403 {"detail": "Invalid or expired code."}; this endpoint never discloses which one occurred. Repeatable: never consumed by a read.

Request body

Response

countinteger required
nextstring uri nullable
previousstring uri nullable

Example response

{
  "count": 123,
  "next": "http://api.example.org/accounts/?offset=400&limit=100",
  "previous": "http://api.example.org/accounts/?offset=200&limit=100"
}

Changes