# Get one block

> Returns one block of the trip's itinerary, with its full `data` and its current `version`.

`GET /v1/trips/{tripId}/itinerary/blocks/{blockId}`

Returns one block of the trip's itinerary, with its full `data` and its current `version`.

**Permissions:** `trips:read` · **Kind:** read · **Cost:** 1 unit



## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `tripId` | uuid | yes |  |
| `blockId` | uuid | yes |  |

## Query parameters

_None._

## Response `200`

| Field | Type | Required | Description |
|---|---|---|---|
| `object` | "block" | yes |  |
| `id` | uuid | yes |  |
| `type` | "titulo" \| "texto" \| "imagen" \| "agenda" \| "dia" \| "caja" \| "desplegable" \| "seccion" \| "capitulo" \| "derivado" \| "actividad" \| "alojamiento" \| "vuelo" \| "comida" \| "transporte" \| "tren" \| "crucero" \| "informacion" \| "galeria" \| "video" \| "mapa" \| "html" \| "itinerario" | yes |  |
| `parentId` | uuid \| null | yes |  |
| `rank` | string | yes |  |
| `data` | object | yes |  |
| `layout` | object | yes |  |
| `layout.colSpan` | 1 \| 2 \| 3 |  | default 3 |
| `layout.hidden` | boolean |  | Hide this block (and its children) from the traveler. |
| `version` | integer | yes |  |
| `source` | object \| null | yes |  |
| `source.kind` | string | yes |  |
| `source.key` | string | yes |  |

## Errors

Errors are [problem details](https://api.bymundi.com/docs/guides/errors.md). Besides the refusals described above, any call like this one can return:

- [`invalid_request`](https://api.bymundi.com/problems/invalid_request.md) — Invalid request
- [`unauthorized`](https://api.bymundi.com/problems/unauthorized.md) — Missing or invalid API key
- [`insufficient_scope`](https://api.bymundi.com/problems/insufficient_scope.md) — Missing permission
- [`rate_limited`](https://api.bymundi.com/problems/rate_limited.md) — Rate limit reached
- [`not_found`](https://api.bymundi.com/problems/not_found.md) — Not found

## Examples

#### curl

```bash
curl https://api.bymundi.com/v1/trips/$TRIP_ID/itinerary/blocks/$BLOCK_ID \
  -H "Authorization: Bearer $BYMUNDI_KEY"
```

#### JavaScript

```javascript
const res = await fetch(`https://api.bymundi.com/v1/trips/${tripId}/itinerary/blocks/${blockId}`, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BYMUNDI_KEY}`,
  },
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();
```

#### Python

```python
import os, uuid, requests

res = requests.get(
    f"https://api.bymundi.com/v1/trips/{tripId}/itinerary/blocks/{blockId}",
    headers={"Authorization": f"Bearer {os.environ['BYMUNDI_KEY']}"},
)
res.raise_for_status()
data = res.json()
```
