Files
baiyue-firstleg/lastleg-service/src/main/resources/openapi/procurement-fulfillment-v1.yaml
T

3507 lines
96 KiB
YAML
Raw Normal View History

openapi: 3.0.3
info:
title: 采购样品履约节点 API
version: 1.0.0
2026-10-26 13:41:43 +08:00
description: 客户范围、节点资格、版本与幂等由服务端校验;购买事实与资金结果分开保存。采购双方向复用两段技术编码:OVERSEAS 为起运段,DOMESTIC 为目的地段;按 procurementDirection 解释实际区域。
security:
- bearerAuth: []
paths:
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/fulfillment:
get:
summary: 读取采购履约与货款结果
description: 权限 platform:overseas-business:purchase:list;平台主体。真实已发生的购买超预算或缺汇率时保留事实并返回 purchase.issue,不伪造扣款成功。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 统一业务响应,须检查 code;成功不等于资金已扣款
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
'401':
description: 未认证
'403':
description: 主体或动作权限不允许
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/purchase:
post:
summary: 登记真实购买并核定样品货款
description: 权限 platform:overseas-business:purchase:buy;平台主体。真实已发生的购买超预算或缺汇率时保留事实并返回 purchase.issue,不伪造扣款成功。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Purchase'
responses:
'200':
description: 统一业务响应,须检查 code;成功不等于资金已扣款
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
'401':
description: 未认证
'403':
description: 主体或动作权限不允许
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/purchase/confirm:
post:
summary: 补齐授权或汇率后核定原购买
description: 权限 platform:overseas-business:purchase:buy;平台主体。真实已发生的购买超预算或缺汇率时保留事实并返回 purchase.issue,不伪造扣款成功。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Command'
responses:
'200':
description: 统一业务响应,须检查 code;成功不等于资金已扣款
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
'401':
description: 未认证
'403':
description: 主体或动作权限不允许
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/budget-authorizations:
post:
summary: 核验客户预算上限授权
description: 权限 platform:overseas-business:purchase:review;平台主体。真实已发生的购买超预算或缺汇率时保留事实并返回 purchase.issue,不伪造扣款成功。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Budget'
responses:
'200':
description: 统一业务响应,须检查 code;成功不等于资金已扣款
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
'401':
description: 未认证
'403':
description: 主体或动作权限不允许
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/planned-warehouse:
post:
summary: 首次实收前选择计划采购仓
description: 权限 platform:overseas-business:purchase:review;平台主体。真实已发生的购买超预算或缺汇率时保留事实并返回 purchase.issue,不伪造扣款成功。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Warehouse'
responses:
'200':
description: 统一业务响应,须检查 code;成功不等于资金已扣款
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
'401':
description: 未认证
'403':
description: 主体或动作权限不允许
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/cancel:
post:
summary: 购买前取消采购订单
description: 权限 platform:overseas-business:purchase:cancel;平台主体。真实已发生的购买超预算或缺汇率时保留事实并返回 purchase.issue,不伪造扣款成功。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Command'
responses:
'200':
description: 统一业务响应,须检查 code;成功不等于资金已扣款
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
'401':
description: 未认证
'403':
description: 主体或动作权限不允许
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/physical:
get:
summary: 查询采购实收与当前装箱版本
description: 权限 platform:overseas-business:purchase:list;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/overseas-receipts:
post:
summary: 登记海外分次实收
description: 权限 platform:overseas-business:purchase:receive-overseas;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Receipt'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/domestic-receipts:
post:
summary: 按原交寄箱登记国内实收
description: 权限 platform:overseas-business:purchase:receive-domestic;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Receipt'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/overseas-receipts/complete:
post:
summary: 确认海外收货完成
description: 权限 platform:overseas-business:purchase:receive-overseas;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FinishReceipt'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/domestic-receipts/complete:
post:
summary: 确认国内收货完成
description: 权限 platform:overseas-business:purchase:receive-domestic;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FinishReceipt'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/dispositions:
post:
summary: 确认单内差异处置
description: 权限 platform:overseas-business:purchase:manage;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Disposition'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/packing:
post:
summary: 保存新的装箱清单版本
description: 权限 platform:overseas-business:purchase:pack;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Packing'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/packing/confirm:
post:
summary: 确认整批装箱
description: 权限 platform:overseas-business:purchase:pack;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfirmPacking'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/packing/withdraw:
post:
summary: 撤回尚未交寄的确认清单
description: 权限 platform:overseas-business:purchase:manage;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Command'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/receipts/{receiptId}/correct:
post:
summary: 保留原记录并受控更正实收
description: 权限 platform:overseas-business:purchase:manage;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: receiptId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Correction'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/dispositions/{dispositionId}/revoke:
post:
summary: 凭证支持的差异处置更正
description: 权限 platform:overseas-business:purchase:manage;平台身份、订单范围、版本、幂等及节点准入均由服务端复验。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: dispositionId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 检查业务code;返回最新采购实收及装箱快照
content:
application/json:
schema:
$ref: '#/components/schemas/PhysicalResponse'
'403':
description: 无动作权限
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RevokeDisposition'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/transport:
get:
summary: 读取两段面单及实际交寄事实
description: 权限 platform:overseas-business:purchase:list。平台内部资料,不直接对客输出。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code;资金处理中不代表已完成
content:
application/json:
schema:
$ref: '#/components/schemas/TransportResponse'
'400':
description: 字段、来源或数量不合法
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、重复发运或节点尚未满足
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/labels:
post:
summary: 保存本段全批面单新版本
description: 权限 platform:overseas-business:purchase:label。清单、文件、页码与全部可寄原箱关联;国际寄件取实际仓主档。国内改最终收件信息须有本单EXCEPTION客户确认凭证。新版本不沿用旧贴单。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code;资金处理中不代表已完成
content:
application/json:
schema:
$ref: '#/components/schemas/TransportResponse'
'400':
description: 字段、来源或数量不合法
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、重复发运或节点尚未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Labels'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/international-estimate:
post:
summary: 核对国际预估并申请冻结或释放
description: 权限 platform:overseas-business:purchase:estimate。仅CNY。同金额可显式沿用原FROZEN/ZERO;变价先申请释放,等待成功后以新请求确认新金额,未决不得交寄。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code;资金处理中不代表已完成
content:
application/json:
schema:
$ref: '#/components/schemas/TransportResponse'
'400':
description: 字段、来源或数量不合法
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、重复发运或节点尚未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Estimate'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/labels/apply:
post:
summary: 逐箱登记真实贴单
description: 权限 platform:overseas-business:purchase:apply-label。仅海外段;可以分次贴单,不能重复记录相同版本相同箱。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code;资金处理中不代表已完成
content:
application/json:
schema:
$ref: '#/components/schemas/TransportResponse'
'400':
description: 字段、来源或数量不合法
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、重复发运或节点尚未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ApplyLabels'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/domestic-repack:
post:
summary: 国内原箱一对一换包装
description: 权限 platform:overseas-business:purchase:receive-domestic。不改变来源及件数,不拆箱合箱;使旧国内面单失效,并要求重新核对国内费用。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code;资金处理中不代表已完成
content:
application/json:
schema:
$ref: '#/components/schemas/TransportResponse'
'400':
description: 字段、来源或数量不合法
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、重复发运或节点尚未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Repack'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/overseas-shipment:
post:
summary: 确认整批海外实际交寄
description: 权限 platform:overseas-business:purchase:ship-overseas。leg固定OVERSEAS;全部箱、当前面单、逐箱贴单、样品实扣关联、唯一有效预估均须通过。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code;资金处理中不代表已完成
content:
application/json:
schema:
$ref: '#/components/schemas/TransportResponse'
'400':
description: 字段、来源或数量不合法
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、重复发运或节点尚未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Ship'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/customer-shipment:
post:
summary: 确认整批国内寄客户
description: 权限 platform:overseas-business:purchase:ship-customer。leg固定DOMESTIC;核费及全部资金完成才可交寄。每单每段最多一次,重复不同请求不能再发货。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code;资金处理中不代表已完成
content:
application/json:
schema:
$ref: '#/components/schemas/TransportResponse'
'400':
description: 字段、来源或数量不合法
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、重复发运或节点尚未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Ship'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/files/{category}:
post:
summary: 上传采购内部附件
description: 按类别独立授权:PURCHASE=buy;BUDGET=review;LABEL=label;EXCEPTION=manage;RECEIPT=receive-overseas或receive-domestic;VOUCHER=charge或finance-adjust。新增四类只允许PDF/JPG/PNG,最大10MiB。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: category
in: path
required: true
schema:
type: string
enum:
- RECEIPT
- VOUCHER
- LABEL
- PURCHASE
- BUDGET
- EXCEPTION
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- file
properties:
file:
type: string
format: binary
responses:
'200':
description: 本单附件元数据业务响应
'403':
description: 主体或类别权限不足
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/files/{fileId}/content:
get:
summary: 读取本采购单内部文件
description: 权限 platform:overseas-business:purchase:list;校验客户、订单、分类与文件归属。附件下载,Cache-Control no-store。客户入口不开放这些内部文件。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: fileId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 文件内容
content:
application/octet-stream:
schema:
type: string
format: binary
'400':
description: 文件不属于本单
'403':
description: 无平台采购只读权限
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/charges:
get:
summary: 读取核费与资金处理结果
description: 权限 platform:overseas-business:purchase:list。仅平台使用,内部费用及诊断字段不得直接透传客户。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ChargesResponse'
'400':
description: 参数或本单费用归属错误
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、原请求未决或节点未满足
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/fee-corrections:
get:
summary: 读取费用链更正历史
description: 权限 platform:overseas-business:purchase:list。不可变目标、原汇率、确认时净额及产生的逐笔差额或退款业务号。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/FeeCorrectionsResponse'
'400':
description: 参数或本单费用归属错误
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、原请求未决或节点未满足
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/charges/confirm:
post:
summary: 确认国内整单费用
description: 权限 platform:overseas-business:purchase:charge。须国内实收完成。三项固定费用明确核定,其他不适用不产生虚构收费行;重核引用原feeId不再次扣款,不可省略已有有效实际费用。确认不等于资金成功。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ChargesResponse'
'400':
description: 参数或本单费用归属错误
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、原请求未决或节点未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfirmCharges'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/fees/{feeId}/retry:
post:
summary: 重试已明确失败的费用请求
description: 样品货款要求buy,预估要求estimate,实际国际运费/关税/国内运费/其他要求charge,调整/退款要求finance-adjust;未知结果拒绝新请求,已冻结仅重试结算。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: feeId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ChargesResponse'
'400':
description: 参数或本单费用归属错误
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、原请求未决或节点未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Command'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/fees/{feeId}/terminate:
post:
summary: 终止明确失败的费用版本
description: 权限 platform:overseas-business:purchase:finance-adjust。终止旧版本重试资格;有效冻结必须释放成功后才可替代,重新核对整单费用。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: feeId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ChargesResponse'
'400':
description: 参数或本单费用归属错误
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、原请求未决或节点未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Command'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/fees/{feeId}/correct-target:
post:
summary: 按正确原币总额更正费用链
description: 权限 platform:overseas-business:purchase:finance-adjust。选择原实际费用根。沿用原汇率计算正确CNY总额,以成功原扣+成功差额-成功退款求净额;正差额新扣、负差额逐笔关联退款,未决旧调整阻断。CNY差额单自身汇率为1,目标原币汇率保留在更正快照,不因分差反推原币。已寄客户不回退履约。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: feeId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/FeeCorrectionResponse'
'400':
description: 参数或本单费用归属错误
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、原请求未决或节点未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CorrectFeeTarget'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/fees/additional:
post:
summary: 登记独立新发生费用
description: 权限 platform:overseas-business:purchase:finance-adjust。仅已发生购买订单;按新费用真实业务日冻结汇率,以独立费用号发起扣款,核定入口为 FINANCIAL。保留原费用;普通核费首次确认后只引用已有版本。未交寄订单需重新核费,已交寄事实不回退。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/FeeVersionResponse'
'400':
description: 参数或本单费用归属错误
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、原请求未决或节点未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdditionalFee'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/fees/{feeId}/replace-failed:
post:
summary: 重新核定已终止且未实扣的实际费用
description: 权限 platform:overseas-business:purchase:finance-adjust。仅允许最新原实际费用已明确失败、终止重试且有效冻结已释放后替代;拒绝已实扣、未决或已有后续版本。沿用原币、业务日和汇率快照,使用新资金业务身份;货款仍核验客户预算。以更正记录关联旧版本与新实际费用,零元不发起资金请求。原购买与履约事实不回退。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: feeId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/FeeCorrectionResponse'
'400':
description: 参数或本单费用归属错误
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、原请求未决或节点未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CorrectFeeTarget'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/fees/{feeId}/refund:
post:
summary: 关联原实扣退回客户钱包
description: 权限 platform:overseas-business:purchase:finance-adjust。amount为正额CNY。仅本单已结算消费可退;整链有未完成调整/退款时不接受新请求,重放原请求仍返回原退款。累计金额由Finance原子封顶,不走外部支付。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: feeId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 业务结果,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/FeeVersionResponse'
'400':
description: 参数或本单费用归属错误
'403':
description: 主体或动作权限不足
'409':
description: 版本冲突、原请求未决或节点未满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RefundFee'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/controls:
get:
summary: 读取异常、更正与剩余货物来源
description: 权限 platform:overseas-business:purchase:list。内部记录,剩余来源用于逐项填写最终去向。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 统一业务响应,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ControlResponse'
'400':
description: 来源、证据或数量不匹配
'403':
description: 无当前操作权限
'409':
description: 版本、实物或资金前置不满足
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/control-notes:
post:
summary: 追加事实更正说明或阻断异常
description: 权限 platform:overseas-business:purchase:manage。校验本单事实和EXCEPTION凭证;已交寄允许追加说明,不改原货物、运单或状态。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 统一业务响应,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ControlResponse'
'400':
description: 来源、证据或数量不匹配
'403':
description: 无当前操作权限
'409':
description: 版本、实物或资金前置不满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ControlNote'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/control-notes/{noteId}/resolve:
post:
summary: 有凭证解除采购阻断异常
description: 权限 platform:overseas-business:purchase:manage。不覆盖原说明,记录处理人和证据;不改变资金结果。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: noteId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 统一业务响应,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ControlResponse'
'400':
description: 来源、证据或数量不匹配
'403':
description: 无当前操作权限
'409':
description: 版本、实物或资金前置不满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ResolveControl'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/actual-warehouse/correct:
post:
summary: 受控更正实际收货仓
description: 权限 platform:overseas-business:purchase:manage。未有后续箱明细时更新有效实际仓并留原快照及原实收;已有后续实物或已结束时仅追加阻断说明,不重归属货物。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 统一业务响应,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ControlResponse'
'400':
description: 来源、证据或数量不匹配
'403':
description: 无当前操作权限
'409':
description: 版本、实物或资金前置不满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CorrectWarehouse'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/exception-close:
post:
summary: 实物资金收口后异常关闭
description: 权限 platform:overseas-business:purchase:manage。购买后逐来源核平剩余货物最终去向,并提供客户停止履约证据、财务结论及对客摘要。全部已知资金与费用来源处理结束且无阻断异常才可关闭;不退款、不生成退货或零数量发运。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 统一业务响应,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ControlResponse'
'400':
description: 来源、证据或数量不匹配
'403':
description: 无当前操作权限
'409':
description: 版本、实物或资金前置不满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ExceptionClose'
/api/platform/v1/last-leg/overseas-procurements/{orderNo}/fees/{feeId}/release-estimate:
post:
summary: 释放不再使用的预估冻结
description: 权限 platform:overseas-business:purchase:finance-adjust。只作用于本单有效预估;未决或已实际结算不允许释放。供异常处理使用,不能将实际消费当冻结释放。
parameters:
- name: orderNo
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
- name: customerId
in: query
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
- name: feeId
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]*$
responses:
'200':
description: 统一业务响应,须检查code
content:
application/json:
schema:
$ref: '#/components/schemas/ChargesResponse'
'400':
description: 来源、证据或数量不匹配
'403':
description: 无当前操作权限
'409':
description: 版本、实物或资金前置不满足
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Command'
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Command:
type: object
required:
- version
- idempotencyKey
- reason
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
Purchase:
allOf:
- $ref: '#/components/schemas/Command'
- type: object
required:
- productName
- quantity
- amount
- currency
- purchasedAt
- estimatedArrivalAt
- voucherFileId
properties:
productName:
type: string
minLength: 1
maxLength: 255
specification:
type: string
nullable: true
maxLength: 500
quantity:
type: integer
format: int64
minimum: 1
amount:
type: number
minimum: 0
multipleOf: 0.01
currency:
type: string
enum:
- CNY
- USD
purchasedAt:
type: string
format: date-time
description: 真实购买时间,不得在未来
estimatedArrivalAt:
type: string
format: date-time
voucherFileId:
type: string
description: 必须属于本订单的购买或费用凭证
Budget:
allOf:
- $ref: '#/components/schemas/Command'
- type: object
required:
- amount
- currency
- voucherFileId
properties:
amount:
type: number
minimum: 0
multipleOf: 0.01
description: 新授权货款总上限
currency:
type: string
enum:
- CNY
- USD
voucherFileId:
type: string
description: 本订单客户书面或聊天确认凭证
Warehouse:
allOf:
- $ref: '#/components/schemas/Command'
- type: object
required:
- warehouseId
properties:
warehouseId:
type: string
description: 国内权威目录的有效公共海外收货仓引用
Response:
type: object
properties:
code:
type: string
message:
type: string
data:
type: object
properties:
orderNo:
type: string
version:
type: integer
format: int64
status:
type: string
purchase:
type: object
properties:
recorded:
type: boolean
confirmed:
type: boolean
description: 货款已核定,不代表已扣款
issue:
type: string
nullable: true
feeNo:
type: string
nullable: true
walletStatus:
type: string
nullable: true
sourceLinked:
type: boolean
description: 已实扣费用成功入池关联或明确免费
Receipt:
allOf:
- $ref: '#/components/schemas/Command'
- type: object
required:
- leg
- receivedAt
properties:
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
warehouseId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
description: 海外段必填的实际公共收货仓,国内为空
sourceCartonId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
description: 国内段必填的本单原国际交寄箱,海外为空
goodQuantity:
type: integer
format: int64
minimum: 0
damagedQuantity:
type: integer
format: int64
minimum: 0
extraQuantity:
type: integer
format: int64
minimum: 0
receivedAt:
type: string
format: date-time
FinishReceipt:
allOf:
- $ref: '#/components/schemas/Command'
- type: object
required:
- leg
properties:
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
Disposition:
allOf:
- $ref: '#/components/schemas/Command'
- type: object
required:
- leg
- kind
- quantity
- decision
- voucherFileId
properties:
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
sourceCartonId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
receiptId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
kind:
type: string
enum:
- SHORTAGE
- DAMAGED
- EXTRA
quantity:
type: integer
format: int64
minimum: 1
decision:
type: string
enum:
- ACCEPT_SHORTAGE
- DISPOSE_DAMAGED
- RETURN_EXTRA
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
Source:
type: object
required:
- receiptId
- quantity
properties:
receiptId:
type: string
pattern: ^[1-9][0-9]*$
quantity:
type: integer
format: int64
minimum: 1
Carton:
type: object
required:
- cartonNo
- lengthCm
- widthCm
- heightCm
- grossWeightKg
- sources
properties:
cartonNo:
type: string
minLength: 1
maxLength: 64
lengthCm:
type: number
minimum: 0
exclusiveMinimum: true
multipleOf: 0.01
widthCm:
type: number
minimum: 0
exclusiveMinimum: true
multipleOf: 0.01
heightCm:
type: number
minimum: 0
exclusiveMinimum: true
multipleOf: 0.01
grossWeightKg:
type: number
minimum: 0
exclusiveMinimum: true
multipleOf: 0.001
sources:
type: array
minItems: 1
items:
$ref: '#/components/schemas/Source'
Packing:
allOf:
- $ref: '#/components/schemas/Command'
- type: object
required:
- cartons
properties:
cartons:
type: array
minItems: 1
items:
$ref: '#/components/schemas/Carton'
ConfirmPacking:
allOf:
- $ref: '#/components/schemas/Command'
- type: object
required:
- packingVersion
properties:
packingVersion:
type: integer
minimum: 1
Correction:
type: object
required:
- receipt
- voucherFileId
properties:
receipt:
$ref: '#/components/schemas/Receipt'
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
RevokeDisposition:
allOf:
- $ref: '#/components/schemas/Command'
- type: object
required:
- voucherFileId
properties:
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
PhysicalResponse:
type: object
properties:
code:
type: string
message:
type: string
data:
type: object
properties:
orderNo:
type: string
version:
type: integer
format: int64
minimum: 0
status:
type: string
packingVersion:
type: integer
nullable: true
packingStatus:
type: string
nullable: true
enum:
- DRAFT
- CONFIRMED
- SUPERSEDED
receipts:
type: array
items:
type: object
properties:
id:
type: string
pattern: ^[1-9][0-9]*$
receiptNo:
type: string
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
sourceCartonId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
goodQuantity:
type: integer
format: int64
minimum: 0
damagedQuantity:
type: integer
format: int64
minimum: 0
extraQuantity:
type: integer
format: int64
minimum: 0
receivedAt:
type: string
format: date-time
active:
type: boolean
dispositions:
type: array
description: 平台处置历史,active=0为已撤销记录;不直接对客输出内部依据
items:
type: object
cartons:
type: array
items:
allOf:
- $ref: '#/components/schemas/Carton'
- type: object
properties:
id:
type: string
pattern: ^[1-9][0-9]*$
quantity:
type: integer
format: int64
minimum: 1
PostalAddress:
type: object
required:
- name
- phone
- address
properties:
name:
type: string
minLength: 1
maxLength: 128
phone:
type: string
pattern: ^[+0-9 ()-]{5,64}$
address:
type: string
minLength: 1
maxLength: 1000
Label:
type: object
required:
- cartonId
- fileId
- page
- carrier
- trackingNo
properties:
cartonId:
type: string
pattern: ^[1-9][0-9]*$
fileId:
type: string
pattern: ^[1-9][0-9]*$
page:
type: integer
minimum: 1
carrier:
type: string
minLength: 1
maxLength: 128
trackingNo:
type: string
minLength: 1
maxLength: 128
Labels:
type: object
required:
- version
- idempotencyKey
- reason
- leg
- packingVersion
- receiver
- labels
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
packingVersion:
type: integer
minimum: 1
receiver:
$ref: '#/components/schemas/PostalAddress'
addressVoucherFileId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
labels:
type: array
minItems: 1
items:
$ref: '#/components/schemas/Label'
Estimate:
type: object
required:
- version
- idempotencyKey
- reason
- labelVersion
- amount
- businessDate
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
labelVersion:
type: integer
minimum: 1
amount:
type: number
minimum: 0
multipleOf: 0.01
businessDate:
type: string
format: date
ApplyLabels:
type: object
required:
- version
- idempotencyKey
- reason
- labelVersion
- cartonIds
- appliedAt
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
labelVersion:
type: integer
minimum: 1
cartonIds:
type: array
minItems: 1
items:
type: string
pattern: ^[1-9][0-9]*$
uniqueItems: true
appliedAt:
type: string
format: date-time
Ship:
type: object
required:
- version
- idempotencyKey
- reason
- leg
- labelVersion
- cartonIds
- shippedAt
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
labelVersion:
type: integer
minimum: 1
cartonIds:
type: array
minItems: 1
items:
type: string
pattern: ^[1-9][0-9]*$
uniqueItems: true
shippedAt:
type: string
format: date-time
Repack:
type: object
required:
- version
- idempotencyKey
- reason
- cartonId
- lengthCm
- widthCm
- heightCm
- grossWeightKg
- voucherFileId
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
cartonId:
type: string
pattern: ^[1-9][0-9]*$
lengthCm:
type: number
exclusiveMinimum: true
minimum: 0
multipleOf: 0.01
widthCm:
type: number
exclusiveMinimum: true
minimum: 0
multipleOf: 0.01
heightCm:
type: number
exclusiveMinimum: true
minimum: 0
multipleOf: 0.01
grossWeightKg:
type: number
exclusiveMinimum: true
minimum: 0
multipleOf: 0.001
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
LabelRow:
allOf:
- $ref: '#/components/schemas/Label'
- type: object
required:
- appliedAt
properties:
appliedAt:
type: string
format: date-time
nullable: true
LabelSet:
type: object
required:
- id
- version
- manifestId
- cargoHash
- sender
- receiver
- labels
properties:
id:
type: string
pattern: ^[1-9][0-9]*$
version:
type: integer
manifestId:
type: string
pattern: ^[1-9][0-9]*$
cargoHash:
type: string
sender:
$ref: '#/components/schemas/PostalAddress'
receiver:
$ref: '#/components/schemas/PostalAddress'
labels:
type: array
minItems: 1
items:
$ref: '#/components/schemas/LabelRow'
TransportCargo:
type: object
required: [cartonId, cartonNo, quantity, lengthCm, widthCm, heightCm, grossWeightKg, packagingRecordId, sources]
properties:
cartonId:
type: string
pattern: '^[1-9][0-9]*$'
cartonNo:
type: string
quantity:
type: integer
format: int64
minimum: 1
lengthCm:
type: number
minimum: 0
exclusiveMinimum: true
multipleOf: 0.01
widthCm:
type: number
minimum: 0
exclusiveMinimum: true
multipleOf: 0.01
heightCm:
type: number
minimum: 0
exclusiveMinimum: true
multipleOf: 0.01
grossWeightKg:
type: number
minimum: 0
exclusiveMinimum: true
multipleOf: 0.001
packagingRecordId:
type: string
nullable: true
sources:
type: array
items:
$ref: '#/components/schemas/Source'
TransportResponse:
type: object
required:
- code
- message
- data
properties:
code:
type: string
message:
type: string
data:
type: object
required:
- orderNo
- version
- status
- overseasLabels
- domesticLabels
- overseasCargo
- domesticCargo
- shipments
properties:
orderNo:
type: string
minLength: 1
maxLength: 64
version:
type: integer
format: int64
minimum: 0
status:
type: string
minLength: 1
maxLength: 128
overseasCargo:
type: array
items:
$ref: '#/components/schemas/TransportCargo'
domesticCargo:
type: array
description: 国内有效合格实收及最新一对一换包装箱规,不包含已处置的破损或多货
items:
$ref: '#/components/schemas/TransportCargo'
overseasLabels:
allOf:
- $ref: '#/components/schemas/LabelSet'
nullable: true
domesticLabels:
allOf:
- $ref: '#/components/schemas/LabelSet'
nullable: true
shipments:
type: array
items:
type: object
required:
- id
- shipmentNo
- leg
- shippedAt
properties:
id:
type: string
pattern: '^[1-9][0-9]*$'
shipmentNo:
type: string
minLength: 1
maxLength: 64
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
shippedAt:
type: string
format: date-time
ChargeAmount:
type: object
required:
- determination
- amount
- currency
- businessDate
- reason
properties:
determination:
type: string
enum:
- POSITIVE
- ZERO
- NOT_APPLICABLE
amount:
type: number
minimum: 0
multipleOf: 0.01
currency:
type: string
enum:
- CNY
- USD
businessDate:
type: string
format: date
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
reason:
type: string
minLength: 1
maxLength: 500
ChargeSelection:
type: object
properties:
feeId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
value:
allOf:
- $ref: '#/components/schemas/ChargeAmount'
nullable: true
description: feeId与value恰有一个。引用本单同用途有效费用用于重新核对,不产生新扣款;新核定用value,未知不能当零元。
oneOf:
- required:
- feeId
properties:
value:
type: object
nullable: true
enum:
- null
feeId:
type: string
pattern: ^[1-9][0-9]*$
- required:
- value
properties:
feeId:
type: string
nullable: true
enum:
- null
value:
$ref: '#/components/schemas/ChargeAmount'
OtherCharge:
type: object
required:
- code
- name
- selection
properties:
code:
type: string
pattern: ^[A-Z][A-Z0-9_]{0,31}$
name:
type: string
minLength: 1
maxLength: 128
selection:
$ref: '#/components/schemas/ChargeSelection'
ConfirmCharges:
type: object
required:
- version
- idempotencyKey
- reason
- internationalFreight
- duty
- domesticFreight
- otherDetermination
- otherFees
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
internationalFreight:
$ref: '#/components/schemas/ChargeSelection'
duty:
$ref: '#/components/schemas/ChargeSelection'
domesticFreight:
$ref: '#/components/schemas/ChargeSelection'
otherDetermination:
type: string
enum:
- NOT_APPLICABLE
- ITEMIZED
otherFees:
type: array
items:
$ref: '#/components/schemas/OtherCharge'
AdditionalFee:
type: object
additionalProperties: false
required: [version, idempotencyKey, name, amount, currency, businessDate, voucherFileId, reason]
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
name:
type: string
minLength: 1
maxLength: 128
amount:
type: number
minimum: 0
exclusiveMinimum: true
multipleOf: 0.01
description: 正额原币金额,原币及折算 CNY 均须在费用来源容量内(最多14位整数)。
currency:
type: string
enum: [CNY, USD]
businessDate:
type: string
format: date
description: 已发生费用的实际业务日期,不允许未来日期。
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
reason:
type: string
minLength: 1
maxLength: 500
CorrectFeeTarget:
type: object
required:
- version
- idempotencyKey
- reason
- targetOriginalAmount
- voucherFileId
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 500
targetOriginalAmount:
type: number
minimum: 0
multipleOf: 0.01
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
RefundFee:
type: object
required:
- version
- idempotencyKey
- reason
- amount
- voucherFileId
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 500
amount:
type: number
minimum: 0
multipleOf: 0.01
exclusiveMinimum: true
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
ProcurementFeeVersion:
type: object
required:
- id
- feeNo
- purpose
- amount
- walletStatus
properties:
id:
type: string
pattern: ^[1-9][0-9]*$
feeNo:
type: string
minLength: 1
maxLength: 64
purpose:
type: string
enum:
- SAMPLE_PAYMENT
- INTERNATIONAL_ESTIMATE
- INTERNATIONAL_FREIGHT
- DUTY
- DOMESTIC_FREIGHT
- OTHER
- ADJUSTMENT
- REFUND
confirmationOrigin:
type: string
enum: [BUSINESS, FINANCIAL]
description: 核定入口决定重试权限;客户响应不包含此字段。
feeVersion:
type: integer
active:
type: boolean
determination:
type: string
feeItemCode:
type: string
minLength: 1
maxLength: 64
feeItemName:
type: string
minLength: 1
maxLength: 128
amount:
type: number
minimum: 0
multipleOf: 0.01
currency:
type: string
enum:
- CNY
originalCurrency:
type: string
enum:
- CNY
- USD
originalAmount:
type: number
minimum: 0
multipleOf: 0.01
exchangeRate:
type: number
exchangeRateMonth:
type: string
businessDate:
type: string
format: date
parentFeeId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
walletStatus:
type: string
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
remark:
type: string
nullable: true
ChargesSnapshot:
type: object
required:
- orderNo
- version
- status
- confirmedAt
- fees
properties:
orderNo:
type: string
minLength: 1
maxLength: 64
version:
type: integer
format: int64
minimum: 0
status:
type: string
minLength: 1
maxLength: 128
confirmedAt:
type: string
format: date-time
nullable: true
fees:
type: array
items:
type: object
required:
- detail
- sourceLinked
properties:
detail:
$ref: '#/components/schemas/ProcurementFeeVersion'
sourceLinked:
type: boolean
FeeCorrectionResult:
type: object
required:
- correctionNo
- rootFeeNo
- targetOriginalAmount
- originalCurrency
- exchangeRate
- exchangeRateMonth
- targetAmount
- previousNetAmount
- differenceAmount
- feeNos
properties:
correctionNo:
type: string
minLength: 1
maxLength: 64
rootFeeNo:
type: string
minLength: 1
maxLength: 64
targetOriginalAmount:
type: number
minimum: 0
multipleOf: 0.01
originalCurrency:
type: string
exchangeRate:
type: number
exchangeRateMonth:
type: string
targetAmount:
type: number
minimum: 0
multipleOf: 0.01
previousNetAmount:
type: number
minimum: 0
multipleOf: 0.01
differenceAmount:
type: number
multipleOf: 0.01
feeNos:
type: array
items:
type: string
minLength: 1
maxLength: 64
ChargesResponse:
type: object
required:
- code
- message
- data
properties:
code:
type: string
message:
type: string
data:
$ref: '#/components/schemas/ChargesSnapshot'
FeeCorrectionResponse:
type: object
required:
- code
- message
- data
properties:
code:
type: string
message:
type: string
data:
$ref: '#/components/schemas/FeeCorrectionResult'
FeeCorrectionsResponse:
type: object
required:
- code
- message
- data
properties:
code:
type: string
message:
type: string
data:
type: array
items:
$ref: '#/components/schemas/FeeCorrectionResult'
FeeVersionResponse:
type: object
required:
- code
- message
- data
properties:
code:
type: string
message:
type: string
data:
$ref: '#/components/schemas/ProcurementFeeVersion'
ControlNote:
type: object
required:
- version
- idempotencyKey
- reason
- targetType
- blocking
- voucherFileId
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
targetType:
type: string
enum:
- PURCHASE
- WAREHOUSE
- RECEIPT
- SHIPMENT
targetId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
blocking:
type: boolean
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
clientSummary:
type: string
minLength: 1
maxLength: 500
nullable: true
ResolveControl:
type: object
required:
- version
- idempotencyKey
- reason
- voucherFileId
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
CorrectWarehouse:
type: object
required:
- version
- idempotencyKey
- reason
- warehouseId
- voucherFileId
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
warehouseId:
type: string
pattern: ^[1-9][0-9]*$
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
CloseResolution:
type: object
required:
- kind
- quantity
- decision
- destination
- voucherFileId
properties:
kind:
type: string
enum:
- PURCHASE_REMAINDER
- TRANSIT_REMAINDER
- GOOD
- DAMAGED
- EXTRA
sourceId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
quantity:
type: integer
format: int64
minimum: 1
decision:
type: string
enum:
- SUPPLIER_RETAINED
- RETURNED_TO_SUPPLIER
- RETURNED_TO_SENDER
- LOSS_CONFIRMED
- CUSTOMER_AUTHORIZED_RETENTION
- DISPOSED
destination:
type: string
minLength: 1
maxLength: 500
voucherFileId:
type: string
pattern: ^[1-9][0-9]*$
ExceptionClose:
type: object
required:
- version
- idempotencyKey
- reason
- resolutions
- customerVoucherFileId
- financialConclusion
- clientSummary
properties:
version:
type: integer
format: int64
minimum: 0
idempotencyKey:
type: string
minLength: 1
maxLength: 128
reason:
type: string
minLength: 1
maxLength: 1000
resolutions:
type: array
items:
$ref: '#/components/schemas/CloseResolution'
customerVoucherFileId:
type: string
pattern: ^[1-9][0-9]*$
financialConclusion:
type: string
minLength: 1
maxLength: 1000
clientSummary:
type: string
minLength: 1
maxLength: 500
ControlRemaining:
type: object
required:
- kind
- sourceId
- businessNo
- quantity
properties:
kind:
type: string
enum:
- PURCHASE_REMAINDER
- TRANSIT_REMAINDER
- GOOD
- DAMAGED
- EXTRA
sourceId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
businessNo:
type: string
minLength: 1
maxLength: 64
quantity:
type: integer
format: int64
minimum: 1
ControlSnapshot:
type: object
required:
- orderNo
- version
- status
- notes
- remaining
- closures
- closureItems
properties:
orderNo:
type: string
minLength: 1
maxLength: 64
version:
type: integer
format: int64
minimum: 0
status:
type: string
minLength: 1
maxLength: 128
notes:
type: array
items:
type: object
description: 平台内部更正事实,含原始凭证和处理说明;字段为表结构snake_case,不对客透传
remaining:
type: array
items:
$ref: '#/components/schemas/ControlRemaining'
closures:
type: array
items:
type: object
closureItems:
type: array
items:
type: object
ControlResponse:
type: object
required:
- code
- message
- data
properties:
code:
type: string
message:
type: string
data:
$ref: '#/components/schemas/ControlSnapshot'
ProcurementHeader:
type: object
required:
- id
- orderNo
- productName
- purchaseQuantity
- status
- version
properties:
2026-10-26 13:41:43 +08:00
procurementDirection:
$ref: 'overseas-business-v1.yaml#/components/schemas/ProcurementDirection'
orderNo:
type: string
nullable: true
customerId:
type: string
nullable: true
customerName:
type: string
nullable: true
purchaseCategory:
type: string
nullable: true
productName:
type: string
nullable: true
productSpecification:
type: string
nullable: true
productUrl:
type: string
nullable: true
currency:
type: string
nullable: true
receivingAddress:
type: string
nullable: true
contactName:
type: string
nullable: true
contactPhone:
type: string
nullable: true
plannedWarehouseName:
type: string
nullable: true
actualWarehouseCode:
type: string
nullable: true
actualWarehouseName:
type: string
nullable: true
status:
type: string
nullable: true
id:
type: string
pattern: ^[1-9][0-9]*$
purchaseQuantity:
type: integer
format: int64
budgetUnitPrice:
type: number
nullable: true
version:
type: integer
format: int64
minimum: 0
estimatedArrivalAt:
type: string
format: date-time
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
ProcurementBudget:
type: object
required:
- totalAmount
- currency
- authorizedAt
properties:
totalAmount:
type: number
nullable: true
currency:
type: string
authorizedAt:
type: string
format: date-time
nullable: true
ProcurementProgress:
type: object
required:
- key
- title
- completedAt
properties:
key:
type: string
minLength: 1
maxLength: 128
title:
type: string
minLength: 1
maxLength: 128
completedAt:
type: string
format: date-time
nullable: true
CustomerBox:
type: object
required:
- cartonNo
- quantity
- lengthCm
- widthCm
- heightCm
- grossWeightKg
properties:
cartonNo:
type: string
minLength: 1
maxLength: 64
quantity:
type: integer
format: int64
lengthCm:
type: number
widthCm:
type: number
heightCm:
type: number
grossWeightKg:
type: number
CustomerShipment:
type: object
required:
- shipmentNo
- leg
- shippedAt
- cartonNo
- quantity
- carrier
- trackingNo
properties:
shipmentNo:
type: string
minLength: 1
maxLength: 64
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
shippedAt:
type: string
format: date-time
cartonNo:
type: string
minLength: 1
maxLength: 64
quantity:
type: integer
format: int64
carrier:
type: string
minLength: 1
maxLength: 128
trackingNo:
type: string
minLength: 1
maxLength: 128
CustomerFee:
type: object
required:
- feeNo
- purpose
- name
- determination
- currency
- originalCurrency
- exchangeRateMonth
- parentFeeNo
- walletStatus
- version
- active
- amount
- originalAmount
- exchangeRate
- businessDate
- sourceLinked
properties:
feeNo:
type: string
nullable: true
purpose:
type: string
nullable: true
name:
type: string
nullable: true
determination:
type: string
nullable: true
currency:
type: string
nullable: true
originalCurrency:
type: string
nullable: true
exchangeRateMonth:
type: string
nullable: true
parentFeeNo:
type: string
nullable: true
walletStatus:
type: string
nullable: true
version:
type: integer
nullable: true
active:
type: boolean
amount:
type: number
originalAmount:
type: number
nullable: true
exchangeRate:
type: number
nullable: true
businessDate:
type: string
format: date
nullable: true
sourceLinked:
type: boolean
additionalProperties: false
description: 客户费用白名单:不含凭证、备注、资金命令/冻结/流水引用和原始诊断
ProcurementCustomerView:
type: object
required:
- order
- budget
- purchased
- purchaseConfirmed
- purchaseNeedsAttention
- progress
- boxes
- shipments
- fees
- exceptionSummaries
properties:
order:
$ref: '#/components/schemas/ProcurementHeader'
budget:
$ref: '#/components/schemas/ProcurementBudget'
purchased:
type: boolean
purchaseConfirmed:
type: boolean
purchaseNeedsAttention:
type: boolean
progress:
type: array
items:
$ref: '#/components/schemas/ProcurementProgress'
boxes:
type: array
items:
$ref: '#/components/schemas/CustomerBox'
shipments:
type: array
items:
$ref: '#/components/schemas/CustomerShipment'
fees:
type: array
items:
$ref: '#/components/schemas/CustomerFee'
exceptionSummaries:
type: array
items:
type: string
additionalProperties: false
description: 客户仅获取此独立投影;boxes只包含已确认海外清单。内部采购异常只提供需要处理标记,异常摘要来自人工明确填写的对客字段。
ProcurementAction:
type: object
required:
- key
- label
- permission
- allowed
- reason
properties:
key:
type: string
minLength: 1
maxLength: 128
label:
type: string
minLength: 1
maxLength: 128
permission:
type: string
minLength: 1
maxLength: 128
allowed:
type: boolean
reason:
type: string
nullable: true
ProcurementPlatformView:
type: object
required:
- customerView
- purchaseFacts
- physical
- transport
- fees
- feeCorrections
- controls
- files
- reviewHistory
- operations
- actions
- internalRemark
properties:
customerView:
$ref: '#/components/schemas/ProcurementCustomerView'
purchaseFacts:
type: object
description: 平台内部履约事实,字段snake_case
physical:
type: object
properties:
orderNo:
type: string
version:
type: integer
format: int64
minimum: 0
status:
type: string
packingVersion:
type: integer
nullable: true
packingStatus:
type: string
nullable: true
enum:
- DRAFT
- CONFIRMED
- SUPERSEDED
receipts:
type: array
items:
type: object
properties:
id:
type: string
pattern: ^[1-9][0-9]*$
receiptNo:
type: string
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
sourceCartonId:
type: string
pattern: ^[1-9][0-9]*$
nullable: true
goodQuantity:
type: integer
format: int64
minimum: 0
damagedQuantity:
type: integer
format: int64
minimum: 0
extraQuantity:
type: integer
format: int64
minimum: 0
receivedAt:
type: string
format: date-time
active:
type: boolean
dispositions:
type: array
description: 平台处置历史,active=0为已撤销记录;不直接对客输出内部依据
items:
type: object
cartons:
type: array
items:
allOf:
- $ref: '#/components/schemas/Carton'
- type: object
properties:
id:
type: string
pattern: ^[1-9][0-9]*$
quantity:
type: integer
format: int64
minimum: 1
transport:
type: object
required:
- orderNo
- version
- status
- overseasLabels
- domesticLabels
- overseasCargo
- domesticCargo
- shipments
properties:
orderNo:
type: string
minLength: 1
maxLength: 64
version:
type: integer
format: int64
minimum: 0
status:
type: string
minLength: 1
maxLength: 128
overseasCargo:
type: array
items:
$ref: '#/components/schemas/TransportCargo'
domesticCargo:
type: array
description: 国内有效合格实收及最新一对一换包装箱规,不包含已处置的破损或多货
items:
$ref: '#/components/schemas/TransportCargo'
overseasLabels:
allOf:
- $ref: '#/components/schemas/LabelSet'
nullable: true
domesticLabels:
allOf:
- $ref: '#/components/schemas/LabelSet'
nullable: true
shipments:
type: array
items:
type: object
required:
- id
- shipmentNo
- leg
- shippedAt
properties:
id:
type: string
pattern: '^[1-9][0-9]*$'
shipmentNo:
type: string
minLength: 1
maxLength: 64
leg:
type: string
enum:
- OVERSEAS
- DOMESTIC
shippedAt:
type: string
format: date-time
fees:
type: array
items:
$ref: '#/components/schemas/ProcurementFeeVersion'
feeCorrections:
type: array
items:
$ref: '#/components/schemas/FeeCorrectionResult'
controls:
$ref: '#/components/schemas/ControlSnapshot'
files:
type: array
items:
type: object
reviewHistory:
type: array
items:
type: object
operations:
type: array
items:
type: object
actions:
type: array
items:
$ref: '#/components/schemas/ProcurementAction'
internalRemark:
type: string
nullable: true
ProcurementCustomerResponse:
type: object
required:
- code
- message
- data
properties:
code:
type: string
message:
type: string
data:
$ref: '#/components/schemas/ProcurementCustomerView'
ProcurementPlatformResponse:
type: object
required:
- code
- message
- data
properties:
code:
type: string
message:
type: string
data:
$ref: '#/components/schemas/ProcurementPlatformView'