> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keebai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/scheduling/resources/availability

> Free time blocks of the block resources of a branch, day by day, with the room left and the price of each block.

Returns, for each day of the range, the blocks each `block` resource of the branch still has room for. A block that is outside the resource's hours, too soon, or already full does not show up.

Resources booked by night never appear here. For them use [GET resources/stays/availability](https://docs.keebai.com/dev/endpoints/scheduling-resource-stays-availability.md).

## Endpoint

```
GET https://api.keebai.com/v1/scheduling/resources/availability
```

## Required scope

`scheduling:availability:read`

## Query params

```json theme={"system"}
{
  "branch_id": "665f00000000000000000b02",
  "date_from": "2026-12-03",
  "date_to": "2026-12-05",
  "resource_id": "665f00000000000000000a03",
  "party_size": 4,
  "duration_minutes": 90,
  "exclude_booking_id": "665f00000000000000000c01"
}
```

* `branch_id`, `date_from`, `date_to`: required. Dates are `YYYY-MM-DD` in the branch timezone, both included. The range covers at most 31 days (`date_to` up to 30 days after `date_from`); a longer one returns `400 INVALID_DATE_RANGE`.
* `resource_id`: only that resource.
* `party_size`: how many people the block must fit. Defaults to 1.
* `duration_minutes`: one of the resource's `durations_minutes`. Defaults to the first one listed.
* `exclude_booking_id`: the booking you are moving. It does not count against the room, so its own block shows up as free.

## Example request

```bash curl theme={"system"}
curl -G https://api.keebai.com/v1/scheduling/resources/availability \
  -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  --data-urlencode "branch_id=665f00000000000000000b02" \
  --data-urlencode "date_from=2026-12-03" \
  --data-urlencode "date_to=2026-12-03" \
  --data-urlencode "duration_minutes=90"
```

## Response

### 200 OK

```json theme={"system"}
{
  "days": [
    {
      "date": "2026-12-03",
      "resources": [
        {
          "resource_id": "665f00000000000000000a03",
          "name": "Cancha 2",
          "booking_mode": "exclusive",
          "capacity": 1,
          "color": "#0ea5e9",
          "slots": [
            {
              "start": "2026-12-03T22:00:00.000Z",
              "end": "2026-12-03T23:30:00.000Z",
              "start_time": "19:00",
              "end_time": "20:30",
              "remaining": 1,
              "price": 24000
            }
          ]
        }
      ]
    }
  ]
}
```

* `slots[].start_time` and `end_time` are local times in the branch timezone. `start` and `end` are the same instants in UTC.
* `remaining`: room left in the block. In a `shared` resource it is the capacity minus the most people booked at the same time inside the block.
* `price`: price of the block for the requested duration and party size.

Book a block by sending its `date` and `start_time` to [POST booking/resource-bookings](https://docs.keebai.com/dev/endpoints/scheduling-resource-booking-create.md).

### 400 Bad Request

```json theme={"system"}
{
  "error": {
    "code": "INVALID_DATE_RANGE",
    "message": "The range cannot exceed 31 days"
  }
}
```

### 404 Not Found

```json theme={"system"}
{
  "error": {
    "code": "SCHEDULING_UPSTREAM_ERROR",
    "message": "BRANCH_NOT_FOUND"
  }
}
```

The branch, or the `resource_id`, does not exist or belongs to another company. On this endpoint the reason comes in `message` (`BRANCH_NOT_FOUND` or `RESOURCE_NOT_FOUND`).

### 401 Unauthorized · 403 Forbidden

Same semantics as the rest of the public API.


## OpenAPI

````yaml GET /v1/scheduling/resources/availability
openapi: 3.0.0
info:
  title: Keebai Public API
  description: Superficie pública REST autenticada con Personal Access Tokens (PAT).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.keebai.com
    description: Production
security: []
tags: []
paths:
  /v1/scheduling/resources/availability:
    get:
      tags:
        - scheduling-resources
      summary: Free blocks of block resources
      description: >-
        Day by day, the blocks each `block` resource of the branch still has
        room for. Night resources never show up here: use the stays
        availability.
      operationId: PublicResourcesController_availability
      parameters:
        - name: branch_id
          required: true
          in: query
          schema:
            type: string
        - name: date_from
          required: true
          in: query
          schema:
            type: string
            example: '2026-12-03'
        - name: date_to
          required: true
          in: query
          description: Last day, included. The range covers at most 31 days.
          schema:
            example: '2026-12-09'
            type: string
        - name: resource_id
          required: false
          in: query
          schema:
            type: string
        - name: party_size
          required: false
          in: query
          schema:
            type: number
            minimum: 1
        - name: duration_minutes
          required: false
          in: query
          schema:
            minimum: 15
            type: number
        - name: exclude_booking_id
          required: false
          in: query
          description: >-
            Booking (or legacy resource appointment) being moved: it does not
            count.
          schema:
            type: string
      responses:
        '200':
          description: ''
      security:
        - PAT: []
components:
  securitySchemes:
    PAT:
      scheme: bearer
      bearerFormat: kbai_pk_<hex>
      type: http
      description: >-
        Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal
        con permiso `developer.manage_tokens`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.