> For the complete documentation index, see [llms.txt](https://docs.coda.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coda.co/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/http-zhuang-tai-dai-ma-he-cuo-wu-dai-ma.md).

# HTTP 状态代码和错误代码

## HTTP 状态代码

| HTTP 代码 | 描述       |
| ------- | -------- |
| 200     | 一切都按预期进行 |
| 201     | 创建成功     |

## 错误代码 <a href="#error-code" id="error-code"></a>

<table><thead><tr><th width="125">HTTP 代码</th><th width="92">状态码</th><th>描述</th></tr></thead><tbody><tr><td>400</td><td>400</td><td>伺服器遇到违反验证约束或无效 Http Method 或无效验证等的请求</td></tr><tr><td>401</td><td>401</td><td>用户未经授权</td></tr><tr><td>404</td><td>404</td><td>请求的资源不存在</td></tr><tr><td>422</td><td>422</td><td>伺服器理解请求，但提供的数据存在问题</td></tr><tr><td>500</td><td>500</td><td>伺服器端发生意外错误</td></tr></tbody></table>

## 错误响应示

{% tabs %}
{% tab title="示例 1" %}

```json
{
    "errors": [
        {
            "message": "There was an issue with the data you provided. Please check again. pmt_s"
        }
    ],
    "status": 422,
    "title": "Unprocessable Entity"
}
```

{% endtab %}

{% tab title="示例 2" %}

```json
{
    "errors": [
        {
            "message": "phone_number size must be between 12 and 16"
        },
        {
            "message": "phone_number must match \"\\+[0-9]+\""
        }
    ],
    "status": 400,
    "title": "Constraint Violation"
}
```

{% endtab %}

{% tab title="示例 3" %}

```json
{
    "errors": [
        {
            "message": "Something went wrong on the server. Please try again later."
        }
    ],
    "status": 500,
    "title": "Internal Server Error"
}
```

{% endtab %}

{% tab title="示例 4" %}

```json
{
    "message": "Unauthorized"
}
```

{% endtab %}
{% endtabs %}

<br>


---

# 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.coda.co/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/tokenization-api-2.0/http-zhuang-tai-dai-ma-he-cuo-wu-dai-ma.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.
