> 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/it/api-di-posizionamento-annunci/ad-plac-errors.md).

# Errori

L'API di posizionamento degli annunci può restituire i seguenti codici di risposta:

| Codice | Descrizione          | Spiegazione                                                                                                                                                                          |
| ------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 400    | Richiesta non valida | Indica che i dati inviati sono formattati in modo errato.                                                                                                                            |
| 200    | OK                   | Ciò indica che la richiesta è corretta oppure che ci sono alcune zone che non è stato possibile գտrovare. La risposta ti dirà quali sono queste zone.                                |
| 500    | Errore interno       | Indica che si è verificato un errore interno ma la causa è sconosciuta. Contatta il tuo Account Manager oppure [Customer Success](https://www.exoclick.com/contact/) per assistenza. |

## Messaggi di errore 400

| Messaggio                               | Spiegazione                                                   |
| --------------------------------------- | ------------------------------------------------------------- |
| Corpo JSON non valido                   | Errore di sintassi                                            |
| Tipo di richiesta non supportato        | È stato usato il verbo di richiesta sbagliato                 |
| Questo campo manca                      | Manca un campo obbligatorio                                   |
| Questo campo non era previsto           | Alla richiesta è stato aggiunto un parametro non riconosciuto |
| Questo valore dovrebbe essere di tipo X | È stato usato il formato sbagliato per un parametro specifico |

### Esempio di errore 400

Richiesta:

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

Risposta:

```json
{
    "errors": [
        {
            "[user][ua]": "Questo campo manca."
        },
        {
            "[user][testing]": "Questo campo non era previsto."
        },
        {
            "[zones][0]": "[id] Questo valore dovrebbe essere di tipo int."
        }
    ]
}
```

## Messaggi di errore 200

| Messaggio                 | Spiegazione                                                                                                               |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| ID della zona non trovato | L'ID della zona non può essere trovato OPPURE il dominio dell'endpoint non corrisponde al formato pubblicitario richiesto |
| Zona o sito non validi    | La zona o il Publisher è bloccato.                                                                                        |

### Esempio di errore 200

In questo esempio, abbiamo richiesto annunci per più zone e alcune di esse hanno restituito errori.

Richiesta:

```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
        }   
    ]
}
```

Risposta:

```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 non trovata"
        ],
        "2": [
            "Zona 3 non trovata"
        ]
    }
}
```

## zones.data null

Molto raramente, una richiesta di zona pubblicitaria restituirà una risposta corretta, ma il `data` campo sarà nullo. Questo significa che il sistema non ha trovato annunci in grado di soddisfare la richiesta data, in base alla localizzazione dell'utente, al browser, ecc.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.exoclick.com/api/it/api-di-posizionamento-annunci/ad-plac-errors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
