> For the complete documentation index, see [llms.txt](https://docs.exoclick.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exoclick.com/api/es/api-de-colocacion-de-anuncios/ad-plac-errors.md).

# Errores

La API de colocación de anuncios puede devolver los siguientes códigos de respuesta:

| Código | Descripción          | Explicación                                                                                                                                                                                 |
| ------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400    | Solicitud incorrecta | Indica que los datos enviados tienen un formato incorrecto.                                                                                                                                 |
| 200    | OK                   | Esto indica que la solicitud es correcta o que hay algunas zonas que no se pudieron encontrar. La respuesta le dirá cuáles son esas zonas.                                                  |
| 500    | Error interno        | Indica que se produjo un error interno pero se desconoce la causa. Póngase en contacto con su gestor de cuenta o [Éxito del cliente](https://www.exoclick.com/contact/) para obtener ayuda. |

## Mensajes de error 400

| Mensaje                       | Explicación                                                   |
| ----------------------------- | ------------------------------------------------------------- |
| Cuerpo JSON mal formado       | Error de sintaxis                                             |
| Tipo de solicitud no admitido | Se usó un verbo de solicitud incorrecto                       |
| Falta este campo              | Falta un campo obligatorio                                    |
| No se esperaba este campo     | Se añadió a la solicitud un parámetro no reconocido           |
| Este valor debe ser de tipo X | Se utilizó un formato incorrecto para un parámetro específico |

### Ejemplo de error 400

Solicitud:

```json
{
    "user": {
        "testing": false
    },
    "zones": [
        {
            "id": "12345"
        }
    ]
}
```

Respuesta:

```json
{
    "errors": [
        {
            "[user][ua]": "Falta este campo."
        },
        {
            "[user][testing]": "No se esperaba este campo."
        },
        {
            "[zones][0]": "[id] Este valor debe ser de tipo int."
        }
    ]
}
```

## Mensajes de error 200

| Mensaje                     | Explicación                                                                                                      |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| ID de la zona no encontrado | No se puede encontrar el ID de la zona O el dominio del endpoint no corresponde al formato de anuncio solicitado |
| Zona o sitio no válido      | La zona o el editor está bloqueado.                                                                              |

### Ejemplo de error 200

En este ejemplo, hemos solicitado anuncios para varias zonas y algunas de ellas devolvieron errores.

Solicitud:

```json
{
    "user": {
        "ip": "179.127.135.233",
        "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0"
    },
    "zones": [
        {
            "id": 1
        },
        {
            "id": 2
        },
        {
            "id": 3
        }   
    ]
}
```

Respuesta:

```json
{
    "zones": [
        null,
        {
            "idzone": 2,
            "type": "banner",
            "data": {
                "url": "https://main.example.rocks/click.php?data=H4sIAAAAAAAAA0WPO27DQAxEr.LG7YK__bBMk8ZFzrArrZAiQQLYgFzM4UNZRUCCIMjhw_ACI69SHNYIn4_H7_2qb1d5j9z3Pc1nX.9p.fkGQAAXUvGj4n_D1RNLTaw5iSpgVoQbcbCV2CsytZgyNACBCZASPSUTOAIsSQ1qlFsOVWXeNKDDZ1cuS56j5o1Gtz7K1BonhPHVI09nB_GC1_gMtcwcTl4dHd8dIqdT2k6h4eOG5kK1.7Kts.ncyuijs64unlerZf4BvX2zxCABAAA-",
                "impression": "https://syndication.example.rocks/cimp.php?t=imp&api=1&data=H4sIAAAAAAAAAzVPSW4DMQz7Sj8wBrV5ya1FX9CiD7An9qlFD73MQY+PkmlEG5ZMwqQZjI2wMb0QLpovKk6lJeKSSCyxiL99vLqSz6Nf/9L+++MqrFKeRy3aqrlCQK24oUbfCufmqpmpgpyyiyMgCqsWr8WQtHqBf32+P3aonF2Agw3R320pRJyQyBtc4xJHUJxEvRAtiaijzS6Ud5uj2MLo2keekevuMb57rEdonEj4p54QNaL45UbngHvwKPiDjqqnPPKpwstqmHNera9OZe053DCHrdGXGPUbbttiKlIBAAA=",
                "image": "https://static.example.rocks/library/432437/42ec0144a74a1663f2973ad3070234f8e5633855.jpg"
            }
        },
        null
    ],
    "errors": {
        "0": [
            "Zona 1 no encontrada"
        ],
        "2": [
            "Zona 3 no encontrada"
        ]
    }
}
```

## zones.data nulo

Muy raramente, una solicitud de zona de anuncios devolverá una respuesta correcta, pero el `data` campo será nulo. Esto significa que el sistema no encontró anuncios que satisfagan la solicitud dada, teniendo en cuenta la configuración regional del usuario, el navegador, etc.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.exoclick.com/api/es/api-de-colocacion-de-anuncios/ad-plac-errors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
