{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/zh/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"通用响应格式","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"通用响应格式","__idx":0},"children":["通用响应格式"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["所有 MoreLogin API 响应都遵循标准 JSON 格式。"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"响应结构","__idx":1},"children":["响应结构"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 0,\n  \"msg\": null,\n  \"data\": {},\n  \"requestId\": \"unique-request-id\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"领域"},"children":["领域"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"类型"},"children":["类型"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"描述"},"children":["描述"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["integer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["结果代码。 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}," = 成功，其他值表示错误"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["msg"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["字符串| 空"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["错误消息。成功时为 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["对象| 数组| 空"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["响应负载。结构因端点而异"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requestId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["唯一的请求标识符。联系支持人员时请包含此信息"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"成功响应","__idx":2},"children":["成功响应"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 0,\n  \"msg\": null,\n  \"data\": {\n    \"id\": 1234567890\n  },\n  \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"错误响应","__idx":3},"children":["错误响应"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 99001,\n  \"msg\": \"Invalid parameters\",\n  \"data\": null,\n  \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"分页响应","__idx":4},"children":["分页响应"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["列表端点返回以下格式的分页数据："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 0,\n  \"msg\": null,\n  \"data\": {\n    \"total\": 100,\n    \"current\": 1,\n    \"pages\": 10,\n    \"dataList\": [\n      { ... },\n      { ... }\n    ]\n  },\n  \"requestId\": \"...\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"领域"},"children":["领域"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"描述"},"children":["描述"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["记录总数"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["current"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["当前页码"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pages"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["总页数"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dataList"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["当前页面的记录数组"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"http-状态代码","__idx":5},"children":["HTTP 状态代码"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"状态"},"children":["状态"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"描述"},"children":["描述"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["请求已成功处理（检查 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," 字段以获取业务结果）"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["未经授权 - 访问令牌无效或过期"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["禁止 — 权限不足"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["请求过多 — 超出速率限制"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["内部服务器错误 — 联系支持人员"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["提示"]},"：始终检查响应正文中的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," 字段，而不仅仅是 HTTP 状态代码。带有 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code: 99001"]}," 的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," HTTP 状态表示已收到请求但验证失败。"]}]}]},"headings":[{"value":"通用响应格式","id":"通用响应格式","depth":1},{"value":"响应结构","id":"响应结构","depth":2},{"value":"成功响应","id":"成功响应","depth":2},{"value":"错误响应","id":"错误响应","depth":2},{"value":"分页响应","id":"分页响应","depth":2},{"value":"HTTP 状态代码","id":"http-状态代码","depth":2}],"frontmatter":{"seo":{"title":"通用响应格式"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh/api-reference/getting-started/response-format","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}