> Documentation index: https://docs.dev.repp.co.il/llms.txt - fetch it to find every page of these docs.

# Free hours

The spaces with an hour still free on a day (at an hour, when you give one), each with its free hours.

- `GET https://api.dev.repp.co.il/v1/free-spaces`
- Needs a key: `Authorization: Bearer repp_…`.

The day is from today to a year ahead. An hour is free when the space is open then and nobody booked it or asked for it; hours that already went by today are not free. Booking stays on the site.

## Query parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `date` **(required)** | YYYY-MM-DD | — | The day, from today to a year ahead. |
| `hour` | integer 0–23 | — | Only spaces free at this hour, 0 to 23 (11 = 11:00-12:00). |

## Request

**cURL**

```bash
curl "https://api.dev.repp.co.il/v1/free-spaces?date=2026-12-02&hour=11" \
  -H "Authorization: Bearer $REPP_API_KEY"
```

**JavaScript**

```js
const response = await fetch("https://api.dev.repp.co.il/v1/free-spaces?date=2026-12-02&hour=11", {
  headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}` },
});
if (!response.ok) throw new Error((await response.json()).error.message);
const data = await response.json();
```

**TypeScript**

```ts
/** Spaces with free hours on one day. */
interface FreeSpaces {
  items: FreeSpace[];
}

/** A space with hours still free on the day you asked for. */
interface FreeSpace {
  space: Space;
  free_hours: number[];
}

/** A space for rent by the hour. */
interface Space {
  id: string;
  name: string;
  photo_url: string | null;
  region: Region;
  city: string | null;
  price_per_hour: number;
  capacity: number;
  days: number[];
  open_from: string;
  open_to: string;
  business: Business;
}

/** A region of Israel: one of the keys in Catalog. */
type Region = "gush_dan" | "shfela" | "sharon" | "haifa" | "jerusalem" | "north" | "south" | "judea_samaria";

/** A business, as the public index shows it. */
interface Business {
  id: string;
  name: string;
  photo_url: string | null;
}

interface ApiError {
  error: { code: string; message: string; reason?: string };
}

const response = await fetch("https://api.dev.repp.co.il/v1/free-spaces?date=2026-12-02&hour=11", {
  headers: { Authorization: `Bearer ${process.env.REPP_API_KEY}` },
});
if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message);
const data = (await response.json()) as FreeSpaces;
```

**Python**

```python
import os

import requests

response = requests.get(
    "https://api.dev.repp.co.il/v1/free-spaces?date=2026-12-02&hour=11",
    headers={"Authorization": f"Bearer {os.environ['REPP_API_KEY']}"},
    timeout=30,
)
if not response.ok:
    raise RuntimeError(response.json()["error"]["message"])
data = response.json()
```

**PHP**

```php
<?php
$ch = curl_init("https://api.dev.repp.co.il/v1/free-spaces?date=2026-12-02&hour=11");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("REPP_API_KEY"),
    ],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($data["error"]["message"]);
}
```

## Response (200)

```json
{
  "items": [
    {
      "space": {
        "id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
        "name": "מתחם הקומה השנייה",
        "photo_url": null,
        "region": "gush_dan",
        "city": "רמת גן",
        "price_per_hour": 90,
        "capacity": 12,
        "days": [
          0,
          1,
          2,
          3,
          4
        ],
        "open_from": "11:00",
        "open_to": "16:00",
        "business": {
          "id": "7c1f6a52-3b8e-4d1a-9f0e-2a6b8c4d5e10",
          "name": "סטודיו נועה",
          "photo_url": null
        }
      },
      "free_hours": [
        11,
        12,
        14,
        15
      ]
    }
  ]
}
```

## Response fields

| Field | Type | Description |
| --- | --- | --- |
| `items` | array of FreeSpace | The spaces with an hour still free that day. |
| `items[].space` | Space | A space for rent by the hour. |
| `items[].space.id` | string | Identifier. |
| `items[].space.name` | string | The space's name. |
| `items[].space.photo_url` | string, nullable | The space's photo, or null. |
| `items[].space.region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. |
| `items[].space.city` | string, nullable | The town, from our list of towns, or null. |
| `items[].space.price_per_hour` | integer | Rent for one hour, in whole shekels. |
| `items[].space.capacity` | integer | How many people fit in it. |
| `items[].space.days` | array of integer | The weekdays it can be rented, 0 = Sunday. |
| `items[].space.open_from` | string | Opening time. |
| `items[].space.open_to` | string | Closing time. |
| `items[].space.business` | Business | A business, as the public index shows it. |
| `items[].free_hours` | array of integer | The hours still free that day, each the start of one hour (11 = 11:00-12:00), in order. |

## Errors

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | `bad_parameter` | A parameter is not one the endpoint accepts. The message names it. |
| 401 | `missing_key` | The endpoint needs a key and no Authorization header came. |
| 401 | `bad_key` | The key is not one of ours, was revoked, or its account was closed or blocked. |
| 429 | `too_many_requests` | Over the rate limit. Wait the seconds in `Retry-After` (60) and go on. |
| 500 | `server_error` | Something failed on our side. Try again shortly. |
