← capabilitiesscheduling.read

check_availability

booking.check_availability · v0.1.0

Return the open time slots for a given service on a given date.

Semantics

Read-only. Returns a list of slots, each with `start_at`, `end_at`, and `available: boolean`. Slots already in the past are not returned. The slots are aligned to the provider's working hours and service duration.

Invariants

  • Pure read. No state change.
  • Returns slots in chronological order.
  • `available: true` slots are a snapshot — they may be taken before `create_booking` is called. Conflicts at booking time return `slot_taken` with current alternatives.
  • If `service_id` is unknown to the provider, returns `error: "invalid_service"`.

When to use

Always before `create_booking`, unless the user has been shown explicit alternatives in a prior turn that still hold.

Input schema

{
  "type": "object",
  "required": [
    "service_id",
    "date"
  ],
  "properties": {
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "ISO date (YYYY-MM-DD) in the service's local timezone."
    },
    "service_id": {
      "type": "string"
    },
    "duration_minutes": {
      "type": "number",
      "minimum": 5,
      "description": "Override the service's default duration if it supports multiple lengths."
    }
  },
  "additionalProperties": false
}

Output schema

{
  "type": "object",
  "required": [
    "ok"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "error": {
      "enum": [
        "invalid_service",
        "invalid_date",
        "no_slots"
      ],
      "type": "string"
    },
    "slots": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "start_at",
          "end_at",
          "available"
        ],
        "properties": {
          "end_at": {
            "type": "string",
            "format": "date-time"
          },
          "start_at": {
            "type": "string",
            "format": "date-time"
          },
          "available": {
            "type": "boolean"
          }
        }
      }
    },
    "service": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "duration_minutes": {
          "type": "number"
        }
      }
    },
    "timezone": {
      "type": "string"
    }
  }
}

Recent conformance runs

passprovidertestmswhen
bookio:studio-sanghano_past_slots16905-18 19:49
bookio:studio-sangharejects_unknown_service6805-18 19:49
bookio:studio-sanghahappy_path17105-18 19:49
bookio:verde-wellness-austinno_past_slots19305-18 19:49
bookio:verde-wellness-austinrejects_unknown_service7505-18 19:49
bookio:verde-wellness-austinhappy_path18105-18 19:49
bookio:aurora-hair-brooklynno_past_slots17705-18 19:49
bookio:aurora-hair-brooklynrejects_unknown_service7905-18 19:49
bookio:aurora-hair-brooklynhappy_path20205-18 19:49
bookio:bistro-modra-houbano_past_slots18105-18 19:49
bookio:bistro-modra-houbarejects_unknown_service6605-18 19:49
bookio:bistro-modra-houbahappy_path17405-18 19:49
bookio:salon-aurorano_past_slots17605-18 19:49
bookio:salon-aurorarejects_unknown_service6705-18 19:49
bookio:salon-aurorahappy_path18405-18 19:49
bookio:massage-relaxno_past_slots19505-18 19:49
bookio:massage-relaxrejects_unknown_service7005-18 19:49
bookio:massage-relaxhappy_path19305-18 19:49
bookio:ink-quarter-portlandno_past_slots24105-18 19:49
bookio:ink-quarter-portlandrejects_unknown_service8705-18 19:49
bookio:ink-quarter-portlandhappy_path21505-18 19:49
bookio:ink-houseno_past_slots23005-18 19:49
bookio:ink-houserejects_unknown_service7405-18 19:49
bookio:ink-househappy_path20505-18 19:49
bookio:fitness-zelenano_past_slots26405-18 19:49
bookio:fitness-zelenarejects_unknown_service7405-18 19:49
bookio:fitness-zelenahappy_path20205-18 19:49
bookio:dental-vinohradyno_past_slots18105-18 19:49
bookio:dental-vinohradyrejects_unknown_service8205-18 19:49
bookio:dental-vinohradyhappy_path104505-18 19:49