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

# Error Examples

## Zone ID not recognised

In the example below, ads are requested for multiple zones and errors are returned for some zones. The zone ID was not found for two of them.

### Request: JSON <a href="#request-json" id="request-json"></a>

```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": 123
        },
        {
            "id": 213
        },
        {
            "id": 312
        }   
    ]
}
```

### Response: JSON <a href="#response-json" id="response-json"></a>

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

## Zone contains unacceptable field <a href="#zone-contains-unacceptable-field" id="zone-contains-unacceptable-field"></a>

In this example, the request contains the unacceptable field `testing`.

### Request: JSON <a href="#request-json-1" id="request-json-1"></a>

```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,
            "testing": false
        }
    ]
}
```

### Response: JSON <a href="#response-json-1" id="response-json-1"></a>

```json
{
    "errors": [
        {
            "[zones][0][testing]": "This field was not expected."
        }
    ]
}
```

## Required field missing and incorrect field added <a href="#required-field-missing-and-incorrect-field-added" id="required-field-missing-and-incorrect-field-added"></a>

In this example, the request is missing the required field `IP`, and contains the unacceptable field `testing`.

### Request: JSON <a href="#request-json-2" id="request-json-2"></a>

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

### Response: JSON <a href="#response-json-2" id="response-json-2"></a>

```json
{
    "errors": [
        {
            "[user][ip]": "This field is missing."
        },
        {
            "[user][testing]": "This field was not expected."
        }
    ]
}

```


---

# 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.exads.com/api/ad-placement-api/ad-plac-error-examples.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.
