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

# One space

One space for rent. `404` once it is no longer rented out.

- `GET https://api.dev.repp.co.il/v1/spaces/{id}`
- Public: no key.

## Path parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `id` **(required)** | uuid | — | The space's id. |

## Request

**cURL**

```bash
curl "https://api.dev.repp.co.il/v1/spaces/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e"
```

**JavaScript**

```js
const response = await fetch("https://api.dev.repp.co.il/v1/spaces/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e");
if (!response.ok) throw new Error((await response.json()).error.message);
const data = await response.json();
```

**TypeScript**

```ts
/** 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/spaces/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e");
if (!response.ok) throw new Error(((await response.json()) as ApiError).error.message);
const data = (await response.json()) as Space;
```

**Python**

```python
import requests

response = requests.get(
    "https://api.dev.repp.co.il/v1/spaces/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
    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/spaces/b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($data["error"]["message"]);
}
```

## Response (200)

```json
{
  "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
  }
}
```

## Response fields

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Identifier. |
| `name` | string | The space's name. |
| `photo_url` | string, nullable | The space's photo, or null. |
| `region` | one of: gush_dan, shfela, sharon, haifa, jerusalem, north, south, judea_samaria | A region of Israel: one of the keys in Catalog. |
| `city` | string, nullable | The town, from our list of towns, or null. |
| `price_per_hour` | integer | Rent for one hour, in whole shekels. |
| `capacity` | integer | How many people fit in it. |
| `days` | array of integer | The weekdays it can be rented, 0 = Sunday. |
| `open_from` | string | Opening time. |
| `open_to` | string | Closing time. |
| `business` | Business | A business, as the public index shows it. |
| `business.id` | string | Identifier. |
| `business.name` | string | The business's name. |
| `business.photo_url` | string, nullable | The business's photo, or null. |

## Errors

| Status | Code | Meaning |
| --- | --- | --- |
| 404 | `not_found` | No such endpoint, or no such item for this caller. |
| 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. |
