优化
This commit is contained in:
@@ -2,7 +2,7 @@ openapi: 3.0.3
|
||||
info:
|
||||
title: 柏悦头程订单 API
|
||||
description: 业务成功和失败均使用 HTTP 200;仅响应体 code 为字符串 "200" 时表示成功,其他 code 表示失败。
|
||||
version: 1.6.0
|
||||
version: 1.7.0
|
||||
security:
|
||||
- bearerAuth: []
|
||||
paths:
|
||||
@@ -21,6 +21,21 @@ paths:
|
||||
code: {type: string, example: '200'}
|
||||
data: {$ref: '#/components/schemas/InboundCodePolicy'}
|
||||
'403': {description: 需要平台订单列表、创建、编辑或提交权限之一}
|
||||
/api/platform/v1/orders/first-leg/inbound-code-associations/{inboundCode}:
|
||||
get:
|
||||
summary: 平台按全局入仓码查询订单基础关联
|
||||
description: >-
|
||||
需要 platform:order:list。入仓码和订单业务号是主要展示键;Long ID 均以字符串返回,
|
||||
只供页面路由和后续接口关联。查询直接使用 Order 全局唯一入仓码事实,不跨库读取 Firstleg。
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/InboundCodePath'
|
||||
responses:
|
||||
'200':
|
||||
description: 查询成功或业务失败,按响应体 code 判断
|
||||
content:
|
||||
application/json:
|
||||
schema: {$ref: '#/components/schemas/InboundCodeAssociationEnvelope'}
|
||||
'403': {description: 需要平台身份和 platform:order:list 权限}
|
||||
/api/platform/v1/orders:
|
||||
get:
|
||||
summary: 平台统一订单列表
|
||||
@@ -187,6 +202,21 @@ paths:
|
||||
schema: {$ref: '#/components/schemas/FirstLegOrderDraft'}
|
||||
responses:
|
||||
'200': {description: 成功或业务失败,按响应体 code 判断}
|
||||
/api/merchant/v1/orders/first-leg/inbound-code-associations/{inboundCode}:
|
||||
get:
|
||||
summary: 客户按入仓码查询本客户订单基础关联
|
||||
description: >-
|
||||
需要 merchant:order:list。客户范围仅取登录态,不接受客户 ID 参数;其他客户的入仓码统一按不存在处理。
|
||||
入仓码和订单业务号是主要展示键,Long ID 只供路由关联。
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/InboundCodePath'
|
||||
responses:
|
||||
'200':
|
||||
description: 查询成功、不存在或其他业务失败,按响应体 code 判断
|
||||
content:
|
||||
application/json:
|
||||
schema: {$ref: '#/components/schemas/InboundCodeAssociationEnvelope'}
|
||||
'403': {description: 需要客户身份和 merchant:order:list 权限}
|
||||
/api/merchant/v1/orders/first-leg/batch:
|
||||
post:
|
||||
summary: 批量创建头程订单草稿
|
||||
@@ -671,6 +701,27 @@ components:
|
||||
properties:
|
||||
mode: {type: string, enum: [AUTO, LEGACY_MANUAL]}
|
||||
manualEntryRequired: {type: boolean}
|
||||
InboundCodeAssociationEnvelope:
|
||||
type: object
|
||||
properties:
|
||||
code: {type: string, example: '200'}
|
||||
message: {type: string}
|
||||
data: {$ref: '#/components/schemas/InboundCodeAssociationSummary'}
|
||||
InboundCodeAssociationSummary:
|
||||
type: object
|
||||
required: [inboundCode, orderNo, orderStatus, orderId, customerId, customerName, destinationType]
|
||||
properties:
|
||||
inboundCode: {type: string, maxLength: 40, pattern: '^[A-Za-z0-9._:-]+$', description: 主要展示键:全局唯一入仓码}
|
||||
orderNo: {type: string, description: 主要展示键:订单业务号}
|
||||
orderStatus: {type: string, description: Order 权威交易状态}
|
||||
orderId: {type: string, pattern: '^[1-9][0-9]*$', description: 内部 ID,仅供路由关联}
|
||||
customerId: {type: string, pattern: '^[1-9][0-9]*$', description: 客户 ID,字符串避免精度损失}
|
||||
customerName: {type: string}
|
||||
destinationType: {type: string}
|
||||
destinationCountryCode: {type: string, nullable: true}
|
||||
destinationWarehouseId: {type: string, pattern: '^[1-9][0-9]*$', nullable: true, description: 内部 ID,仅供路由关联}
|
||||
destinationWarehouseCode: {type: string, nullable: true, description: 目的仓业务编码;FBA 场景为 Amazon 仓码}
|
||||
destinationWarehouseName: {type: string, nullable: true}
|
||||
FirstLegBatchDraftItem:
|
||||
type: object
|
||||
required: [clientRowId, draft]
|
||||
@@ -778,6 +829,12 @@ components:
|
||||
packageCount: {type: integer}
|
||||
loadingPlanId: {type: string}
|
||||
parameters:
|
||||
InboundCodePath:
|
||||
name: inboundCode
|
||||
in: path
|
||||
required: true
|
||||
schema: {type: string, minLength: 1, maxLength: 40, pattern: '^[A-Za-z0-9._:-]+$'}
|
||||
description: 全局唯一业务入仓码
|
||||
InternalToken:
|
||||
name: X-Internal-Service-Token
|
||||
in: header
|
||||
|
||||
Reference in New Issue
Block a user