# Courts, rooms and equipment – Tiempo

> Book padel and tennis courts, meeting rooms, studios and hire kit: any-court searches on an hourly grid, equipment pools with quantities, maintenance blocks and recurring league slots.

Source: https://tiempo.one/docs/courts-and-rooms

Sports clubs, rehearsal studios, meeting rooms and hire shops book _things_ rather than people. Each court or room is a resource with opening hours; a pile of identical kit is one resource with a capacity. The same engine that stops two haircuts landing on one barber stops two matches landing on one court.

At the club

In Tiempo

Court 1, Court 2 (customers care which)

A resource each

“Any court”

A list of candidate resources

Twelve identical rackets

One resource with capacity 12; bookings take a quantity

Opening hours, peak and off-peak

Schedules (prices stay in your app)

Resurfacing, a tournament

Blocks

## Any court, on the hour

Search with every court as a candidate and `interval_minutes: 60` (or 30) so slots start where your club’s do. Each slot lists which courts are free. Book with the same list and Tiempo takes the first that’s still free, so two players racing for “any court” never get the same one.

Add kit to the same search as a second segment with a `quantity`: a slot only appears if there are enough rackets too.

90 minutes on any court, with 2 rackets

```bash
curl -X POST "$TIEMPO/v1/availability" \
  -H "Authorization: Bearer $TIEMPO_KEY" \
  -H "Tiempo-Account: $ACCOUNT" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "2026-11-21T00:00:00Z",
    "to": "2026-11-22T00:00:00Z",
    "timezone": "Europe/Madrid",
    "interval_minutes": 60,
    "segments": [
      {
        "resources": [
          "res_court_1",
          "res_court_2",
          "res_court_3"
        ],
        "duration_minutes": 90
      },
      {
        "resources": [
          "res_rackets"
        ],
        "duration_minutes": 90,
        "quantity": 2
      }
    ]
  }'
```

## Book the court and the kit together

One booking holds both, so they’re confirmed or released together. Hold while the player pays. To split the cost between four players, set a longer `expires_at` (up to your platform’s maximum hold, set in the dashboard) and confirm when the last one pays.

Turnaround time between matches is a buffer on the court (`buffer_after_minutes`): it’s held after every match without changing the match’s length.

Hold court and rackets

```bash
curl -X POST "$TIEMPO/v1/bookings" \
  -H "Authorization: Bearer $TIEMPO_KEY" \
  -H "Tiempo-Account: $ACCOUNT" \
  -H "Idempotency-Key: match_3307-hold" \
  -H "Content-Type: application/json" \
  -d '{
    "segments": [
      {
        "resources": [
          "res_court_1",
          "res_court_2",
          "res_court_3"
        ],
        "start": "2026-11-21T10:00:00Z",
        "end": "2026-11-21T11:30:00Z"
      },
      {
        "resource": "res_rackets",
        "quantity": 2,
        "start": "2026-11-21T10:00:00Z",
        "end": "2026-11-21T11:30:00Z"
      }
    ],
    "metadata": {
      "match_id": "match_3307"
    }
  }'
```

## Maintenance and broken kit

Block a court for resurfacing by date, or a few hours for a coaching clinic. Block part of a pool with a `quantity` when two rackets are out for restringing. Bookings that no longer fit are flagged `conflicted` with a webhook, so staff can move them.

Court 1 closed all day

```bash
curl -X POST "$TIEMPO/v1/blocks" \
  -H "Authorization: Bearer $TIEMPO_KEY" \
  -H "Tiempo-Account: $ACCOUNT" \
  -H "Content-Type: application/json" \
  -d '{
    "resource": "res_court_1",
    "start_date": "2026-11-21",
    "end_date": "2026-11-21",
    "reason": "resurfacing"
  }'
```

## Leagues, coaching and memberships

-   **A league slot every Wednesday:** a [series](https://tiempo.one/docs/series) books the court every week. Weeks that clash are skipped and reported, not double-booked.
-   **Coaching with a coach and a court:** two segments, the coach and any court.
-   **Group clinics:** a session with seats; players take places as attendees (see [classes](https://tiempo.one/docs/classes)).
-   **Members book further ahead:** booking windows are yours to apply. Search the range a customer is allowed to see.

A club with several sites is one account with [locations](https://tiempo.one/docs/multi-location); a network of independent clubs is one account per club.

The machine-readable description is at [/openapi.json](https://tiempo.one/openapi.json). Try calls in [Swagger UI](https://tiempo.one/swagger-ui.html).[Tiempo home](https://tiempo.one/)[Dashboard](https://tiempo.one/app)
