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

# Obtener bloque CMS

> Obtiene un bloque CMS ACTIVE por su nombre reservado para el merchant y environment.

Devuelve un bloque CMS por su `name` único. Úsalo después de reservar un nombre en el dashboard (por ejemplo `legal-tos`) para que el storefront renderice texto, imágenes, videos o documentos.

> [!NOTE]
>
> Requiere un access token de Fire spark obtenido mediante [intercambio de
> token](https://firespark.cloud/docs/es/storefront-api/oauth/exchange/post.md).

## Parámetros de path

| Parámetro | Obligatorio | Descripción |
| - | - | - |
| `name` | Sí | Nombre reservado del bloque. Solo minúsculas, números y guiones (ej. `legal-tos`). Único por merchant y environment. |

## Request

```bash theme={null}
curl "https://firespark.cloud/api/storefront/v1/cms/blocks/legal-tos" \
  -H "Authorization: Bearer ACCESS_TOKEN"
```

## Response

La respuesta envuelve un solo bloque en `data`.

```json Success theme={null}
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "home-hero",
    "status": "ACTIVE",
    "items": [
      {
        "id": "11111111-1111-1111-1111-111111111111",
        "type": "TEXT",
        "key": "headline",
        "label": "Titular",
        "text": "Pide en anticipado"
      },
      {
        "id": "22222222-2222-2222-2222-222222222222",
        "type": "LIST",
        "key": "banners",
        "label": "Banners",
        "item_type": "IMAGE",
        "items": [
          {
            "id": "33333333-3333-3333-3333-333333333333",
            "type": "IMAGE",
            "url": "https://example.com/banner-1.jpg",
            "alt": "Oferta de verano"
          },
          {
            "id": "44444444-4444-4444-4444-444444444444",
            "type": "IMAGE",
            "url": "https://example.com/banner-2.jpg",
            "alt": "Menú nuevo"
          }
        ]
      }
    ]
  }
}
```

Busca un slot con `items.find(i => i.key === "banners")`. Si `type` es `LIST`, renderiza `items` en orden.

## Límites

| Restricción | Valor |
| - | - |
| Ítems de primer nivel por bloque | 1–25 |
| Entradas por `LIST` | 1–10 |
| Imagen | ≤ 5 MB |
| Video | ≤ 50 MB |
| Documento | ≤ 10 MB |

Consulta [CMS](https://firespark.cloud/docs/es/concepts/cms.md) para plantillas, bloques y tipos de ítem.

## Errores

| Status | Descripción |
| - | - |
| `401` | Access token ausente o inválido. |
| `404` | No hay bloque ACTIVE con el `name` indicado. |


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