服务卡片 · 工具与字段 JSON · 纯文本说明
# 小钉快跑:紧固件采购与配送服务
小钉快跑面向企业提供紧固件选型、询报价、采购与配送服务:苏州、青岛、东莞等地自建仓库,苏州中心仓为 6 万平方米现代立体仓库,十大类目 70 万+SKU 常备现货;自营物流联合第三方物流公司、公路专线市场与网络货运平台,全国可发,长三角、珠三角最快当日达,并支持 AI 询报价及 MCP / WebMCP 接入。
平台与采购服务:https://www.xdkp.com/overview/
AI 接入说明:https://www.xdkp.com/overview/#ai-access
# 小钉快跑商城远程 MCP 接入
MCP Endpoint: https://ai.xdkp8.com/mcp
Transport: Streamable HTTP(无状态)
本文仅说明远程 MCP 接入。网页内 WebMCP 使用当前商城登录状态,通过浏览器原生 API 注册工具;不通过本文、meta 或远程 MCP 自动连接。
本商城提供 MCP 商品查询、购物车整理、订单与报价工具。客户端需要支持并允许连接 MCP;HTML、llms.txt 和实验性的 ai-catalog/server-card 仅帮助发现,不保证自动接入。
登录支持账号密码工具,以及官网 OAuth 授权码 + PKCE S256。没有账号的用户可通过 send_register_code 向本人手机号发送短信验证码,再用 register 提交验证码、密码、联系人、公司和省市区完成注册;注册成功直接返回 MCP Token(三项权限)。发码前须征得用户同意,同一手机号 60 秒 1 次、每天 5 次,验证码 5 分钟有效、输错 5 次失效;已注册手机号不发码。注册须用户接受《小钉快跑使用协议》和《客户隐私协议》(agreeTerms=true)。推荐浏览器官网授权,由客户端保存 MCP Token。密码直登参数为原始密码,HTTPS 保护公网传输;AI/客户端可能读取这些参数。密码不应写入日志或持久保存。官网 Token 不能调用 MCP,MCP Token 也不能调用普通商城 API。
账号密码直登 Token 默认闲置 72 小时失效,活跃请求剩余不足 24 小时时续期,绝对期限 365 天;OAuth access_token 有效期 1 小时,refresh_token 轮换且受同一会话期限约束。客户端应安全保存 Token,后续请求使用 Authorization: Bearer。仅密码直登 Token 支持 accessToken 工具参数兼容;OAuth Token 不得放参数或 URL。
权限:shop:read 查询(含购物车);quote:submit 提交 AI 报价;cart:write 追加、改量、锁定/解锁及删除购物车。支持查询商品、购物车、订单、收货地址、开票记录、报价额度和结果。旧会话不会自动获得 cart:write;需要重新授权或登录。不支持下单、支付、地址新增/修改/删除/设置默认、开票申请。logout 撤销当前 MCP 会话;修改密码、冻结客户、后台强制退出会撤销对应会话。
AI 可以帮助查询商品、预览费用、加入购物车、修改份数、锁定或解锁和删除购物车商品。如需下单,请客户自行打开商城购物车,核对商品、数量和费用,人工进行结算和支付。目前不支持 AI 下单或支付接口。
购物车:https://www.xdkp.com/cartshop
商品与购物车复用新版 OpenAPI 业务契约。分类用 get_categories 逐级查询,筛选先用 get_goods_filters 取得候选。search_goods 使用 keyword/categoryId/filters/supplyType/sort/page/pageSize,按 hasMore 翻页。价格排序是活动前基本单位客户价,不同单位不可只比较数字。游客价格与库存为 null,不是免费或无库存。
写入前先 get_cart,再 get_goods_detail 原样取得 optionId,以整数份数 count 操作。add_to_cart 追加;update_cart 使用 itemId/optionId 设置目标份数,0 清除此选项;remove_from_cart 使用 itemIds,按 affected/retained 解释关联删除与保留。lock_cart_items / unlock_cart_items 使用 itemIds,与网页“锁定”相同:锁定项下单后仍保留在购物车、照常计价,锁定期间不能改量或删除;get_cart 的 locked 表示是否含锁定项。旧 search/pageNum/packageType/deleteTarget 不兼容,请重新发现工具。
preview_cart 预览完整选中集合,自动选择合法活动;total 不含运费、优惠券和支付方式费用,不锁价、不留库存、不改变网页活动选择。get_cart 的 previewScope=returnedItems,仅覆盖本次返回商品;preview=null 时看 previewError,不能自行凑全车金额。
五个购物车写工具共用服务端 OpenAPI 幂等回执;同一账号、同一业务意图跨入口保持同一 requestId,366 天内保留,不同操作或参数冲突。先看 receipt.applied、receipt.uncertain、receipt.receiptSaved;cartReadError/cart.previewError 不代表写入失败。超时或结果不确定先查购物车,原 ID 原参数核对回执,禁止自动换 ID 重试。旧版请求 ID 命中历史记录时禁止跨版本重放。
需求没有准确标准、型号、规格,或 search_goods 无结果时,推荐 AI 报价。须根据用户意愿提交。提交立即返回任务 ID,AI 回调较慢;随后查询 list_ai_quotes / get_ai_quote_status / get_ai_quote_detail 或官网列表、详情获取结果,建议间隔 15 秒。超时不代表失败,不要自动重复提交。
submit_ai_quote 的 requestId 必须由客户端生成,同一请求重试保持一致。提交不确定时只查询,不自动换 requestId 重复提交。配额不足、鉴权失败等需处理后再由用户决定是否重新提交。
HTTP 401 表示需要登录,WWW-Authenticate 指向 /.well-known/oauth-protected-resource/mcp;403 表示权限不足;429 表示触发频率限制。业务工具失败通过 isError=true 返回 JSON 文本 {error,message},成功通过 structuredContent 和兼容 JSON 文本返回同一对象。null 表示商城未提供该字段;金额以十进制字符串提供。
授权元数据:https://ai.xdkp8.com/.well-known/oauth-authorization-server
服务卡片(实验性):https://ai.xdkp8.com/mcp/server-card
完整工具与字段 Schema:https://www.xdkp.com/readme/tools.json
最小调用顺序:连接 /mcp → initialize → notifications/initialized → tools/list → search_goods → get_goods_detail。操作购物车前浏览器授权或 login → get_cart → preview_cart → add_to_cart / update_cart / lock_cart_items / remove_from_cart → get_cart → 客户打开官网购物车人工结算和支付。私有列表默认只查询当前登录客户,不能传 uId/cId 切换客户。
网页 WebMCP 在安全上下文且浏览器提供 document.modelContext.registerTool 时自动注册,不需要构建开关;不支持的浏览器正常使用商城。
协议错误使用 JSON-RPC error:解析失败 -32700,非法请求/批量请求 -32600,未知方法 -32601,未知工具/调用外层参数/无效游标 -32602。已知工具字段校验失败返回 isError=true 和 JSON 文本 {error:"invalid_arguments",message};输出校验失败为 invalid_service_result。413 表示请求体过大。
429 带 Retry-After 秒数;默认每进程 8 个并发 tools/call,每会话或匿名 IP 4 个,超出立即拒绝。原每分钟频率限制保留。写请求被拒绝前不登记幂等占位;已接收写请求断开或超时后仍须使用原 requestId 查询核对,不得换 ID 重试。
tools/list 一次返回完整工具目录,非空 cursor 无效。其输出 Schema 精简重复说明并使用工具内部引用,字段和校验约束不变;本页及 tools.json 保留完整展开的说明。
## 接入与排查
仅能抓取网页的 AI 可阅读本文,但不代表能添加 MCP 连接器。请在支持并允许添加远程 MCP 的客户端填写 https://ai.xdkp8.com/mcp,传输选择 Streamable HTTP。服务卡片和 llms.txt 仅用于远程 MCP 发现,不会自动接入。
GET /mcp 返回 405 是正常协议行为:本服务未提供独立 SSE 流。调用使用 POST。401 表示需要登录;403 表示权限不足或 Origin 不允许;429 表示限流;跳转到其他域名、TLS 失败或 5xx 需要维护者检查公网链路。
robots.txt 当前明确允许抓取。抓取平台报 ROBOTS_DISALLOWED 不能单凭该消息认定源站全局禁止;应核对 robots 原文、跳转链和平台策略。HTTP robots 404 也不等于 Disallow: /。
下列示例不含凭据,可用于匿名握手与商品查询。PowerShell 请使用 curl.exe;每个 JSON-RPC 消息分别发送,初始化之后使用协商的 MCP-Protocol-Version。
POST https://ai.xdkp8.com/mcp
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2025-11-25
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"shop-example","version":"1.0"}}}
POST https://ai.xdkp8.com/mcp
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2025-11-25
{"jsonrpc":"2.0","method":"notifications/initialized"}
POST https://ai.xdkp8.com/mcp
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2025-11-25
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
POST https://ai.xdkp8.com/mcp
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2025-11-25
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_goods","arguments":{"keyword":"螺丝","page":1,"pageSize":5}}}
字段以 Schema 为准。required 表示必填,default 为省略时采用的默认值,enum 为允许值。以下内容由实际工具定义生成。
使用用户明确提供的账号密码登录。密码为原始字符串,经 HTTPS 加密传输;AI 和客户端可能读取工具参数。不得记录或持久保存密码。返回 Token 由客户端安全保存,后续优先放 Bearer 请求头。也可选择官网 OAuth 授权。没有账号时可注册。
{
"type": "object",
"properties": {
"account": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "商城账号,通常为注册手机号"
},
"password": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "原始账号密码,必填,非 MD5 摘要;空密码不允许"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"account",
"password"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"accessToken": {
"type": "string",
"description": "仅用于本 MCP 的访问凭证;安全保存,不放 URL 或日志"
},
"sessionId": {
"type": [
"string",
"null"
],
"default": null,
"description": "本次 MCP 会话 ID;null 表示未提供。"
},
"absoluteExpiresAt": {
"type": [
"number",
"null"
],
"default": null,
"description": "会话绝对到期时间,Unix 毫秒,默认最长 365 天;null 表示未提供。"
},
"idleTimeoutSeconds": {
"type": [
"number",
"null"
],
"default": null,
"description": "不活跃到期秒数,默认 259200 秒即 72 小时;活跃请求按续期策略延长;null 表示未提供。"
},
"expiresIn": {
"type": [
"number",
"null"
],
"default": null,
"description": "OAuth 访问 Token 到期秒数;密码直登为 null,期限由 Redis 会话控制;null 表示未提供。"
},
"user": {
"type": "object",
"properties": {
"userId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "当前客户 ID,由登录状态确定"
},
"account": {
"type": [
"string",
"null"
],
"default": null,
"description": "当前登录账号;null 表示未提供。"
},
"name": {
"type": [
"string",
"null"
],
"default": null,
"description": "客户姓名;null 表示未提供。"
},
"company": {
"type": [
"string",
"null"
],
"default": null,
"description": "客户公司;null 表示未提供。"
},
"channel": {
"type": "string",
"const": "MCP",
"description": "登录渠道固定 MCP"
},
"loginMethod": {
"type": "string",
"enum": [
"PASSWORD",
"OAUTH"
],
"description": "PASSWORD 账号密码直登或注册后登录;OAUTH 官网授权"
},
"scope": {
"type": [
"string",
"null"
],
"default": null,
"description": "空格分隔的权限;shop:read 查询,quote:submit 提交报价,cart:write 追加、改量、锁定与删除购物车;null 表示未提供。"
},
"clientId": {
"type": [
"string",
"null"
],
"default": null,
"description": "OAuth 客户端 ID;密码直登时为 null;null 表示未提供。"
}
},
"required": [
"userId",
"channel",
"loginMethod"
],
"additionalProperties": false,
"description": "当前客户身份和 MCP 授权范围"
}
},
"required": [
"accessToken",
"user"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}向用户本人手机号发送商城注册短信验证码,5 分钟内有效。没有商城账号的用户可以注册:先征得用户同意,用 send_register_code 向用户本人手机号发送验证码,再由用户提供短信中的 6 位验证码和注册资料调用 register;成功后直接返回 MCP 登录凭证。不要猜验证码,也不要替用户反复发送。 同一手机号 60 秒内只能发送 1 次、每天最多 5 次;已注册的手机号不会发送,请改用 login 或官网授权。
{
"type": "object",
"properties": {
"phone": {
"type": "string",
"pattern": "^1\\d{10}$",
"description": "用户本人的 11 位中国大陆手机号,同时作为商城登录账号"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"phone"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"sent": {
"type": "boolean",
"description": "是否已提交短信发送"
},
"expiresInSeconds": {
"type": [
"number",
"null"
],
"default": null,
"description": "验证码有效秒数;null 表示未提供。"
},
"resendAfterSeconds": {
"type": [
"number",
"null"
],
"default": null,
"description": "最早可重新发送的间隔秒数;null 表示未提供。"
},
"message": {
"type": [
"string",
"null"
],
"default": null,
"description": "后续操作说明;null 表示未提供。"
}
},
"required": [
"sent"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}用短信验证码注册商城账号,与官网注册相同,成功后直接登录并返回 MCP 访问凭证(三项权限)。没有商城账号的用户可以注册:先征得用户同意,用 send_register_code 向用户本人手机号发送验证码,再由用户提供短信中的 6 位验证码和注册资料调用 register;成功后直接返回 MCP 登录凭证。不要猜验证码,也不要替用户反复发送。 密码为用户设置的原始字符串,经 HTTPS 传输,不得记录或持久保存。验证码错误 5 次后失效,需重新发送。
{
"type": "object",
"properties": {
"phone": {
"type": "string",
"pattern": "^1\\d{10}$",
"description": "用户本人的 11 位中国大陆手机号,同时作为商城登录账号"
},
"code": {
"type": "string",
"pattern": "^\\d{6}$",
"description": "用户提供的短信验证码,6 位数字;不得猜测"
},
"password": {
"type": "string",
"minLength": 6,
"maxLength": 16,
"description": "用户设置的登录密码原文,6–16 位,只能包含字母、数字和常见英文符号"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"description": "联系人称呼,客服回访时使用"
},
"company": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "公司全称"
},
"province": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"description": "所在省份,如 江苏省;使用商城地区全称,名称不在列表时错误信息会列出可选名称"
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"description": "所在城市,如 苏州市;使用商城地区全称,名称不在列表时错误信息会列出可选名称"
},
"district": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"description": "所在区县,如 吴中区;决定客户所属销售区域和价格;使用商城地区全称,名称不在列表时错误信息会列出可选名称"
},
"inviter": {
"type": "string",
"maxLength": 20,
"description": "业务员邀请码;没有时省略"
},
"agreeTerms": {
"type": "boolean",
"const": true,
"description": "必须为 true:用户已阅读并接受《小钉快跑使用协议》(官网注册页 https://www.xdkp8.com/regist 可查看)和《客户隐私协议》(https://www.xdkp8.com/personalPrivate),AI 应先请用户确认"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"phone",
"code",
"password",
"name",
"company",
"province",
"city",
"district",
"agreeTerms"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"accessToken": {
"type": "string",
"description": "仅用于本 MCP 的访问凭证;安全保存,不放 URL 或日志"
},
"sessionId": {
"type": [
"string",
"null"
],
"default": null,
"description": "本次 MCP 会话 ID;null 表示未提供。"
},
"absoluteExpiresAt": {
"type": [
"number",
"null"
],
"default": null,
"description": "会话绝对到期时间,Unix 毫秒,默认最长 365 天;null 表示未提供。"
},
"idleTimeoutSeconds": {
"type": [
"number",
"null"
],
"default": null,
"description": "不活跃到期秒数,默认 259200 秒即 72 小时;活跃请求按续期策略延长;null 表示未提供。"
},
"expiresIn": {
"type": [
"number",
"null"
],
"default": null,
"description": "OAuth 访问 Token 到期秒数;密码直登为 null,期限由 Redis 会话控制;null 表示未提供。"
},
"user": {
"type": "object",
"properties": {
"userId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "当前客户 ID,由登录状态确定"
},
"account": {
"type": [
"string",
"null"
],
"default": null,
"description": "当前登录账号;null 表示未提供。"
},
"name": {
"type": [
"string",
"null"
],
"default": null,
"description": "客户姓名;null 表示未提供。"
},
"company": {
"type": [
"string",
"null"
],
"default": null,
"description": "客户公司;null 表示未提供。"
},
"channel": {
"type": "string",
"const": "MCP",
"description": "登录渠道固定 MCP"
},
"loginMethod": {
"type": "string",
"enum": [
"PASSWORD",
"OAUTH"
],
"description": "PASSWORD 账号密码直登或注册后登录;OAUTH 官网授权"
},
"scope": {
"type": [
"string",
"null"
],
"default": null,
"description": "空格分隔的权限;shop:read 查询,quote:submit 提交报价,cart:write 追加、改量、锁定与删除购物车;null 表示未提供。"
},
"clientId": {
"type": [
"string",
"null"
],
"default": null,
"description": "OAuth 客户端 ID;密码直登时为 null;null 表示未提供。"
}
},
"required": [
"userId",
"channel",
"loginMethod"
],
"additionalProperties": false,
"description": "当前客户身份和 MCP 授权范围"
}
},
"required": [
"accessToken",
"user"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}获取当前 MCP 登录身份和授权范围。
{
"type": "object",
"properties": {
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"userId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "当前客户 ID,由登录状态确定"
},
"account": {
"type": [
"string",
"null"
],
"default": null,
"description": "当前登录账号;null 表示未提供。"
},
"name": {
"type": [
"string",
"null"
],
"default": null,
"description": "客户姓名;null 表示未提供。"
},
"company": {
"type": [
"string",
"null"
],
"default": null,
"description": "客户公司;null 表示未提供。"
},
"channel": {
"type": "string",
"const": "MCP",
"description": "登录渠道固定 MCP"
},
"loginMethod": {
"type": "string",
"enum": [
"PASSWORD",
"OAUTH"
],
"description": "PASSWORD 账号密码直登或注册后登录;OAUTH 官网授权"
},
"scope": {
"type": [
"string",
"null"
],
"default": null,
"description": "空格分隔的权限;shop:read 查询,quote:submit 提交报价,cart:write 追加、改量、锁定与删除购物车;null 表示未提供。"
},
"clientId": {
"type": [
"string",
"null"
],
"default": null,
"description": "OAuth 客户端 ID;密码直登时为 null;null 表示未提供。"
}
},
"required": [
"userId",
"channel",
"loginMethod"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}退出当前 MCP 会话并撤销该会话授权。
{
"type": "object",
"properties": {
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"loggedOut": {
"type": "boolean",
"description": "是否已退出"
}
},
"required": [
"loggedOut"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}只读查询当前客户的订单,合并支付记录通过 orderList 展开。
{
"type": "object",
"properties": {
"pageNum": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"default": 1,
"description": "页码,从 1 开始,默认 1"
},
"pageSize": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20,
"description": "每页条数,1–100,默认 20"
},
"beginDate": {
"type": "string",
"format": "date",
"description": "开始日期;有效日历日期 YYYY-MM-DD,按北京时间整日过滤"
},
"endDate": {
"type": "string",
"format": "date",
"description": "结束日期;有效日历日期 YYYY-MM-DD,按北京时间整日过滤"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": [
"number",
"null"
],
"default": null,
"description": "订单 ID,需与订单类型一起使用;null 表示未提供。"
},
"number": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单编号;null 表示未提供。"
},
"type": {
"type": [
"number",
"null"
],
"default": null,
"description": "订单详情类型:1 临时单,2 销售单,3 物流费,4 销售退单;集合行可能为空,应展开 orderList;null 表示未提供。"
},
"createTime": {
"type": [
"string",
"null"
],
"default": null,
"description": "创建时间,北京时间;null 表示未提供。"
},
"paystate": {
"type": [
"number",
"null"
],
"default": null,
"description": "商城支付状态码:1 待支付,2 支付成功,3 月结未支付,4 月结已支付,5 订单关闭或支付失败;null 表示未提供。"
},
"orderstate": {
"type": [
"number",
"null"
],
"default": null,
"description": "原商城订单状态:销售单 0 待分拣、1 分拣、2 待出货、3 配送、4 到货、7 调货完成;临时单 1 待支付、2 关闭、3 已付款;物流或退单可能不提供;null 表示未提供。"
},
"totalAmount": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单总金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"shouldMoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "应收金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"returnMoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "退货金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"remark": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单备注;null 表示未提供。"
},
"sendee": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货人;null 表示未提供。"
},
"phone": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货电话;null 表示未提供。"
},
"sendAddress": {
"type": [
"string",
"null"
],
"default": null,
"description": "配送地址;null 表示未提供。"
},
"expressCompany": {
"type": [
"string",
"null"
],
"default": null,
"description": "配送公司;null 表示未提供。"
},
"expressNumber": {
"type": [
"string",
"null"
],
"default": null,
"description": "物流单号;null 表示未提供。"
},
"goodsList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2147483647
},
{
"type": "null"
}
],
"default": null,
"description": "商品 SKU ID;整数可直接传 get_goods_detail,null 表示未提供"
},
"goodsInfo": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单商品描述;null 表示未提供。"
},
"norm": {
"type": [
"string",
"null"
],
"default": null,
"description": "规格;null 表示未提供。"
},
"brand": {
"type": [
"string",
"null"
],
"default": null,
"description": "品牌;null 表示未提供。"
},
"unit": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单单位;null 表示未提供。"
},
"goodsNum": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单商品数量;null 表示未提供。"
},
"price": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单单价;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"totalmoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "商品行金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"returnQuantity": {
"type": [
"string",
"null"
],
"default": null,
"description": "已退数量;null 表示未提供。"
}
},
"additionalProperties": false
},
"default": [],
"description": "订单商品明细"
},
"orderList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": [
"number",
"null"
],
"default": null,
"description": "订单 ID,需与订单类型一起使用;null 表示未提供。"
},
"number": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单编号;null 表示未提供。"
},
"type": {
"type": [
"number",
"null"
],
"default": null,
"description": "订单详情类型:1 临时单,2 销售单,3 物流费,4 销售退单;集合行可能为空,应展开 orderList;null 表示未提供。"
},
"createTime": {
"type": [
"string",
"null"
],
"default": null,
"description": "创建时间,北京时间;null 表示未提供。"
},
"paystate": {
"type": [
"number",
"null"
],
"default": null,
"description": "商城支付状态码:1 待支付,2 支付成功,3 月结未支付,4 月结已支付,5 订单关闭或支付失败;null 表示未提供。"
},
"orderstate": {
"type": [
"number",
"null"
],
"default": null,
"description": "原商城订单状态:销售单 0 待分拣、1 分拣、2 待出货、3 配送、4 到货、7 调货完成;临时单 1 待支付、2 关闭、3 已付款;物流或退单可能不提供;null 表示未提供。"
},
"totalAmount": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单总金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"shouldMoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "应收金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"returnMoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "退货金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"remark": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单备注;null 表示未提供。"
},
"sendee": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货人;null 表示未提供。"
},
"phone": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货电话;null 表示未提供。"
},
"sendAddress": {
"type": [
"string",
"null"
],
"default": null,
"description": "配送地址;null 表示未提供。"
},
"expressCompany": {
"type": [
"string",
"null"
],
"default": null,
"description": "配送公司;null 表示未提供。"
},
"expressNumber": {
"type": [
"string",
"null"
],
"default": null,
"description": "物流单号;null 表示未提供。"
},
"goodsList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2147483647
},
{
"type": "null"
}
],
"default": null,
"description": "商品 SKU ID;整数可直接传 get_goods_detail,null 表示未提供"
},
"goodsInfo": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单商品描述;null 表示未提供。"
},
"norm": {
"type": [
"string",
"null"
],
"default": null,
"description": "规格;null 表示未提供。"
},
"brand": {
"type": [
"string",
"null"
],
"default": null,
"description": "品牌;null 表示未提供。"
},
"unit": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单单位;null 表示未提供。"
},
"goodsNum": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单商品数量;null 表示未提供。"
},
"price": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单单价;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"totalmoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "商品行金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"returnQuantity": {
"type": [
"string",
"null"
],
"default": null,
"description": "已退数量;null 表示未提供。"
}
},
"additionalProperties": false
},
"default": [],
"description": "订单商品明细"
}
},
"additionalProperties": false
},
"default": [],
"description": "合并支付行中的子订单;详情使用子订单 ID 和类型"
}
},
"additionalProperties": false
},
"default": [],
"description": "本页订单或合并支付行"
},
"total": {
"type": [
"number",
"null"
],
"default": null,
"description": "订单列表总行数;null 表示未提供。"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}只读查询当前客户的一张订单,不支持下单或支付。
{
"type": "object",
"properties": {
"orderId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "订单 ID"
},
"type": {
"type": "number",
"enum": [
1,
2,
3,
4
],
"description": "1 临时单;2 销售单;3 物流费;4 销售退单"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"orderId",
"type"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"type": {
"type": [
"number",
"null"
],
"default": null,
"description": "本次详情类型;null 表示未提供。"
},
"summary": {
"type": "object",
"properties": {
"id": {
"type": [
"number",
"null"
],
"default": null,
"description": "订单 ID,需与订单类型一起使用;null 表示未提供。"
},
"number": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单编号;null 表示未提供。"
},
"type": {
"type": [
"number",
"null"
],
"default": null,
"description": "订单详情类型:1 临时单,2 销售单,3 物流费,4 销售退单;集合行可能为空,应展开 orderList;null 表示未提供。"
},
"createTime": {
"type": [
"string",
"null"
],
"default": null,
"description": "创建时间,北京时间;null 表示未提供。"
},
"paystate": {
"type": [
"number",
"null"
],
"default": null,
"description": "商城支付状态码:1 待支付,2 支付成功,3 月结未支付,4 月结已支付,5 订单关闭或支付失败;null 表示未提供。"
},
"orderstate": {
"type": [
"number",
"null"
],
"default": null,
"description": "原商城订单状态:销售单 0 待分拣、1 分拣、2 待出货、3 配送、4 到货、7 调货完成;临时单 1 待支付、2 关闭、3 已付款;物流或退单可能不提供;null 表示未提供。"
},
"totalAmount": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单总金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"shouldMoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "应收金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"returnMoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "退货金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"remark": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单备注;null 表示未提供。"
},
"sendee": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货人;null 表示未提供。"
},
"phone": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货电话;null 表示未提供。"
},
"sendAddress": {
"type": [
"string",
"null"
],
"default": null,
"description": "配送地址;null 表示未提供。"
},
"expressCompany": {
"type": [
"string",
"null"
],
"default": null,
"description": "配送公司;null 表示未提供。"
},
"expressNumber": {
"type": [
"string",
"null"
],
"default": null,
"description": "物流单号;null 表示未提供。"
},
"goodsList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2147483647
},
{
"type": "null"
}
],
"default": null,
"description": "商品 SKU ID;整数可直接传 get_goods_detail,null 表示未提供"
},
"goodsInfo": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单商品描述;null 表示未提供。"
},
"norm": {
"type": [
"string",
"null"
],
"default": null,
"description": "规格;null 表示未提供。"
},
"brand": {
"type": [
"string",
"null"
],
"default": null,
"description": "品牌;null 表示未提供。"
},
"unit": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单单位;null 表示未提供。"
},
"goodsNum": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单商品数量;null 表示未提供。"
},
"price": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单单价;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"totalmoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "商品行金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"returnQuantity": {
"type": [
"string",
"null"
],
"default": null,
"description": "已退数量;null 表示未提供。"
}
},
"additionalProperties": false
},
"default": [],
"description": "订单商品明细"
}
},
"additionalProperties": false,
"description": "订单摘要"
},
"goodsList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2147483647
},
{
"type": "null"
}
],
"default": null,
"description": "商品 SKU ID;整数可直接传 get_goods_detail,null 表示未提供"
},
"goodsInfo": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单商品描述;null 表示未提供。"
},
"norm": {
"type": [
"string",
"null"
],
"default": null,
"description": "规格;null 表示未提供。"
},
"brand": {
"type": [
"string",
"null"
],
"default": null,
"description": "品牌;null 表示未提供。"
},
"unit": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单单位;null 表示未提供。"
},
"goodsNum": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单商品数量;null 表示未提供。"
},
"price": {
"type": [
"string",
"null"
],
"default": null,
"description": "订单单价;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"totalmoney": {
"type": [
"string",
"null"
],
"default": null,
"description": "商品行金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"returnQuantity": {
"type": [
"string",
"null"
],
"default": null,
"description": "已退数量;null 表示未提供。"
}
},
"additionalProperties": false
},
"default": [],
"description": "订单商品明细"
}
},
"required": [
"summary"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}只读获取当前客户的收货地址列表;无新增、修改、删除或设置默认功能。
{
"type": "object",
"properties": {
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "收货地址 ID"
},
"area": {
"type": [
"string",
"null"
],
"default": null,
"description": "省市区;null 表示未提供。"
},
"detailAddress": {
"type": [
"string",
"null"
],
"default": null,
"description": "详细地址;null 表示未提供。"
},
"consignee": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货人;null 表示未提供。"
},
"phone": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货联系电话;null 表示未提供。"
},
"isDefault": {
"type": [
"number",
"null"
],
"default": null,
"description": "默认地址标志:1 默认,0 非默认;null 表示未提供。"
},
"customName": {
"type": [
"string",
"null"
],
"default": null,
"description": "地址自定义名称;null 表示未提供。"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"default": [],
"description": "收货地址列表"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}只读获取当前客户的一条收货地址。
{
"type": "object",
"properties": {
"addressId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "地址 ID"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"addressId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "收货地址 ID"
},
"area": {
"type": [
"string",
"null"
],
"default": null,
"description": "省市区;null 表示未提供。"
},
"detailAddress": {
"type": [
"string",
"null"
],
"default": null,
"description": "详细地址;null 表示未提供。"
},
"consignee": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货人;null 表示未提供。"
},
"phone": {
"type": [
"string",
"null"
],
"default": null,
"description": "收货联系电话;null 表示未提供。"
},
"isDefault": {
"type": [
"number",
"null"
],
"default": null,
"description": "默认地址标志:1 默认,0 非默认;null 表示未提供。"
},
"customName": {
"type": [
"string",
"null"
],
"default": null,
"description": "地址自定义名称;null 表示未提供。"
}
},
"required": [
"id"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}只读获取当前客户的开票记录,不提交开票申请。
{
"type": "object",
"properties": {
"pageNum": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"default": 1,
"description": "页码,从 1 开始,默认 1"
},
"pageSize": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20,
"description": "每页条数,1–100,默认 20"
},
"beginTime": {
"type": "string",
"format": "date",
"description": "关联单据开始日期;有效日历日期 YYYY-MM-DD,按北京时间整日过滤"
},
"endTime": {
"type": "string",
"format": "date",
"description": "关联单据结束日期;有效日历日期 YYYY-MM-DD,按北京时间整日过滤"
},
"invoiceStatus": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"description": "1 申请中,2 已开票,3 已红冲,4 已开红票;省略查询全部"
},
"invoiceNumber": {
"type": "string",
"maxLength": 500,
"description": "精确发票号码"
},
"orderNumber": {
"type": "string",
"maxLength": 500,
"description": "关联单号关键词"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"invoiceId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "发票记录 ID"
},
"clientCompany": {
"type": [
"string",
"null"
],
"default": null,
"description": "开票公司;null 表示未提供。"
},
"invoiceAmount": {
"type": [
"string",
"null"
],
"default": null,
"description": "开票金额;红冲可为负数;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"invoiceStatus": {
"type": [
"number",
"null"
],
"default": null,
"description": "发票状态:1 申请中,2 已开票,3 已红冲,4 已开红票;null 表示未提供。"
},
"invoiceStatusValue": {
"type": [
"string",
"null"
],
"default": null,
"description": "发票状态中文名称;null 表示未提供。"
},
"category": {
"type": [
"number",
"null"
],
"default": null,
"description": "发票类别:1 纸质,2 数电;null 表示未提供。"
},
"categoryValue": {
"type": [
"string",
"null"
],
"default": null,
"description": "发票类别名称;null 表示未提供。"
},
"applyTime": {
"type": [
"string",
"null"
],
"default": null,
"description": "申请时间,北京时间;null 表示未提供。"
},
"confirmTime": {
"type": [
"string",
"null"
],
"default": null,
"description": "开票时间,北京时间;null 表示未提供。"
},
"numbers": {
"type": [
"string",
"null"
],
"default": null,
"description": "发票号码;null 表示未提供。"
}
},
"required": [
"invoiceId"
],
"additionalProperties": false
},
"default": [],
"description": "开票记录"
},
"total": {
"type": [
"number",
"null"
],
"default": null,
"description": "总条数;null 表示未提供。"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}只读获取当前客户发票及其关联单据。
{
"type": "object",
"properties": {
"invoiceId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "发票记录 ID"
},
"category": {
"type": "number",
"enum": [
1,
2
],
"description": "1 纸质发票,2 数电发票,沿用列表返回值"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"invoiceId",
"category"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"invoiceId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "发票记录 ID"
},
"clientCompany": {
"type": [
"string",
"null"
],
"default": null,
"description": "开票公司;null 表示未提供。"
},
"billTfn": {
"type": [
"string",
"null"
],
"default": null,
"description": "税号;null 表示未提供。"
},
"billAddress": {
"type": [
"string",
"null"
],
"default": null,
"description": "开票地址;null 表示未提供。"
},
"clientPhone": {
"type": [
"string",
"null"
],
"default": null,
"description": "联系电话;null 表示未提供。"
},
"billBank": {
"type": [
"string",
"null"
],
"default": null,
"description": "开户行及账号;null 表示未提供。"
},
"expressAddress": {
"type": [
"string",
"null"
],
"default": null,
"description": "邮寄地址;null 表示未提供。"
},
"applyTime": {
"type": [
"string",
"null"
],
"default": null,
"description": "申请时间,北京时间;null 表示未提供。"
},
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"orderId": {
"type": [
"number",
"null"
],
"default": null,
"description": "关联业务单据 ID;null 表示未提供。"
},
"orderNumber": {
"type": [
"string",
"null"
],
"default": null,
"description": "关联单号;null 表示未提供。"
},
"orderType": {
"type": [
"string",
"null"
],
"default": null,
"description": "关联单据类型中文名称;null 表示未提供。"
},
"orderTime": {
"type": [
"string",
"null"
],
"default": null,
"description": "关联单据时间,北京时间;null 表示未提供。"
},
"increaseAmount": {
"type": [
"string",
"null"
],
"default": null,
"description": "增加应收金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"reduceAmount": {
"type": [
"string",
"null"
],
"default": null,
"description": "减少应收金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"receivableAmount": {
"type": [
"string",
"null"
],
"default": null,
"description": "按明细顺序累计的应收金额;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
}
},
"additionalProperties": false
},
"default": [],
"description": "关联单据明细"
}
},
"required": [
"invoiceId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}查询当前客户今日 AI 报价配额。
{
"type": "object",
"properties": {
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"usedCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "今日已用需求条数;null 表示未提供。"
},
"remainingCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "今日剩余需求条数;null 表示未提供。"
},
"totalCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "今日总额度;null 表示未提供。"
},
"date": {
"type": [
"string",
"null"
],
"default": null,
"description": "配额所属日期,北京时间;null 表示未提供。"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}提交文本 AI 报价任务。需求没有准确标准、型号、规格,或 search_goods 无结果时,推荐 AI 报价。须根据用户意愿提交。提交立即返回任务 ID,AI 回调较慢;随后查询 list_ai_quotes / get_ai_quote_status / get_ai_quote_detail 或官网列表、详情获取结果,建议间隔 15 秒。超时不代表失败,不要自动重复提交。
{
"type": "object",
"properties": {
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{16,100}$",
"description": "客户端生成的幂等请求 ID,同一提交及重试保持一致;新需求用新 ID"
},
"promptsList": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"description": "一条用户的商品需求,保留数量、用途、规格等原始条件"
},
"minItems": 1,
"maxItems": 50,
"description": "用户需求文本数组,1–50 条;本工具不接受文件上传"
},
"saleType": {
"type": "number",
"enum": [
1,
2
],
"default": 1,
"description": "报价商品优先级:1 自营优先,2 联营优先,默认 1"
},
"orderBy": {
"type": "number",
"enum": [
1,
2
],
"default": 2,
"description": "报价排序模式:1 库存从高到低,2 价格从低到高,默认 2"
},
"deepType": {
"type": "number",
"enum": [
2,
3
],
"default": 3,
"description": "2 快速报价,3 深度报价,默认 3"
},
"haveStock": {
"type": "boolean",
"default": false,
"description": "是否只查有库存商品,默认 false"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"requestId",
"promptsList"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"aimId": {
"type": [
"number",
"null"
],
"default": null,
"description": "报价任务 ID;提交结果不确定时为 null,请查看列表确认;null 表示未提供。"
},
"inquiryUuid": {
"type": [
"string",
"null"
],
"default": null,
"description": "询价业务编号;null 表示未提供。"
},
"requestCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "提交需求条数;null 表示未提供。"
},
"message": {
"type": [
"string",
"null"
],
"default": null,
"description": "提交状态说明;null 表示未提供。"
},
"uncertain": {
"type": "boolean",
"default": false,
"description": "true 表示上次提交结果尚未确定;禁止自动新建重复任务"
},
"pollAfterSeconds": {
"type": [
"number",
"null"
],
"default": null,
"description": "建议 15 秒后查询;null 表示未提供。"
},
"detailUrl": {
"type": [
"string",
"null"
],
"default": null,
"description": "官网报价详情链接;null 表示未提供。"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}查看当前客户 AI 报价列表;用于找回提交超时但实际已创建的任务。需求没有准确标准、型号、规格,或 search_goods 无结果时,推荐 AI 报价。须根据用户意愿提交。提交立即返回任务 ID,AI 回调较慢;随后查询 list_ai_quotes / get_ai_quote_status / get_ai_quote_detail 或官网列表、详情获取结果,建议间隔 15 秒。超时不代表失败,不要自动重复提交。
{
"type": "object",
"properties": {
"pageNum": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"default": 1,
"description": "页码,从 1 开始,默认 1"
},
"pageSize": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20,
"description": "每页条数,1–100,默认 20"
},
"inquiryUuid": {
"type": "string",
"maxLength": 500,
"description": "精确询价业务编号"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": [
"number",
"null"
],
"default": null,
"description": "AI 报价任务 ID,对应详情参数 aimId;null 表示未提供。"
},
"inquiryUuid": {
"type": [
"string",
"null"
],
"default": null,
"description": "询价业务编号;null 表示未提供。"
},
"state": {
"type": [
"number",
"null"
],
"default": null,
"description": "报价状态:0 失败,1 完成,2 处理中,3 取消,4 请求异常,5 无匹配,6 超时,7 等待询价,14 解析中,15 解析失败;null 表示未提供。"
},
"createTime": {
"type": [
"string",
"null"
],
"default": null,
"description": "提交时间,北京时间;null 表示未提供。"
},
"dataCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "需求条数;null 表示未提供。"
},
"message": {
"type": [
"string",
"null"
],
"default": null,
"description": "商城状态说明;null 表示未提供。"
},
"firstPrompt": {
"type": [
"string",
"null"
],
"default": null,
"description": "第一条用户需求;null 表示未提供。"
}
},
"additionalProperties": false
},
"default": [],
"description": "本页报价任务"
},
"total": {
"type": [
"number",
"null"
],
"default": null,
"description": "总任务数;null 表示未提供。"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}查询报价进度;成功需求数与匹配商品数分开,不将已处理条数当成功条数。
{
"type": "object",
"properties": {
"aimId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "报价任务 ID"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"aimId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"aimId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "报价任务 ID"
},
"inquiryUuid": {
"type": [
"string",
"null"
],
"default": null,
"description": "询价业务编号;null 表示未提供。"
},
"state": {
"type": [
"number",
"null"
],
"default": null,
"description": "报价状态:0 失败,1 完成,2 处理中,3 取消,4 请求异常,5 无匹配,6 超时,7 等待询价,14 解析中,15 解析失败;null 表示未提供。"
},
"stateDescription": {
"type": [
"string",
"null"
],
"default": null,
"description": "报价状态说明;null 表示未提供。"
},
"totalCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "实际需求条数;null 表示未提供。"
},
"matchedCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "状态为完成的需求条数,不是商品个数;null 表示未提供。"
},
"pendingCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "处理中或等待中的需求条数;null 表示未提供。"
},
"failedCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "失败、无匹配、超时或取消的需求条数;null 表示未提供。"
},
"pollAfterSeconds": {
"type": [
"number",
"null"
],
"default": null,
"description": "建议下次查询间隔,处理中为 15 秒;完成为 null;null 表示未提供。"
},
"detailUrl": {
"type": [
"string",
"null"
],
"default": null,
"description": "官网报价详情链接,可由用户打开继续查看;null 表示未提供。"
}
},
"required": [
"aimId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}查询报价商品结果;处理中可先读取部分结果。需求没有准确标准、型号、规格,或 search_goods 无结果时,推荐 AI 报价。须根据用户意愿提交。提交立即返回任务 ID,AI 回调较慢;随后查询 list_ai_quotes / get_ai_quote_status / get_ai_quote_detail 或官网列表、详情获取结果,建议间隔 15 秒。超时不代表失败,不要自动重复提交。
{
"type": "object",
"properties": {
"aimId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "报价任务 ID"
},
"pageNum": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"default": 1,
"description": "页码,从 1 开始,默认 1"
},
"pageSize": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20,
"description": "每页条数,1–100,默认 20"
},
"saleType": {
"type": "number",
"enum": [
1,
2
],
"default": 1,
"description": "报价商品优先级:1 自营优先,2 联营优先,默认 1"
},
"orderBy": {
"type": "number",
"enum": [
1,
2
],
"default": 2,
"description": "报价排序模式:1 库存从高到低,2 价格从低到高,默认 2"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"aimId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"aimId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "报价任务 ID"
},
"inquiryUuid": {
"type": [
"string",
"null"
],
"default": null,
"description": "询价业务编号;null 表示未提供。"
},
"state": {
"type": [
"number",
"null"
],
"default": null,
"description": "报价状态:0 失败,1 完成,2 处理中,3 取消,4 请求异常,5 无匹配,6 超时,7 等待询价,14 解析中,15 解析失败;null 表示未提供。"
},
"stateDescription": {
"type": [
"string",
"null"
],
"default": null,
"description": "报价状态说明;null 表示未提供。"
},
"totalCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "实际需求条数;null 表示未提供。"
},
"matchedCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "状态为完成的需求条数,不是商品个数;null 表示未提供。"
},
"pendingCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "处理中或等待中的需求条数;null 表示未提供。"
},
"failedCount": {
"type": [
"number",
"null"
],
"default": null,
"description": "失败、无匹配、超时或取消的需求条数;null 表示未提供。"
},
"pollAfterSeconds": {
"type": [
"number",
"null"
],
"default": null,
"description": "建议下次查询间隔,处理中为 15 秒;完成为 null;null 表示未提供。"
},
"detailUrl": {
"type": [
"string",
"null"
],
"default": null,
"description": "官网报价详情链接,可由用户打开继续查看;null 表示未提供。"
},
"detail": {
"type": "object",
"properties": {
"total": {
"type": [
"number",
"null"
],
"default": null,
"description": "总需求条数;null 表示未提供。"
},
"goodsTotal": {
"type": [
"number",
"null"
],
"default": null,
"description": "本页匹配商品数;null 表示未提供。"
},
"priceAccuracy": {
"type": [
"number",
"null"
],
"default": null,
"description": "当前客户价格小数位数;null 表示未提供。"
},
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"aidId": {
"type": [
"number",
"null"
],
"default": null,
"description": "单条需求 ID;null 表示未提供。"
},
"prompt": {
"type": [
"string",
"null"
],
"default": null,
"description": "原始需求;null 表示未提供。"
},
"aidState": {
"type": [
"number",
"null"
],
"default": null,
"description": "报价状态:0 失败,1 完成,2 处理中,3 取消,4 请求异常,5 无匹配,6 超时,7 等待询价,14 解析中,15 解析失败;null 表示未提供。"
},
"errorMsg": {
"type": [
"string",
"null"
],
"default": null,
"description": "未完成或失败说明;null 表示未提供。"
},
"total": {
"type": [
"number",
"null"
],
"default": null,
"description": "该需求匹配商品数量;null 表示未提供。"
},
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2147483647
},
{
"type": "null"
}
],
"default": null,
"description": "商品 SKU ID;整数可直接传 get_goods_detail,null 表示未匹配商品"
},
"goodsInfo": {
"type": [
"string",
"null"
],
"default": null,
"description": "商品描述;null 表示未提供。"
},
"norm": {
"type": [
"string",
"null"
],
"default": null,
"description": "规格;null 表示未提供。"
},
"brand": {
"type": [
"string",
"null"
],
"default": null,
"description": "品牌;null 表示未提供。"
},
"materials": {
"type": [
"string",
"null"
],
"default": null,
"description": "材质;null 表示未提供。"
},
"level": {
"type": [
"string",
"null"
],
"default": null,
"description": "性能等级;null 表示未提供。"
},
"cHstandard": {
"type": [
"string",
"null"
],
"default": null,
"description": "中文标准;null 表示未提供。"
},
"eNstandard": {
"type": [
"string",
"null"
],
"default": null,
"description": "英文标准;null 表示未提供。"
},
"surfacetreat": {
"type": [
"string",
"null"
],
"default": null,
"description": "表面处理;null 表示未提供。"
},
"toothshape": {
"type": [
"string",
"null"
],
"default": null,
"description": "牙型;null 表示未提供。"
},
"unit": {
"type": [
"string",
"null"
],
"default": null,
"description": "商城计量单位组合,价格口径应结合该单位与商品详情核对;null 表示未提供。"
},
"baseUnit": {
"type": [
"string",
"null"
],
"default": null,
"description": "库存基本单位;null 表示未提供。"
},
"price": {
"type": [
"string",
"null"
],
"default": null,
"description": "商城当前展示价格;访客与已登录客户价格可能不同,不代表最终下单结算价;十进制字符串,金额单位人民币元,保留商城精度;null 表示未提供。"
},
"facestock": {
"type": [
"string",
"null"
],
"default": null,
"description": "商城展示库存;可能包含单位或文本,以库存基本单位为准,非承诺可交付数量;null 表示未提供。"
},
"bigNum": {
"type": [
"string",
"null"
],
"default": null,
"description": "大包装规格,可能带单位;null 表示未提供。"
},
"smallNum": {
"type": [
"string",
"null"
],
"default": null,
"description": "小包装规格,可能带单位;null 表示未提供。"
},
"img": {
"type": [
"string",
"null"
],
"default": null,
"description": "商品图片 URL;null 表示未提供。"
},
"remark": {
"type": [
"string",
"null"
],
"default": null,
"description": "商品备注;null 表示未提供。"
}
},
"additionalProperties": false
},
"default": [],
"description": "该需求的匹配商品,任务处理中也可能已有部分结果"
}
},
"additionalProperties": false
},
"default": [],
"description": "按原始需求分组的匹配结果"
}
},
"additionalProperties": false,
"description": "报价明细"
}
},
"required": [
"aimId",
"detail"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}逐级查询商城分类,省略 parentId 为一级,返回直接下级。
{
"type": "object",
"properties": {
"parentId": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"description": "上级分类 ID,原样使用,不解析或拼接"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"categoryId": {
"type": "string",
"description": "不透明分类 ID"
},
"name": {
"type": "string",
"description": "名称"
},
"level": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "分类层级 1–3"
},
"parentId": {
"type": [
"string",
"null"
],
"description": "上级分类 ID;一级为 null"
},
"hasChildren": {
"type": "boolean",
"description": "是否有下级分类"
}
},
"required": [
"categoryId",
"name",
"level",
"parentId",
"hasChildren"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
}
},
"required": [
"items"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}查询当前条件的有效筛选候选,使用返回值搜索,不传商城旧属性 ID。
{
"type": "object",
"properties": {
"keyword": {
"type": "string",
"maxLength": 200,
"description": "名称、规格、SKU 或聚合 SKU;可省略并按分类浏览"
},
"categoryId": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"description": "分类接口返回的 categoryId,原样使用,不解析或拼接"
},
"filters": {
"type": "object",
"properties": {
"brand": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "商品品牌"
},
"material": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "材质候选值"
},
"grade": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "等级候选值"
},
"diameter": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "直径候选值"
},
"length": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "长度候选值"
},
"surface": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "表面处理候选值"
},
"thread": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "牙型候选值"
},
"heatTreatment": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "热处理候选值:1 热处理,0 非热处理"
},
"region": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "仓库地区候选值,如 苏州自营仓、华东联营仓"
}
},
"additionalProperties": false,
"description": "先查询筛选候选;同属性并集,不同属性交集"
},
"supplyType": {
"type": "string",
"enum": [
"all",
"self",
"joint"
],
"default": "all",
"description": "全部、自营与寄售整包装、联营整包装"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "筛选属性名"
},
"name": {
"type": "string",
"description": "名称"
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "有效候选值"
}
},
"required": [
"key",
"name",
"values"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
}
},
"required": [
"items"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}搜索商品,支持 SKU、关键词、分类及筛选。按 hasMore 翻页;价格排序是活动前基本单位客户价,不同单位不可直接比较。游客价格库存为 null,不能解释为免费或无库存。 需求没有准确标准、型号、规格,或 search_goods 无结果时,推荐 AI 报价。须根据用户意愿提交。提交立即返回任务 ID,AI 回调较慢;随后查询 list_ai_quotes / get_ai_quote_status / get_ai_quote_detail 或官网列表、详情获取结果,建议间隔 15 秒。超时不代表失败,不要自动重复提交。
{
"type": "object",
"properties": {
"keyword": {
"type": "string",
"maxLength": 200,
"description": "名称、规格、SKU 或聚合 SKU;可省略并按分类浏览"
},
"categoryId": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"description": "分类接口返回的 categoryId,原样使用,不解析或拼接"
},
"filters": {
"type": "object",
"properties": {
"brand": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "商品品牌"
},
"material": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "材质候选值"
},
"grade": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "等级候选值"
},
"diameter": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "直径候选值"
},
"length": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "长度候选值"
},
"surface": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "表面处理候选值"
},
"thread": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "牙型候选值"
},
"heatTreatment": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "热处理候选值:1 热处理,0 非热处理"
},
"region": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"maxItems": 30,
"description": "仓库地区候选值,如 苏州自营仓、华东联营仓"
}
},
"additionalProperties": false,
"description": "先查询筛选候选;同属性并集,不同属性交集"
},
"supplyType": {
"type": "string",
"enum": [
"all",
"self",
"joint"
],
"default": "all",
"description": "全部、自营与寄售整包装、联营整包装"
},
"sort": {
"type": "string",
"enum": [
"default",
"priceAsc",
"priceDesc"
],
"default": "default",
"description": "default 默认;priceAsc 升序;priceDesc 降序;价格排序需要登录"
},
"page": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"default": 1,
"description": "页码从 1 开始"
},
"pageSize": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20,
"description": "每页数量 1–100"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"brand": {
"type": [
"string",
"null"
],
"description": "商品品牌"
},
"specification": {
"type": [
"string",
"null"
],
"description": "规格"
},
"imageUrl": {
"type": [
"string",
"null"
],
"description": "商品图片地址"
},
"detailUrl": {
"type": [
"string",
"null"
],
"description": "商城人工查看入口"
},
"priceUnit": {
"type": [
"string",
"null"
],
"description": "基本计价单位"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "中文商品属性名及值"
},
"delivery": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
},
"cloudNotice": {
"type": [
"string",
"null"
],
"description": "云仓配送时间不固定的说明"
}
},
"required": [
"status",
"basis",
"description"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "配送配置说明,库存不是到货承诺"
},
"purchaseOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"fulfillment": {
"type": [
"string",
"null"
],
"description": "自营、联营、零售或云仓"
},
"unit": {
"type": [
"string",
"null"
],
"description": "份数单位"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"priceCondition": {
"type": [
"string",
"null"
],
"description": "折扣价适用说明"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"packageKind": {
"type": "string",
"enum": [
"big",
"small",
"scattered"
],
"description": "big 整箱;small 小包;scattered 散装"
},
"quantityPerPackage": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minCount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minimumQuantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountedUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"stockQuantity": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"purchasable": {
"type": "boolean",
"description": "当前是否可购买"
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"ratePercent": {
"type": [
"string",
"null"
],
"description": "百分数费率"
},
"amount": {
"type": [
"string",
"null"
],
"description": "人民币金额,十进制字符串;null 为未知或不适用"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
}
},
"required": [
"kind",
"name",
"status",
"basis",
"ratePercent",
"amount",
"description"
],
"additionalProperties": false
},
"description": "费用规则"
}
},
"required": [
"optionId",
"name",
"fulfillment",
"unit",
"baseUnit",
"priceCondition",
"reason",
"packageKind",
"quantityPerPackage",
"minCount",
"minimumQuantity",
"customerUnitPrice",
"discountedUnitPrice",
"stockQuantity",
"visibility",
"purchasable"
],
"additionalProperties": false
},
"description": "当前购买选项"
}
},
"required": [
"gId",
"name",
"brand",
"specification",
"imageUrl",
"detailUrl",
"priceUnit",
"reason",
"customerUnitPrice",
"visibility",
"delivery",
"purchaseOptions"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"page": {
"type": "integer",
"description": "页码从 1 开始"
},
"pageSize": {
"type": "integer",
"description": "每页数量 1–100"
},
"hasMore": {
"type": "boolean",
"description": "服务端多读一条确认是否有下一页"
}
},
"required": [
"items",
"page",
"pageSize",
"hasMore"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}查询购买选项、活动、配送和费用规则。使用原始 optionId 与整数份数;不可购买或包装失效时重新查询,不猜选项、不自动换商品。配送配置未知时不能承诺到货。
{
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"gId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"brand": {
"type": [
"string",
"null"
],
"description": "商品品牌"
},
"specification": {
"type": [
"string",
"null"
],
"description": "规格"
},
"imageUrl": {
"type": [
"string",
"null"
],
"description": "商品图片地址"
},
"detailUrl": {
"type": [
"string",
"null"
],
"description": "商城人工查看入口"
},
"priceUnit": {
"type": [
"string",
"null"
],
"description": "基本计价单位"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "中文商品属性名及值"
},
"delivery": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
},
"cloudNotice": {
"type": [
"string",
"null"
],
"description": "云仓配送时间不固定的说明"
}
},
"required": [
"status",
"basis",
"description"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "配送配置说明,库存不是到货承诺"
},
"purchaseOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"fulfillment": {
"type": [
"string",
"null"
],
"description": "自营、联营、零售或云仓"
},
"unit": {
"type": [
"string",
"null"
],
"description": "份数单位"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"priceCondition": {
"type": [
"string",
"null"
],
"description": "折扣价适用说明"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"packageKind": {
"type": "string",
"enum": [
"big",
"small",
"scattered"
],
"description": "big 整箱;small 小包;scattered 散装"
},
"quantityPerPackage": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minCount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minimumQuantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountedUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"stockQuantity": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"purchasable": {
"type": "boolean",
"description": "当前是否可购买"
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"ratePercent": {
"type": [
"string",
"null"
],
"description": "百分数费率"
},
"amount": {
"type": [
"string",
"null"
],
"description": "人民币金额,十进制字符串;null 为未知或不适用"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
}
},
"required": [
"kind",
"name",
"status",
"basis",
"ratePercent",
"amount",
"description"
],
"additionalProperties": false
},
"description": "费用规则"
}
},
"required": [
"optionId",
"name",
"fulfillment",
"unit",
"baseUnit",
"priceCondition",
"reason",
"packageKind",
"quantityPerPackage",
"minCount",
"minimumQuantity",
"customerUnitPrice",
"discountedUnitPrice",
"stockQuantity",
"visibility",
"purchasable"
],
"additionalProperties": false
},
"description": "当前购买选项"
},
"promotions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"activityId": {
"type": [
"string",
"null"
],
"description": "活动 ID,仅说明核对,不能提交指定活动"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
},
"startTime": {
"type": [
"string",
"null"
],
"description": "活动开始时间"
},
"endTime": {
"type": [
"string",
"null"
],
"description": "活动结束时间"
},
"discountPercent": {
"type": [
"string",
"null"
],
"description": "支付百分数,90 表示支付原价 90%"
},
"stackable": {
"type": "boolean",
"description": "是否可叠加"
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"thresholdAmount": {
"type": [
"string",
"null"
],
"description": "阶梯门槛金额"
},
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"value": {
"type": [
"string",
"null"
],
"description": "阶梯支付百分数或减免金额"
},
"repeating": {
"type": "boolean",
"description": "是否每满重复减免"
}
},
"required": [
"thresholdAmount",
"kind",
"value",
"repeating"
],
"additionalProperties": false
},
"description": "活动阶梯"
}
},
"required": [
"activityId",
"name",
"kind",
"description",
"startTime",
"endTime",
"discountPercent",
"stackable",
"tiers"
],
"additionalProperties": false
},
"description": "商品可用活动,仅供说明;最优组合以预览为准"
}
},
"required": [
"gId",
"name",
"brand",
"specification",
"imageUrl",
"detailUrl",
"priceUnit",
"reason",
"customerUnitPrice",
"visibility",
"delivery",
"purchaseOptions",
"promotions"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}只读预览完整商品集合的最优合法费用方案,输入为空返回零合计。total 不含运费、优惠券和支付方式费用;不锁价、不留库存、不改变网页活动选择。计算失败不得编造近似值。
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"optionId": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "详情返回的购买选项 optionId,原样使用,不解析或拼接"
},
"count": {
"type": "integer",
"minimum": 1,
"maximum": 1000000000,
"description": "购买选项的整数份数,不是基本数量"
}
},
"required": [
"gId",
"optionId",
"count"
],
"additionalProperties": false
},
"maxItems": 100,
"description": "本次返回项或参与预览的完整集合"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"items"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"optionId": {
"type": "string",
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"quantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"unpackingFeeBasis": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFeeRatePercent": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
}
},
"required": [
"gId",
"optionId",
"count",
"quantity",
"customerUnitPrice",
"unitPrice",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"baseUnit",
"unpackingFeeBasis",
"unpackingFeeRatePercent"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"promotions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"activityId": {
"type": [
"string",
"null"
],
"description": "活动 ID,仅说明核对,不能提交指定活动"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"discountAmount": {
"type": [
"string",
"null"
],
"description": "优惠金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"activityId",
"name",
"discountAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "商品可用活动或预览实际使用活动"
},
"restrictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"message": {
"type": [
"string",
"null"
],
"description": "业务结果或限制说明"
},
"requiredAmount": {
"type": [
"string",
"null"
],
"description": "要求达到的金额"
},
"currentAmount": {
"type": [
"string",
"null"
],
"description": "当前参与门槛的金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"kind",
"message",
"requiredAmount",
"currentAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "适用分组门槛"
},
"calculatedAt": {
"type": "string",
"description": "完整计算完成的 UTC 时间"
},
"complete": {
"type": "boolean",
"const": true,
"description": "成功必须为 true,不返回近似或部分计算"
},
"explanation": {
"type": "string",
"description": "预览范围说明"
},
"excluded": {
"type": "array",
"items": {
"type": "string"
},
"description": "未包含的费用项目"
}
},
"required": [
"items",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"promotions",
"restrictions",
"calculatedAt",
"complete",
"explanation",
"excluded"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}写入前查询购物车,避免重复添加。previewScope=returnedItems,关键词筛选后的预览不能称全车金额;preview=null 时看 previewError,不能自行凑完整合计。
{
"type": "object",
"properties": {
"keyword": {
"type": "string",
"maxLength": 200,
"description": "名称、规格、SKU 或聚合 SKU;可省略并按分类浏览"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string",
"description": "购物车不透明标识,原样使用"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"editable": {
"type": "boolean",
"description": "是否可改量"
},
"removable": {
"type": "boolean",
"description": "是否可删除"
},
"locked": {
"type": "boolean",
"description": "是否含锁定项:锁定项下单后仍保留在购物车,解锁前不能改量或删除"
},
"product": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"brand": {
"type": [
"string",
"null"
],
"description": "商品品牌"
},
"specification": {
"type": [
"string",
"null"
],
"description": "规格"
},
"imageUrl": {
"type": [
"string",
"null"
],
"description": "商品图片地址"
},
"detailUrl": {
"type": [
"string",
"null"
],
"description": "商城人工查看入口"
},
"priceUnit": {
"type": [
"string",
"null"
],
"description": "基本计价单位"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "中文商品属性名及值"
},
"delivery": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
},
"cloudNotice": {
"type": [
"string",
"null"
],
"description": "云仓配送时间不固定的说明"
}
},
"required": [
"status",
"basis",
"description"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "配送配置说明,库存不是到货承诺"
},
"purchaseOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"fulfillment": {
"type": [
"string",
"null"
],
"description": "自营、联营、零售或云仓"
},
"unit": {
"type": [
"string",
"null"
],
"description": "份数单位"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"priceCondition": {
"type": [
"string",
"null"
],
"description": "折扣价适用说明"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"packageKind": {
"type": "string",
"enum": [
"big",
"small",
"scattered"
],
"description": "big 整箱;small 小包;scattered 散装"
},
"quantityPerPackage": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minCount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minimumQuantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountedUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"stockQuantity": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"purchasable": {
"type": "boolean",
"description": "当前是否可购买"
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"ratePercent": {
"type": [
"string",
"null"
],
"description": "百分数费率"
},
"amount": {
"type": [
"string",
"null"
],
"description": "人民币金额,十进制字符串;null 为未知或不适用"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
}
},
"required": [
"kind",
"name",
"status",
"basis",
"ratePercent",
"amount",
"description"
],
"additionalProperties": false
},
"description": "费用规则"
}
},
"required": [
"optionId",
"name",
"fulfillment",
"unit",
"baseUnit",
"priceCondition",
"reason",
"packageKind",
"quantityPerPackage",
"minCount",
"minimumQuantity",
"customerUnitPrice",
"discountedUnitPrice",
"stockQuantity",
"visibility",
"purchasable"
],
"additionalProperties": false
},
"description": "当前购买选项"
}
},
"required": [
"gId",
"name",
"brand",
"specification",
"imageUrl",
"detailUrl",
"priceUnit",
"reason",
"customerUnitPrice",
"visibility",
"delivery",
"purchaseOptions"
],
"additionalProperties": false,
"description": "购物车商品"
},
"selections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": [
"string",
"null"
],
"description": "整数份数,输出为十进制字符串"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
}
},
"required": [
"optionId",
"count",
"name"
],
"additionalProperties": false
},
"description": "当前选项及份数"
}
},
"required": [
"itemId",
"reason",
"editable",
"removable",
"locked",
"product",
"selections"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"preview": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"optionId": {
"type": "string",
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"quantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"unpackingFeeBasis": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFeeRatePercent": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
}
},
"required": [
"gId",
"optionId",
"count",
"quantity",
"customerUnitPrice",
"unitPrice",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"baseUnit",
"unpackingFeeBasis",
"unpackingFeeRatePercent"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"promotions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"activityId": {
"type": [
"string",
"null"
],
"description": "活动 ID,仅说明核对,不能提交指定活动"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"discountAmount": {
"type": [
"string",
"null"
],
"description": "优惠金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"activityId",
"name",
"discountAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "商品可用活动或预览实际使用活动"
},
"restrictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"message": {
"type": [
"string",
"null"
],
"description": "业务结果或限制说明"
},
"requiredAmount": {
"type": [
"string",
"null"
],
"description": "要求达到的金额"
},
"currentAmount": {
"type": [
"string",
"null"
],
"description": "当前参与门槛的金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"kind",
"message",
"requiredAmount",
"currentAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "适用分组门槛"
},
"calculatedAt": {
"type": "string",
"description": "完整计算完成的 UTC 时间"
},
"complete": {
"type": "boolean",
"const": true,
"description": "成功必须为 true,不返回近似或部分计算"
},
"explanation": {
"type": "string",
"description": "预览范围说明"
},
"excluded": {
"type": "array",
"items": {
"type": "string"
},
"description": "未包含的费用项目"
}
},
"required": [
"items",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"promotions",
"restrictions",
"calculatedAt",
"complete",
"explanation",
"excluded"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "当前返回集合的完整费用预览;null 时看 previewError"
},
"previewError": {
"type": [
"string",
"null"
],
"description": "费用无法完整计算的原因"
},
"previewScope": {
"type": "string",
"const": "returnedItems",
"description": "固定 returnedItems,仅覆盖本次返回项"
},
"cartUrl": {
"type": "string",
"format": "uri",
"description": "客户人工结算的购物车入口"
}
},
"required": [
"items",
"preview",
"previewError",
"previewScope",
"cartUrl"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}按用户意愿追加选项份数,不覆盖其他选项;先查询购物车及商品详情。超时先查车,原 ID 原参数查询回执。 AI 可以帮助查询商品、预览费用、加入购物车、修改份数、锁定或解锁和删除购物车商品。如需下单,请客户自行打开商城购物车,核对商品、数量和费用,人工进行结算和支付。目前不支持 AI 下单或支付接口。 写入看 receipt.applied/receiptSaved;cartReadError 或 cart.previewError 不代表写入失败,禁止自动换 ID 重试。
{
"type": "object",
"properties": {
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,100}$",
"description": "同一业务意图及重试保持同一 ID,保留 366 天;不确定时先查询购物车,禁止自动换 ID 重试"
},
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"optionId": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "详情返回的购买选项 optionId,原样使用,不解析或拼接"
},
"count": {
"type": "integer",
"minimum": 1,
"maximum": 1000000000,
"description": "购买选项的整数份数,不是基本数量"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"requestId",
"gId",
"optionId",
"count"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"receipt": {
"type": "object",
"properties": {
"applied": {
"type": [
"boolean",
"null"
],
"description": "true 已修改,false 未修改,null 执行中或未知"
},
"uncertain": {
"type": "boolean",
"description": "结果存在不确定性,应先查询核对,禁止换 ID 重试"
},
"receiptSaved": {
"type": "boolean",
"description": "回执是否确认保存"
},
"message": {
"type": "string",
"description": "业务结果或限制说明"
},
"affected": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "实际受影响商品"
},
"retained": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "保留项及原因"
}
},
"required": [
"applied",
"uncertain",
"receiptSaved",
"message",
"affected",
"retained"
],
"additionalProperties": false,
"description": "业务写入回执,与刷新结果分开判断"
},
"cart": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string",
"description": "购物车不透明标识,原样使用"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"editable": {
"type": "boolean",
"description": "是否可改量"
},
"removable": {
"type": "boolean",
"description": "是否可删除"
},
"locked": {
"type": "boolean",
"description": "是否含锁定项:锁定项下单后仍保留在购物车,解锁前不能改量或删除"
},
"product": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"brand": {
"type": [
"string",
"null"
],
"description": "商品品牌"
},
"specification": {
"type": [
"string",
"null"
],
"description": "规格"
},
"imageUrl": {
"type": [
"string",
"null"
],
"description": "商品图片地址"
},
"detailUrl": {
"type": [
"string",
"null"
],
"description": "商城人工查看入口"
},
"priceUnit": {
"type": [
"string",
"null"
],
"description": "基本计价单位"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "中文商品属性名及值"
},
"delivery": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
},
"cloudNotice": {
"type": [
"string",
"null"
],
"description": "云仓配送时间不固定的说明"
}
},
"required": [
"status",
"basis",
"description"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "配送配置说明,库存不是到货承诺"
},
"purchaseOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"fulfillment": {
"type": [
"string",
"null"
],
"description": "自营、联营、零售或云仓"
},
"unit": {
"type": [
"string",
"null"
],
"description": "份数单位"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"priceCondition": {
"type": [
"string",
"null"
],
"description": "折扣价适用说明"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"packageKind": {
"type": "string",
"enum": [
"big",
"small",
"scattered"
],
"description": "big 整箱;small 小包;scattered 散装"
},
"quantityPerPackage": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minCount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minimumQuantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountedUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"stockQuantity": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"purchasable": {
"type": "boolean",
"description": "当前是否可购买"
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"ratePercent": {
"type": [
"string",
"null"
],
"description": "百分数费率"
},
"amount": {
"type": [
"string",
"null"
],
"description": "人民币金额,十进制字符串;null 为未知或不适用"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
}
},
"required": [
"kind",
"name",
"status",
"basis",
"ratePercent",
"amount",
"description"
],
"additionalProperties": false
},
"description": "费用规则"
}
},
"required": [
"optionId",
"name",
"fulfillment",
"unit",
"baseUnit",
"priceCondition",
"reason",
"packageKind",
"quantityPerPackage",
"minCount",
"minimumQuantity",
"customerUnitPrice",
"discountedUnitPrice",
"stockQuantity",
"visibility",
"purchasable"
],
"additionalProperties": false
},
"description": "当前购买选项"
}
},
"required": [
"gId",
"name",
"brand",
"specification",
"imageUrl",
"detailUrl",
"priceUnit",
"reason",
"customerUnitPrice",
"visibility",
"delivery",
"purchaseOptions"
],
"additionalProperties": false,
"description": "购物车商品"
},
"selections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": [
"string",
"null"
],
"description": "整数份数,输出为十进制字符串"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
}
},
"required": [
"optionId",
"count",
"name"
],
"additionalProperties": false
},
"description": "当前选项及份数"
}
},
"required": [
"itemId",
"reason",
"editable",
"removable",
"locked",
"product",
"selections"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"preview": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"optionId": {
"type": "string",
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"quantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"unpackingFeeBasis": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFeeRatePercent": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
}
},
"required": [
"gId",
"optionId",
"count",
"quantity",
"customerUnitPrice",
"unitPrice",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"baseUnit",
"unpackingFeeBasis",
"unpackingFeeRatePercent"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"promotions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"activityId": {
"type": [
"string",
"null"
],
"description": "活动 ID,仅说明核对,不能提交指定活动"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"discountAmount": {
"type": [
"string",
"null"
],
"description": "优惠金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"activityId",
"name",
"discountAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "商品可用活动或预览实际使用活动"
},
"restrictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"message": {
"type": [
"string",
"null"
],
"description": "业务结果或限制说明"
},
"requiredAmount": {
"type": [
"string",
"null"
],
"description": "要求达到的金额"
},
"currentAmount": {
"type": [
"string",
"null"
],
"description": "当前参与门槛的金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"kind",
"message",
"requiredAmount",
"currentAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "适用分组门槛"
},
"calculatedAt": {
"type": "string",
"description": "完整计算完成的 UTC 时间"
},
"complete": {
"type": "boolean",
"const": true,
"description": "成功必须为 true,不返回近似或部分计算"
},
"explanation": {
"type": "string",
"description": "预览范围说明"
},
"excluded": {
"type": "array",
"items": {
"type": "string"
},
"description": "未包含的费用项目"
}
},
"required": [
"items",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"promotions",
"restrictions",
"calculatedAt",
"complete",
"explanation",
"excluded"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "当前返回集合的完整费用预览;null 时看 previewError"
},
"previewError": {
"type": [
"string",
"null"
],
"description": "费用无法完整计算的原因"
},
"previewScope": {
"type": "string",
"const": "returnedItems",
"description": "固定 returnedItems,仅覆盖本次返回项"
},
"cartUrl": {
"type": "string",
"format": "uri",
"description": "客户人工结算的购物车入口"
}
},
"required": [
"items",
"preview",
"previewError",
"previewScope",
"cartUrl"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "写入后的购物车快照;null 不代表写入失败"
},
"cartReadError": {
"type": [
"string",
"null"
],
"description": "购物车刷新错误,不改变业务回执"
},
"guidance": {
"type": "string",
"description": "人工结算和重试指引"
}
},
"required": [
"receipt",
"cart",
"cartReadError",
"guidance"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}按用户意愿设置所选购买方式的目标份数;0 清除该选项,其他选项保留。旧包装无法解释时由用户核对删除重选。 AI 可以帮助查询商品、预览费用、加入购物车、修改份数、锁定或解锁和删除购物车商品。如需下单,请客户自行打开商城购物车,核对商品、数量和费用,人工进行结算和支付。目前不支持 AI 下单或支付接口。 写入看 receipt.applied/receiptSaved;cartReadError 或 cart.previewError 不代表写入失败,禁止自动换 ID 重试。
{
"type": "object",
"properties": {
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,100}$",
"description": "同一业务意图及重试保持同一 ID,保留 366 天;不确定时先查询购物车,禁止自动换 ID 重试"
},
"itemId": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "购物车返回的 itemId,原样使用,不解析或拼接"
},
"optionId": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "详情返回的购买选项 optionId,原样使用,不解析或拼接"
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000,
"description": "所选购买方式的目标份数,0 清除该选项"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"requestId",
"itemId",
"optionId",
"count"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"receipt": {
"type": "object",
"properties": {
"applied": {
"type": [
"boolean",
"null"
],
"description": "true 已修改,false 未修改,null 执行中或未知"
},
"uncertain": {
"type": "boolean",
"description": "结果存在不确定性,应先查询核对,禁止换 ID 重试"
},
"receiptSaved": {
"type": "boolean",
"description": "回执是否确认保存"
},
"message": {
"type": "string",
"description": "业务结果或限制说明"
},
"affected": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "实际受影响商品"
},
"retained": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "保留项及原因"
}
},
"required": [
"applied",
"uncertain",
"receiptSaved",
"message",
"affected",
"retained"
],
"additionalProperties": false,
"description": "业务写入回执,与刷新结果分开判断"
},
"cart": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string",
"description": "购物车不透明标识,原样使用"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"editable": {
"type": "boolean",
"description": "是否可改量"
},
"removable": {
"type": "boolean",
"description": "是否可删除"
},
"locked": {
"type": "boolean",
"description": "是否含锁定项:锁定项下单后仍保留在购物车,解锁前不能改量或删除"
},
"product": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"brand": {
"type": [
"string",
"null"
],
"description": "商品品牌"
},
"specification": {
"type": [
"string",
"null"
],
"description": "规格"
},
"imageUrl": {
"type": [
"string",
"null"
],
"description": "商品图片地址"
},
"detailUrl": {
"type": [
"string",
"null"
],
"description": "商城人工查看入口"
},
"priceUnit": {
"type": [
"string",
"null"
],
"description": "基本计价单位"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "中文商品属性名及值"
},
"delivery": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
},
"cloudNotice": {
"type": [
"string",
"null"
],
"description": "云仓配送时间不固定的说明"
}
},
"required": [
"status",
"basis",
"description"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "配送配置说明,库存不是到货承诺"
},
"purchaseOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"fulfillment": {
"type": [
"string",
"null"
],
"description": "自营、联营、零售或云仓"
},
"unit": {
"type": [
"string",
"null"
],
"description": "份数单位"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"priceCondition": {
"type": [
"string",
"null"
],
"description": "折扣价适用说明"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"packageKind": {
"type": "string",
"enum": [
"big",
"small",
"scattered"
],
"description": "big 整箱;small 小包;scattered 散装"
},
"quantityPerPackage": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minCount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minimumQuantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountedUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"stockQuantity": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"purchasable": {
"type": "boolean",
"description": "当前是否可购买"
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"ratePercent": {
"type": [
"string",
"null"
],
"description": "百分数费率"
},
"amount": {
"type": [
"string",
"null"
],
"description": "人民币金额,十进制字符串;null 为未知或不适用"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
}
},
"required": [
"kind",
"name",
"status",
"basis",
"ratePercent",
"amount",
"description"
],
"additionalProperties": false
},
"description": "费用规则"
}
},
"required": [
"optionId",
"name",
"fulfillment",
"unit",
"baseUnit",
"priceCondition",
"reason",
"packageKind",
"quantityPerPackage",
"minCount",
"minimumQuantity",
"customerUnitPrice",
"discountedUnitPrice",
"stockQuantity",
"visibility",
"purchasable"
],
"additionalProperties": false
},
"description": "当前购买选项"
}
},
"required": [
"gId",
"name",
"brand",
"specification",
"imageUrl",
"detailUrl",
"priceUnit",
"reason",
"customerUnitPrice",
"visibility",
"delivery",
"purchaseOptions"
],
"additionalProperties": false,
"description": "购物车商品"
},
"selections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": [
"string",
"null"
],
"description": "整数份数,输出为十进制字符串"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
}
},
"required": [
"optionId",
"count",
"name"
],
"additionalProperties": false
},
"description": "当前选项及份数"
}
},
"required": [
"itemId",
"reason",
"editable",
"removable",
"locked",
"product",
"selections"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"preview": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"optionId": {
"type": "string",
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"quantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"unpackingFeeBasis": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFeeRatePercent": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
}
},
"required": [
"gId",
"optionId",
"count",
"quantity",
"customerUnitPrice",
"unitPrice",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"baseUnit",
"unpackingFeeBasis",
"unpackingFeeRatePercent"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"promotions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"activityId": {
"type": [
"string",
"null"
],
"description": "活动 ID,仅说明核对,不能提交指定活动"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"discountAmount": {
"type": [
"string",
"null"
],
"description": "优惠金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"activityId",
"name",
"discountAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "商品可用活动或预览实际使用活动"
},
"restrictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"message": {
"type": [
"string",
"null"
],
"description": "业务结果或限制说明"
},
"requiredAmount": {
"type": [
"string",
"null"
],
"description": "要求达到的金额"
},
"currentAmount": {
"type": [
"string",
"null"
],
"description": "当前参与门槛的金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"kind",
"message",
"requiredAmount",
"currentAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "适用分组门槛"
},
"calculatedAt": {
"type": "string",
"description": "完整计算完成的 UTC 时间"
},
"complete": {
"type": "boolean",
"const": true,
"description": "成功必须为 true,不返回近似或部分计算"
},
"explanation": {
"type": "string",
"description": "预览范围说明"
},
"excluded": {
"type": "array",
"items": {
"type": "string"
},
"description": "未包含的费用项目"
}
},
"required": [
"items",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"promotions",
"restrictions",
"calculatedAt",
"complete",
"explanation",
"excluded"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "当前返回集合的完整费用预览;null 时看 previewError"
},
"previewError": {
"type": [
"string",
"null"
],
"description": "费用无法完整计算的原因"
},
"previewScope": {
"type": "string",
"const": "returnedItems",
"description": "固定 returnedItems,仅覆盖本次返回项"
},
"cartUrl": {
"type": "string",
"format": "uri",
"description": "客户人工结算的购物车入口"
}
},
"required": [
"items",
"preview",
"previewError",
"previewScope",
"cartUrl"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "写入后的购物车快照;null 不代表写入失败"
},
"cartReadError": {
"type": [
"string",
"null"
],
"description": "购物车刷新错误,不改变业务回执"
},
"guidance": {
"type": "string",
"description": "人工结算和重试指引"
}
},
"required": [
"receipt",
"cart",
"cartReadError",
"guidance"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}删除购物车 itemIds,关联 SPU 可能同时删除,锁定项保留。按 affected/retained 如实说明,不能把输入项数当删除数。 AI 可以帮助查询商品、预览费用、加入购物车、修改份数、锁定或解锁和删除购物车商品。如需下单,请客户自行打开商城购物车,核对商品、数量和费用,人工进行结算和支付。目前不支持 AI 下单或支付接口。 写入看 receipt.applied/receiptSaved;cartReadError 或 cart.previewError 不代表写入失败,禁止自动换 ID 重试。
{
"type": "object",
"properties": {
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,100}$",
"description": "同一业务意图及重试保持同一 ID,保留 366 天;不确定时先查询购物车,禁止自动换 ID 重试"
},
"itemIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "购物车返回的 itemId,原样使用,不解析或拼接"
},
"minItems": 1,
"maxItems": 100,
"description": "1–100 个购物车标识,重复项去重"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"requestId",
"itemIds"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"receipt": {
"type": "object",
"properties": {
"applied": {
"type": [
"boolean",
"null"
],
"description": "true 已修改,false 未修改,null 执行中或未知"
},
"uncertain": {
"type": "boolean",
"description": "结果存在不确定性,应先查询核对,禁止换 ID 重试"
},
"receiptSaved": {
"type": "boolean",
"description": "回执是否确认保存"
},
"message": {
"type": "string",
"description": "业务结果或限制说明"
},
"affected": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "实际受影响商品"
},
"retained": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "保留项及原因"
}
},
"required": [
"applied",
"uncertain",
"receiptSaved",
"message",
"affected",
"retained"
],
"additionalProperties": false,
"description": "业务写入回执,与刷新结果分开判断"
},
"cart": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string",
"description": "购物车不透明标识,原样使用"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"editable": {
"type": "boolean",
"description": "是否可改量"
},
"removable": {
"type": "boolean",
"description": "是否可删除"
},
"locked": {
"type": "boolean",
"description": "是否含锁定项:锁定项下单后仍保留在购物车,解锁前不能改量或删除"
},
"product": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"brand": {
"type": [
"string",
"null"
],
"description": "商品品牌"
},
"specification": {
"type": [
"string",
"null"
],
"description": "规格"
},
"imageUrl": {
"type": [
"string",
"null"
],
"description": "商品图片地址"
},
"detailUrl": {
"type": [
"string",
"null"
],
"description": "商城人工查看入口"
},
"priceUnit": {
"type": [
"string",
"null"
],
"description": "基本计价单位"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "中文商品属性名及值"
},
"delivery": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
},
"cloudNotice": {
"type": [
"string",
"null"
],
"description": "云仓配送时间不固定的说明"
}
},
"required": [
"status",
"basis",
"description"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "配送配置说明,库存不是到货承诺"
},
"purchaseOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"fulfillment": {
"type": [
"string",
"null"
],
"description": "自营、联营、零售或云仓"
},
"unit": {
"type": [
"string",
"null"
],
"description": "份数单位"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"priceCondition": {
"type": [
"string",
"null"
],
"description": "折扣价适用说明"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"packageKind": {
"type": "string",
"enum": [
"big",
"small",
"scattered"
],
"description": "big 整箱;small 小包;scattered 散装"
},
"quantityPerPackage": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minCount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minimumQuantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountedUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"stockQuantity": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"purchasable": {
"type": "boolean",
"description": "当前是否可购买"
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"ratePercent": {
"type": [
"string",
"null"
],
"description": "百分数费率"
},
"amount": {
"type": [
"string",
"null"
],
"description": "人民币金额,十进制字符串;null 为未知或不适用"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
}
},
"required": [
"kind",
"name",
"status",
"basis",
"ratePercent",
"amount",
"description"
],
"additionalProperties": false
},
"description": "费用规则"
}
},
"required": [
"optionId",
"name",
"fulfillment",
"unit",
"baseUnit",
"priceCondition",
"reason",
"packageKind",
"quantityPerPackage",
"minCount",
"minimumQuantity",
"customerUnitPrice",
"discountedUnitPrice",
"stockQuantity",
"visibility",
"purchasable"
],
"additionalProperties": false
},
"description": "当前购买选项"
}
},
"required": [
"gId",
"name",
"brand",
"specification",
"imageUrl",
"detailUrl",
"priceUnit",
"reason",
"customerUnitPrice",
"visibility",
"delivery",
"purchaseOptions"
],
"additionalProperties": false,
"description": "购物车商品"
},
"selections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": [
"string",
"null"
],
"description": "整数份数,输出为十进制字符串"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
}
},
"required": [
"optionId",
"count",
"name"
],
"additionalProperties": false
},
"description": "当前选项及份数"
}
},
"required": [
"itemId",
"reason",
"editable",
"removable",
"locked",
"product",
"selections"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"preview": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"optionId": {
"type": "string",
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"quantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"unpackingFeeBasis": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFeeRatePercent": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
}
},
"required": [
"gId",
"optionId",
"count",
"quantity",
"customerUnitPrice",
"unitPrice",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"baseUnit",
"unpackingFeeBasis",
"unpackingFeeRatePercent"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"promotions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"activityId": {
"type": [
"string",
"null"
],
"description": "活动 ID,仅说明核对,不能提交指定活动"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"discountAmount": {
"type": [
"string",
"null"
],
"description": "优惠金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"activityId",
"name",
"discountAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "商品可用活动或预览实际使用活动"
},
"restrictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"message": {
"type": [
"string",
"null"
],
"description": "业务结果或限制说明"
},
"requiredAmount": {
"type": [
"string",
"null"
],
"description": "要求达到的金额"
},
"currentAmount": {
"type": [
"string",
"null"
],
"description": "当前参与门槛的金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"kind",
"message",
"requiredAmount",
"currentAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "适用分组门槛"
},
"calculatedAt": {
"type": "string",
"description": "完整计算完成的 UTC 时间"
},
"complete": {
"type": "boolean",
"const": true,
"description": "成功必须为 true,不返回近似或部分计算"
},
"explanation": {
"type": "string",
"description": "预览范围说明"
},
"excluded": {
"type": "array",
"items": {
"type": "string"
},
"description": "未包含的费用项目"
}
},
"required": [
"items",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"promotions",
"restrictions",
"calculatedAt",
"complete",
"explanation",
"excluded"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "当前返回集合的完整费用预览;null 时看 previewError"
},
"previewError": {
"type": [
"string",
"null"
],
"description": "费用无法完整计算的原因"
},
"previewScope": {
"type": "string",
"const": "returnedItems",
"description": "固定 returnedItems,仅覆盖本次返回项"
},
"cartUrl": {
"type": "string",
"format": "uri",
"description": "客户人工结算的购物车入口"
}
},
"required": [
"items",
"preview",
"previewError",
"previewScope",
"cartUrl"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "写入后的购物车快照;null 不代表写入失败"
},
"cartReadError": {
"type": [
"string",
"null"
],
"description": "购物车刷新错误,不改变业务回执"
},
"guidance": {
"type": "string",
"description": "人工结算和重试指引"
}
},
"required": [
"receipt",
"cart",
"cartReadError",
"guidance"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}按用户意愿锁定购物车 itemIds,与网页“锁定”相同:下单后商品仍保留在购物车,适合常购商品;锁定期间不能改量或删除,结算时照常计价。已锁定的项在 retained 中说明。 AI 可以帮助查询商品、预览费用、加入购物车、修改份数、锁定或解锁和删除购物车商品。如需下单,请客户自行打开商城购物车,核对商品、数量和费用,人工进行结算和支付。目前不支持 AI 下单或支付接口。 写入看 receipt.applied/receiptSaved;cartReadError 或 cart.previewError 不代表写入失败,禁止自动换 ID 重试。
{
"type": "object",
"properties": {
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,100}$",
"description": "同一业务意图及重试保持同一 ID,保留 366 天;不确定时先查询购物车,禁止自动换 ID 重试"
},
"itemIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "购物车返回的 itemId,原样使用,不解析或拼接"
},
"minItems": 1,
"maxItems": 100,
"description": "1–100 个购物车标识,重复项去重"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"requestId",
"itemIds"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"receipt": {
"type": "object",
"properties": {
"applied": {
"type": [
"boolean",
"null"
],
"description": "true 已修改,false 未修改,null 执行中或未知"
},
"uncertain": {
"type": "boolean",
"description": "结果存在不确定性,应先查询核对,禁止换 ID 重试"
},
"receiptSaved": {
"type": "boolean",
"description": "回执是否确认保存"
},
"message": {
"type": "string",
"description": "业务结果或限制说明"
},
"affected": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "实际受影响商品"
},
"retained": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "保留项及原因"
}
},
"required": [
"applied",
"uncertain",
"receiptSaved",
"message",
"affected",
"retained"
],
"additionalProperties": false,
"description": "业务写入回执,与刷新结果分开判断"
},
"cart": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string",
"description": "购物车不透明标识,原样使用"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"editable": {
"type": "boolean",
"description": "是否可改量"
},
"removable": {
"type": "boolean",
"description": "是否可删除"
},
"locked": {
"type": "boolean",
"description": "是否含锁定项:锁定项下单后仍保留在购物车,解锁前不能改量或删除"
},
"product": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"brand": {
"type": [
"string",
"null"
],
"description": "商品品牌"
},
"specification": {
"type": [
"string",
"null"
],
"description": "规格"
},
"imageUrl": {
"type": [
"string",
"null"
],
"description": "商品图片地址"
},
"detailUrl": {
"type": [
"string",
"null"
],
"description": "商城人工查看入口"
},
"priceUnit": {
"type": [
"string",
"null"
],
"description": "基本计价单位"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "中文商品属性名及值"
},
"delivery": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
},
"cloudNotice": {
"type": [
"string",
"null"
],
"description": "云仓配送时间不固定的说明"
}
},
"required": [
"status",
"basis",
"description"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "配送配置说明,库存不是到货承诺"
},
"purchaseOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"fulfillment": {
"type": [
"string",
"null"
],
"description": "自营、联营、零售或云仓"
},
"unit": {
"type": [
"string",
"null"
],
"description": "份数单位"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"priceCondition": {
"type": [
"string",
"null"
],
"description": "折扣价适用说明"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"packageKind": {
"type": "string",
"enum": [
"big",
"small",
"scattered"
],
"description": "big 整箱;small 小包;scattered 散装"
},
"quantityPerPackage": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minCount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minimumQuantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountedUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"stockQuantity": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"purchasable": {
"type": "boolean",
"description": "当前是否可购买"
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"ratePercent": {
"type": [
"string",
"null"
],
"description": "百分数费率"
},
"amount": {
"type": [
"string",
"null"
],
"description": "人民币金额,十进制字符串;null 为未知或不适用"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
}
},
"required": [
"kind",
"name",
"status",
"basis",
"ratePercent",
"amount",
"description"
],
"additionalProperties": false
},
"description": "费用规则"
}
},
"required": [
"optionId",
"name",
"fulfillment",
"unit",
"baseUnit",
"priceCondition",
"reason",
"packageKind",
"quantityPerPackage",
"minCount",
"minimumQuantity",
"customerUnitPrice",
"discountedUnitPrice",
"stockQuantity",
"visibility",
"purchasable"
],
"additionalProperties": false
},
"description": "当前购买选项"
}
},
"required": [
"gId",
"name",
"brand",
"specification",
"imageUrl",
"detailUrl",
"priceUnit",
"reason",
"customerUnitPrice",
"visibility",
"delivery",
"purchaseOptions"
],
"additionalProperties": false,
"description": "购物车商品"
},
"selections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": [
"string",
"null"
],
"description": "整数份数,输出为十进制字符串"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
}
},
"required": [
"optionId",
"count",
"name"
],
"additionalProperties": false
},
"description": "当前选项及份数"
}
},
"required": [
"itemId",
"reason",
"editable",
"removable",
"locked",
"product",
"selections"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"preview": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"optionId": {
"type": "string",
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"quantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"unpackingFeeBasis": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFeeRatePercent": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
}
},
"required": [
"gId",
"optionId",
"count",
"quantity",
"customerUnitPrice",
"unitPrice",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"baseUnit",
"unpackingFeeBasis",
"unpackingFeeRatePercent"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"promotions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"activityId": {
"type": [
"string",
"null"
],
"description": "活动 ID,仅说明核对,不能提交指定活动"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"discountAmount": {
"type": [
"string",
"null"
],
"description": "优惠金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"activityId",
"name",
"discountAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "商品可用活动或预览实际使用活动"
},
"restrictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"message": {
"type": [
"string",
"null"
],
"description": "业务结果或限制说明"
},
"requiredAmount": {
"type": [
"string",
"null"
],
"description": "要求达到的金额"
},
"currentAmount": {
"type": [
"string",
"null"
],
"description": "当前参与门槛的金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"kind",
"message",
"requiredAmount",
"currentAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "适用分组门槛"
},
"calculatedAt": {
"type": "string",
"description": "完整计算完成的 UTC 时间"
},
"complete": {
"type": "boolean",
"const": true,
"description": "成功必须为 true,不返回近似或部分计算"
},
"explanation": {
"type": "string",
"description": "预览范围说明"
},
"excluded": {
"type": "array",
"items": {
"type": "string"
},
"description": "未包含的费用项目"
}
},
"required": [
"items",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"promotions",
"restrictions",
"calculatedAt",
"complete",
"explanation",
"excluded"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "当前返回集合的完整费用预览;null 时看 previewError"
},
"previewError": {
"type": [
"string",
"null"
],
"description": "费用无法完整计算的原因"
},
"previewScope": {
"type": "string",
"const": "returnedItems",
"description": "固定 returnedItems,仅覆盖本次返回项"
},
"cartUrl": {
"type": "string",
"format": "uri",
"description": "客户人工结算的购物车入口"
}
},
"required": [
"items",
"preview",
"previewError",
"previewScope",
"cartUrl"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "写入后的购物车快照;null 不代表写入失败"
},
"cartReadError": {
"type": [
"string",
"null"
],
"description": "购物车刷新错误,不改变业务回执"
},
"guidance": {
"type": "string",
"description": "人工结算和重试指引"
}
},
"required": [
"receipt",
"cart",
"cartReadError",
"guidance"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}按用户意愿解锁购物车 itemIds,解锁后可改量或删除,下单后不再保留。未锁定的项在 retained 中说明。 AI 可以帮助查询商品、预览费用、加入购物车、修改份数、锁定或解锁和删除购物车商品。如需下单,请客户自行打开商城购物车,核对商品、数量和费用,人工进行结算和支付。目前不支持 AI 下单或支付接口。 写入看 receipt.applied/receiptSaved;cartReadError 或 cart.previewError 不代表写入失败,禁止自动换 ID 重试。
{
"type": "object",
"properties": {
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,100}$",
"description": "同一业务意图及重试保持同一 ID,保留 366 天;不确定时先查询购物车,禁止自动换 ID 重试"
},
"itemIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "购物车返回的 itemId,原样使用,不解析或拼接"
},
"minItems": 1,
"maxItems": 100,
"description": "1–100 个购物车标识,重复项去重"
},
"accessToken": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "仅账号密码直登 Token 的兼容参数。优先使用 Authorization: Bearer;OAuth Token 只能放请求头。不得传官网 Token"
}
},
"required": [
"requestId",
"itemIds"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"type": "object",
"properties": {
"receipt": {
"type": "object",
"properties": {
"applied": {
"type": [
"boolean",
"null"
],
"description": "true 已修改,false 未修改,null 执行中或未知"
},
"uncertain": {
"type": "boolean",
"description": "结果存在不确定性,应先查询核对,禁止换 ID 重试"
},
"receiptSaved": {
"type": "boolean",
"description": "回执是否确认保存"
},
"message": {
"type": "string",
"description": "业务结果或限制说明"
},
"affected": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "实际受影响商品"
},
"retained": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": [
"string",
"null"
],
"description": "购物车不透明标识,原样使用"
},
"gId": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"description": "商品 SKU ID"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
}
},
"required": [
"itemId",
"gId",
"reason"
],
"additionalProperties": false
},
"description": "保留项及原因"
}
},
"required": [
"applied",
"uncertain",
"receiptSaved",
"message",
"affected",
"retained"
],
"additionalProperties": false,
"description": "业务写入回执,与刷新结果分开判断"
},
"cart": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string",
"description": "购物车不透明标识,原样使用"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"editable": {
"type": "boolean",
"description": "是否可改量"
},
"removable": {
"type": "boolean",
"description": "是否可删除"
},
"locked": {
"type": "boolean",
"description": "是否含锁定项:锁定项下单后仍保留在购物车,解锁前不能改量或删除"
},
"product": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"brand": {
"type": [
"string",
"null"
],
"description": "商品品牌"
},
"specification": {
"type": [
"string",
"null"
],
"description": "规格"
},
"imageUrl": {
"type": [
"string",
"null"
],
"description": "商品图片地址"
},
"detailUrl": {
"type": [
"string",
"null"
],
"description": "商城人工查看入口"
},
"priceUnit": {
"type": [
"string",
"null"
],
"description": "基本计价单位"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "中文商品属性名及值"
},
"delivery": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
},
"cloudNotice": {
"type": [
"string",
"null"
],
"description": "云仓配送时间不固定的说明"
}
},
"required": [
"status",
"basis",
"description"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "配送配置说明,库存不是到货承诺"
},
"purchaseOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"fulfillment": {
"type": [
"string",
"null"
],
"description": "自营、联营、零售或云仓"
},
"unit": {
"type": [
"string",
"null"
],
"description": "份数单位"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"priceCondition": {
"type": [
"string",
"null"
],
"description": "折扣价适用说明"
},
"reason": {
"type": [
"string",
"null"
],
"description": "不可用或受限原因;null 表示无补充原因"
},
"packageKind": {
"type": "string",
"enum": [
"big",
"small",
"scattered"
],
"description": "big 整箱;small 小包;scattered 散装"
},
"quantityPerPackage": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minCount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"minimumQuantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountedUnitPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"stockQuantity": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"visibility": {
"type": "string",
"enum": [
"visible",
"loginRequired",
"unavailable"
],
"description": "visible 可见;loginRequired 需登录;unavailable 无法确认"
},
"purchasable": {
"type": "boolean",
"description": "当前是否可购买"
},
"fees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"status": {
"type": [
"string",
"null"
],
"description": "配置状态"
},
"basis": {
"type": [
"string",
"null"
],
"description": "适用或计算依据"
},
"ratePercent": {
"type": [
"string",
"null"
],
"description": "百分数费率"
},
"amount": {
"type": [
"string",
"null"
],
"description": "人民币金额,十进制字符串;null 为未知或不适用"
},
"description": {
"type": [
"string",
"null"
],
"description": "说明"
}
},
"required": [
"kind",
"name",
"status",
"basis",
"ratePercent",
"amount",
"description"
],
"additionalProperties": false
},
"description": "费用规则"
}
},
"required": [
"optionId",
"name",
"fulfillment",
"unit",
"baseUnit",
"priceCondition",
"reason",
"packageKind",
"quantityPerPackage",
"minCount",
"minimumQuantity",
"customerUnitPrice",
"discountedUnitPrice",
"stockQuantity",
"visibility",
"purchasable"
],
"additionalProperties": false
},
"description": "当前购买选项"
}
},
"required": [
"gId",
"name",
"brand",
"specification",
"imageUrl",
"detailUrl",
"priceUnit",
"reason",
"customerUnitPrice",
"visibility",
"delivery",
"purchaseOptions"
],
"additionalProperties": false,
"description": "购物车商品"
},
"selections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": [
"string",
"null"
],
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": [
"string",
"null"
],
"description": "整数份数,输出为十进制字符串"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
}
},
"required": [
"optionId",
"count",
"name"
],
"additionalProperties": false
},
"description": "当前选项及份数"
}
},
"required": [
"itemId",
"reason",
"editable",
"removable",
"locked",
"product",
"selections"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"preview": {
"anyOf": [
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gId": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"optionId": {
"type": "string",
"description": "服务端购买标识,原样使用;null 不可提交"
},
"count": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"quantity": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"customerUnitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unitPrice": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"baseUnit": {
"type": [
"string",
"null"
],
"description": "基本数量单位"
},
"unpackingFeeBasis": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFeeRatePercent": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
{
"type": "null"
}
],
"description": "十进制字符串;保持服务端精度,null 不是 0"
}
},
"required": [
"gId",
"optionId",
"count",
"quantity",
"customerUnitPrice",
"unitPrice",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"baseUnit",
"unpackingFeeBasis",
"unpackingFeeRatePercent"
],
"additionalProperties": false
},
"description": "本次返回项或参与预览的完整集合"
},
"goodsAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"discountAmount": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"unpackingFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"retailFee": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"total": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "十进制字符串;保持服务端精度,null 不是 0"
},
"promotions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"activityId": {
"type": [
"string",
"null"
],
"description": "活动 ID,仅说明核对,不能提交指定活动"
},
"name": {
"type": [
"string",
"null"
],
"description": "名称"
},
"discountAmount": {
"type": [
"string",
"null"
],
"description": "优惠金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"activityId",
"name",
"discountAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "商品可用活动或预览实际使用活动"
},
"restrictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": [
"string",
"null"
],
"description": "规则或活动类型"
},
"message": {
"type": [
"string",
"null"
],
"description": "业务结果或限制说明"
},
"requiredAmount": {
"type": [
"string",
"null"
],
"description": "要求达到的金额"
},
"currentAmount": {
"type": [
"string",
"null"
],
"description": "当前参与门槛的金额"
},
"goodsIds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "搜索返回的商品 SKU,不使用散装内部 SKU"
},
"description": "适用商品 ID"
}
},
"required": [
"kind",
"message",
"requiredAmount",
"currentAmount",
"goodsIds"
],
"additionalProperties": false
},
"description": "适用分组门槛"
},
"calculatedAt": {
"type": "string",
"description": "完整计算完成的 UTC 时间"
},
"complete": {
"type": "boolean",
"const": true,
"description": "成功必须为 true,不返回近似或部分计算"
},
"explanation": {
"type": "string",
"description": "预览范围说明"
},
"excluded": {
"type": "array",
"items": {
"type": "string"
},
"description": "未包含的费用项目"
}
},
"required": [
"items",
"goodsAmount",
"discountAmount",
"unpackingFee",
"retailFee",
"total",
"promotions",
"restrictions",
"calculatedAt",
"complete",
"explanation",
"excluded"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "当前返回集合的完整费用预览;null 时看 previewError"
},
"previewError": {
"type": [
"string",
"null"
],
"description": "费用无法完整计算的原因"
},
"previewScope": {
"type": "string",
"const": "returnedItems",
"description": "固定 returnedItems,仅覆盖本次返回项"
},
"cartUrl": {
"type": "string",
"format": "uri",
"description": "客户人工结算的购物车入口"
}
},
"required": [
"items",
"preview",
"previewError",
"previewScope",
"cartUrl"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "写入后的购物车快照;null 不代表写入失败"
},
"cartReadError": {
"type": [
"string",
"null"
],
"description": "购物车刷新错误,不改变业务回执"
},
"guidance": {
"type": "string",
"description": "人工结算和重试指引"
}
},
"required": [
"receipt",
"cart",
"cartReadError",
"guidance"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}