> 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/ja/guang-gao-pei-zhi-api/ad-plac-errors.md).

# エラー

Ad Placement API は次のレスポンスコードを返すことがあります:

| コード | 説明       | 説明                                                                                                           |
| --- | -------- | ------------------------------------------------------------------------------------------------------------ |
| 400 | 不正なリクエスト | 送信されたデータの形式が正しくないことを示します。                                                                                    |
| 200 | OK       | これは、リクエストが正しいか、または見つからないゾーンがあることを示します。レスポンスで、どのゾーンが該当するかが示されます。                                              |
| 500 | 内部エラー    | 内部エラーが発生しましたが、原因は不明であることを示します。担当のアカウントマネージャー、または [カスタマーサクセス](https://www.exoclick.com/contact/) にお問い合わせください。 |

## 400 エラーメッセージ

| メッセージ              | 説明                        |
| ------------------ | ------------------------- |
| 不正な JSON 本文        | 構文エラー                     |
| サポートされていないリクエストタイプ | 使用されたリクエスト動詞が誤っています       |
| このフィールドがありません      | 必須フィールドがありません             |
| このフィールドは予期されていません  | 認識されないパラメータがリクエストに追加されました |
| この値は X 型である必要があります | 特定のパラメータに誤った形式が使用されています   |

### 400 エラーの例

リクエスト:

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

レスポンス:

```json
{
    "errors": [
        {
            "[user][ua]": "このフィールドがありません。"
        },
        {
            "[user][testing]": "このフィールドは予期されていません。"
        },
        {
            "[zones][0]": "[id] この値は int 型である必要があります。"
        }
    ]
}
```

## 200 エラーメッセージ

| メッセージ           | 説明                                                    |
| --------------- | ----------------------------------------------------- |
| ゾーン ID が見つかりません | ゾーン ID が見つからない、またはエンドポイントのドメインが要求された広告フォーマットに対応していません |
| ゾーンまたはサイトが無効です  | ゾーンまたはパブリッシャーがブロックされています。                             |

### 200 エラーの例

この例では、複数のゾーンに対して広告をリクエストしており、そのうちのいくつかでエラーが返されています。

リクエスト:

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

レスポンス:

```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": [
            "ゾーン 1 が見つかりません"
        ],
        "2": [
            "ゾーン 3 が見つかりません"
        ]
    }
}
```

## zones.data は null

ごくまれに、広告ゾーンのリクエストは正しいレスポンスを返しますが、 `data` フィールドが null になります。これは、システムがユーザーの地域、ブラウザなどを考慮したうえで、該当するリクエストを満たす広告を見つけられなかったことを意味します。


---

# 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/ja/guang-gao-pei-zhi-api/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.
