openapi: 3.0.3 info: contact: email: api-support@jmalltech.com name: GWMS API 团队 url: https://jmalltech.com description: | GWMS(仓库管理系统)的官方公开API。 它为ERP、电子商务平台和TMS等外部系统提供了一个标准化、健壮且易于集成的接口,以便与WMS功能进行交互。 ## 认证机制 本API采用基于JWT的Bearer令牌认证,结合三重凭证验证机制: 1. **客户端凭证(Client Credentials)**:由系统管理员为上游系统生成的clientId和clientSecret 2. **API密钥(API Key)**:由仓库用户生成,关联到特定仓库和权限范围 3. **访问令牌(Access Token)**:通过认证端点获取的JWT令牌,用于API访问 ## 快速开始 1. **获取凭证**:联系系统管理员获取clientId和clientSecret,联系仓库用户获取apiKey 2. **获取令牌**:调用 `POST /auth-api/token` 端点获取访问令牌 3. **调用API**:在请求头中添加 `Authorization: Bearer {access_token}` 调用其他API ## 认证头部格式 所有API请求(除了认证端点)必须包含以下HTTP头部: ``` Authorization: Bearer {access_token} ``` 其中`{access_token}`是从认证端点获取的JWT令牌。缺少此头部或令牌无效将导致401错误。 ## 权限范围 API访问权限基于以下范围进行控制: | 权限范围 | 描述 | 适用API | 示例操作 | |---------|------|---------|---------| | `product:read` | 产品数据读取权限 | `/api/v1/products/*` | 查询产品列表、获取产品详情 | | `product:write` | 产品数据写入权限 | `/api/v1/products/*` | 创建产品、更新产品信息 | | `warehouse:read` | 仓库数据读取权限 | `/api/v1/warehouses/*` | 查询仓库列表、获取仓库详情 | | `warehouse:write` | 仓库数据写入权限 | `/api/v1/warehouses/*` | 创建仓库、更新仓库信息 | | `stock:read` | 库存数据读取权限 | `/api/v1/stock/*` | 查询库存数量、库存明细 | | `stock:write` | 库存数据写入权限 | `/api/v1/stock/*` | 库存调整、库存转移 | | `inbound:read` | 入库单读取权限 | `/api/v1/inbound/*` | 查询入库单列表、获取入库单详情 | | `inbound:write` | 入库单写入权限 | `/api/v1/inbound/*` | 创建入库单、更新入库单 | | `outbound:read` | 出库单读取权限 | `/api/v1/outbound/*` | 查询出库单列表、获取出库单详情 | | `outbound:write` | 出库单写入权限 | `/api/v1/outbound/*` | 创建出库单、更新出库单 | | `express:read` | 物流渠道读取权限 | `/api/v1/expressChannel/*` | 查询物流渠道列表 | | `express:write` | 物流渠道写入权限 | `/api/v1/expressChannel/*` | 创建物流渠道、更新物流渠道 | ## 错误响应 认证失败时,API将返回以下错误响应: - **401 Unauthorized**:令牌无效、过期或缺失 - **403 Forbidden**:令牌有效但权限不足 - **429 Too Many Requests**:超过访问频率限制 详细的错误响应格式请参考错误响应部分。 title: GWMS Public API version: 1.0.3 servers: - description: 生产服务器 url: https://gwms.jmalltech.com/api-gateway - description: 沙箱服务器 url: https://api.sandbox.gwms.jmalltech.com - description: 本地API服务器 url: http://localhost:8080 - description: 本地认证服务器 url: http://localhost:9000 security: - BearerAuth: [] tags: - description: 用于获取访问令牌的认证API,支持基于客户端凭证和API密钥的三重认证机制。 name: 认证 - description: 用于管理产品主数据的API,这是所有仓库操作的基础。 name: 主数据 - 产品 - description: 用于管理仓库主数据的API,包括仓库、库区、库位信息。 name: 主数据 - 仓库 - description: 用于库存主数据的API,包含库存查询等。 name: 主数据 - 库存 - description: 用于管理入库单的API,支持创建、查询、更新和状态管理。 name: 入库单 - description: 用于管理业务流水的API name: Charge paths: /auth-api/token: post: description: | 使用客户端凭证(clientId + clientSecret)和API密钥获取JWT访问令牌。 ## 认证流程详解 ### 1. 准备阶段 - **系统管理员**:为上游系统生成clientId和clientSecret - **仓库用户**:生成apiKey,关联到特定仓库和权限范围 - **上游系统**:获取并安全存储这三个凭证 ### 2. 令牌获取 ```bash curl -X POST https://gwms.jmalltech.com/api-gateway/auth-api/token \ -H "Content-Type: application/json" \ -d '{ "clientId": "EOUSSQNWMRVX15GA", "clientSecret": "tiy3dbyW8l5W06sFQwsjOIU8-xTLbRJJVtxreGlka8Y=", "apiKey": "8MO5994KEQMEZMAN" }' ``` ### 3. API访问 ```bash curl -H "Authorization: Bearer {access_token}" \ https://gwms.jmalltech.com/api/v1/products ``` ## 安全最佳实践 - **clientSecret安全**:只在生成时显示一次,请妥善保存在安全的配置管理系统中 - **令牌管理**:访问令牌有效期为1小时,建议在过期前5分钟重新获取 - **权限最小化**:apiKey应只包含业务所需的最小权限范围 - **网络安全**:生产环境必须使用HTTPS传输 - **日志安全**:不要在日志中记录完整的凭证信息 ## 错误处理 - **400 Bad Request**:请求参数缺失或格式错误 - **401 Unauthorized**:凭证无效、过期或被禁用 - **429 Too Many Requests**:请求频率超出限制 - **500 Internal Server Error**:服务器内部错误 ## 权限范围说明 令牌的权限范围由apiKey关联的仓库用户权限决定: | 权限范围 | 说明 | 示例操作 | |---------|------|---------| | `product:read` | 产品数据读取 | 查询产品列表、获取产品详情 | | `product:write` | 产品数据写入 | 创建、更新、删除产品 | | `warehouse:read` | 仓库数据读取 | 查询仓库、库区、库位信息 | | `warehouse:write` | 仓库数据写入 | 创建、更新仓库配置 | | `stock:read` | 库存数据读取 | 查询库存数量、库存明细 | | `stock:write` | 库存数据写入 | 库存调整、库存转移 | | `inbound:read` | 入库单读取 | 查询入库单列表、获取入库单详情 | | `inbound:write` | 入库单写入 | 创建、更新、取消入库单 | | `outbound:read` | 出库单读取 | 查询出库单列表、获取出库单详情 | | `outbound:write` | 出库单写入 | 创建、更新、取消出库单 | operationId: getAccessToken requestBody: content: application/json: examples: standard_request: description: 使用有效的客户端凭证和API密钥获取访问令牌 summary: 标准认证请求 value: clientId: EOUSSQNWMRVX15GA clientSecret: tiy3dbyW8l5W06sFQwsjOIU8-xTLbRJJVtxreGlka8Y= apiKey: 8MO5994KEQMEZMAN minimal_scope_request: description: 只包含读取权限的API密钥认证请求 summary: 最小权限请求 value: clientId: READONLY123456789012345678901234 clientSecret: abcdefghijklmnopqrstuvwxyz1234567890ABCDEF= apiKey: READONLY12345678901234567890123 schema: $ref: '#/components/schemas/TokenRequest' required: true responses: "200": content: application/json: examples: default_response: description: 一个标准的成功认证响应示例 summary: 默认成功响应 value: access_token: eyJraWQiOiI3ZTUxOWIwOS01ZWQ0LTRhZTctYjk4NS1lYWRlNjM0N2IzZDkiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxOTI3OTgyMzMzNjI4MzcwOTQ1IiwiYXVkIjoiRU9VU1NRTldNUlZYMTVHQSIsInVzZXJfaWQiOiIxOTI3OTgyMzMzNjI4MzcwOTQ1IiwiYXBpX2tleSI6IjhNTzU5OTRLRVFNRVpNQU4iLCJzeXN0ZW1faWQiOiJnd21zLWRldiIsInZlbmRvciI6InRlc3RfdmViZG9yIiwic2NvcGUiOiJpbnZlbnRvcnk6cmVhZCBvcmRlcjpyZWFkIGFwaTpyZWFkIHdhcmVob3VzZTpyZWFkIiwiaXNzIjoiaHR0cHM6Ly9nd21zLmptYWxsdGVjaC5jb20vYXBpLWdhdGV3YXkvYXV0aC1hcGkiLCJleHAiOjE3NTMzNTQ4NzYsImlhdCI6MTc1MzM1MTI3NiwiY2xpZW50X2lkIjoiRU9VU1NRTldNUlZYMTVHQSJ9.lOIqdQdGEkAM8kX93sPYISHKqNuQZQnTwMoJIkOkBFRsCCyarMthOp5akFqyuI15c3odEpdgXWWpB6gN5Zk_ikU1OViG1mDMSvlTcoFkm6b65ocF_j6PXb8YxfdVRobcQPjN22lfy8XoB1DCLbmSQGptYdfmjRWflKw23fMoCJxcxZ26_bVtKOmywP8qBg3WwGSk8GB45QPsXxMOHCsdCx9lZkWNrMpmVk-Pa2d0vH8Ty1raA0HSWw7VixZNMwLfrDlGtEuxQZWBS_ohwfDCjhHewnKzt_n35FaLnt4CRikTp0UUt71TnpUU0nkt4sqWLiky3RlGxqaeRCqP8a1WGQ api_key: 8MO5994KEQMEZMAN user_id: "1927982333628370945" system_id: gwms-dev vendor: test_vebdor scope: inventory:read order:read api:read warehouse:read token_type: Bearer expires_in: 3600 client_id: EOUSSQNWMRVX15GA schema: $ref: '#/components/schemas/TokenResponse' description: 认证成功,返回访问令牌 "400": content: application/json: examples: missing_parameter: summary: 缺少必需参数 value: success: false code: AUTH001 message: Missing required parameter timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: "clientId, clientSecret and apiKey are required" details: - field: clientId message: clientId is required - field: clientSecret message: clientSecret is required - field: apiKey message: apiKey is required invalid_format: summary: 参数格式错误 value: success: false code: AUTH001 message: Invalid parameter format timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: clientId and apiKey must be 32-character alphanumeric strings details: - field: clientId message: clientId must be exactly 32 characters long and contain only uppercase letters and numbers - field: apiKey message: apiKey must be exactly 32 characters long and contain only uppercase letters and numbers schema: $ref: '#/components/schemas/ApiErrorResponse' description: 请求参数错误 "401": content: application/json: examples: invalid_client_credentials: summary: 无效客户端凭证 value: success: false code: AUTH002 message: Invalid client credentials timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided clientId and clientSecret combination is invalid invalid_api_key: summary: 无效API密钥 value: success: false code: AUTH002 message: Invalid API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided API key is invalid or does not exist expired_api_key: summary: API密钥过期 value: success: false code: AUTH007 message: API key has expired timestamp: 2024-01-01T12:00:00Z error: code: AUTH007 message: The provided API key has expired and needs to be regenerated disabled_client: summary: 客户端已禁用 value: success: false code: AUTH006 message: Client has been disabled timestamp: 2024-01-01T12:00:00Z error: code: AUTH006 message: Your client credentials have been disabled by the administrator schema: $ref: '#/components/schemas/ApiErrorResponse' description: 认证失败 "429": content: application/json: examples: rate_limit: summary: 频率限制 value: success: false code: AUTH005 message: Rate limit exceeded timestamp: 2024-01-01T12:00:00Z error: code: AUTH005 message: "Too many authentication requests, please try again\ \ later" details: - field: rate_limit message: Maximum 10 requests per minute allowed for token endpoint - field: retry_after message: Please wait 60 seconds before next request - field: current_usage message: You have made 11 requests in the last minute schema: $ref: '#/components/schemas/ApiErrorResponse' description: 请求频率超限 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: [] summary: 获取访问令牌 tags: - auth x-content-type: application/json x-accepts: application/json /api/v1/warehouses: get: description: | 检索仓库的分页列表,允许过滤和排序。 **所需权限:** `warehouse:read` **使用场景:** - ERP系统同步仓库主数据 - 电商平台获取可用仓库列表 - TMS系统查询配送仓库信息 operationId: listWarehouses parameters: - description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form - description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form - description: 结果的排序字段。使用逗号分隔的字段列表。 explode: true in: query name: sort required: false schema: example: "createTime,code" type: string style: form - description: 排序方向。ASC为升序,DESC为降序。 explode: true in: query name: isAsc required: false schema: $ref: '#/components/schemas/SortDirection' style: form - description: 按仓库编码筛选。 explode: true in: query name: code required: false schema: type: string style: form - description: 按仓库名称筛选。 explode: true in: query name: name required: false schema: type: string style: form - description: 按仓库状态筛选。 explode: true in: query name: status required: false schema: $ref: '#/components/schemas/EntityStatus' style: form - description: 按城市筛选。 explode: true in: query name: city required: false schema: type: string style: form - description: 按省/州筛选。 explode: true in: query name: province required: false schema: type: string style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/WarehouseListResponse' description: 仓库的分页列表。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:read summary: 列出仓库 tags: - Warehouses x-accepts: application/json post: description: | 在系统中创建一个新仓库。此操作是幂等的,支持上游系统推送仓库数据。 **所需权限:** `warehouse:write` **使用场景:** - ERP系统推送新建仓库信息 - 系统集成时批量创建仓库主数据 operationId: createWarehouse parameters: - description: 一个唯一的密钥(例如,UUID),以确保资源的幂等创建。 explode: false in: header name: Idempotency-Key required: true schema: format: uuid type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/WarehouseCreateRequest' description: 要创建的仓库信息。 required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/WarehouseResponse' description: 仓库已成功创建。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。当请求与服务器的当前状态冲突时,将发送此响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:write summary: 创建仓库 tags: - Warehouses x-content-type: application/json x-accepts: application/json /api/v1/warehouses/code/{code}: get: description: | 通过仓库编码检索特定仓库的详细信息。 **所需权限:** `warehouse:read` **使用场景:** - 验证仓库编码有效性 - 获取仓库详细配置信息 - 查询仓库地址和联系方式 operationId: getWarehouseByCode parameters: - description: 仓库编码。 explode: false in: path name: code required: true schema: type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/WarehouseResponse' description: 仓库详情。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:read summary: 获取仓库详情 tags: - Warehouses x-accepts: application/json put: description: | 更新特定仓库的信息。支持上游系统推送更新后的仓库数据。 **所需权限:** `warehouse:write` **使用场景:** - ERP系统同步仓库信息变更 - 更新仓库地址、联系方式等基础信息 operationId: updateWarehouse parameters: - description: 仓库编码。 explode: false in: path name: code required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/WarehouseUpdateRequest' description: 要更新的仓库信息。 required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/WarehouseResponse' description: 仓库已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:write summary: 更新仓库 tags: - Warehouses x-content-type: application/json x-accepts: application/json /api/v1/warehouses/code/{code}/status: put: description: | 启用或禁用特定仓库。 **所需权限:** `warehouse:write` **使用场景:** - 临时禁用维护中的仓库 - 启用新投入使用的仓库 - 系统管理和运营控制 operationId: updateWarehouseStatus parameters: - description: 仓库编码。 explode: false in: path name: code required: true schema: type: string style: simple - description: 新的仓库状态。 explode: true in: query name: status required: true schema: $ref: '#/components/schemas/EntityStatus' style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/WarehouseResponse' description: 仓库状态已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:write summary: 更新仓库状态 tags: - Warehouses x-accepts: application/json /api/v1/zones: get: description: | 检索库区的分页列表,允许过滤和排序。 **所需权限:** `warehouse:read` **使用场景:** - 查询仓库内的库区布局 - 获取可用库区列表用于库存分配 - 系统集成时同步库区信息 operationId: listZones parameters: - description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form - description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form - description: 结果的排序字段。使用逗号分隔的字段列表。 explode: true in: query name: sort required: false schema: example: "createTime,code" type: string style: form - description: 排序方向。ASC为升序,DESC为降序。 explode: true in: query name: isAsc required: false schema: $ref: '#/components/schemas/SortDirection' style: form - description: 按所属仓库ID筛选。 explode: true in: query name: warehouseId required: false schema: format: int64 type: integer style: form - description: 按库区编码筛选。 explode: true in: query name: code required: false schema: type: string style: form - description: 按库区名称筛选。 explode: true in: query name: name required: false schema: type: string style: form - description: 按库区状态筛选。 explode: true in: query name: status required: false schema: $ref: '#/components/schemas/EntityStatus' style: form - description: 按库区类型筛选。 explode: true in: query name: zoneType required: false schema: type: string style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/ZoneListResponse' description: 库区的分页列表。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:read summary: 列出库区 tags: - Zones x-accepts: application/json post: description: | 在指定仓库中创建一个新库区。此操作是幂等的。 **所需权限:** `warehouse:write` **使用场景:** - 仓库扩建时创建新库区 - 系统初始化时批量创建库区 - ERP系统推送库区配置 operationId: createZone parameters: - description: 一个唯一的密钥(例如,UUID),以确保资源的幂等创建。 explode: false in: header name: Idempotency-Key required: true schema: format: uuid type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/ZoneCreateRequest' description: 要创建的库区信息。 required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/ZoneResponse' description: 库区已成功创建。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。当请求与服务器的当前状态冲突时,将发送此响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:write summary: 创建库区 tags: - Zones x-content-type: application/json x-accepts: application/json /api/v1/zones/code/{code}: get: description: | 通过库区编码检索特定库区的详细信息。 **所需权限:** `warehouse:read` **使用场景:** - 验证库区编码有效性 - 获取库区容量和配置信息 - 库存分配前查询库区状态 operationId: getZoneById parameters: - description: 库区编码。 explode: false in: path name: code required: true schema: type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/ZoneResponse' description: 库区详情。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:read summary: 获取库区详情 tags: - Zones x-accepts: application/json put: description: | 更新特定库区的信息。 **所需权限:** `warehouse:write` **使用场景:** - 调整库区容量配置 - 更新库区类型和属性 - 同步ERP系统的库区变更 operationId: updateZone parameters: - description: 库区编码。 explode: false in: path name: code required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/ZoneUpdateRequest' description: 要更新的库区信息。 required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/ZoneResponse' description: 库区已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:write summary: 更新库区 tags: - Zones x-content-type: application/json x-accepts: application/json /api/v1/zones/code/{code}/status: put: description: | 启用或禁用特定库区。 **所需权限:** `warehouse:write` **使用场景:** - 库区维护时临时禁用 - 新库区投入使用时启用 - 库存策略调整时控制库区可用性 operationId: updateZoneStatus parameters: - description: 库区编码。 explode: false in: path name: code required: true schema: type: string style: simple - description: 新的库区状态。 explode: true in: query name: status required: true schema: $ref: '#/components/schemas/EntityStatus' style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/ZoneResponse' description: 库区状态已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:write summary: 更新库区状态 tags: - Zones x-accepts: application/json /api/v1/locations: get: description: | 检索库位的分页列表,允许过滤和排序。 **所需权限:** `warehouse:read` **使用场景:** - 查询可用库位进行库存分配 - 获取库位列表用于拣货路径规划 - 系统集成时同步库位信息 operationId: listLocations parameters: - description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form - description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form - description: 结果的排序字段。使用逗号分隔的字段列表。 explode: true in: query name: sort required: false schema: example: "createTime,code" type: string style: form - description: 排序方向。ASC为升序,DESC为降序。 explode: true in: query name: isAsc required: false schema: $ref: '#/components/schemas/SortDirection' style: form - description: 按所属仓库ID筛选。 explode: true in: query name: warehouseId required: false schema: format: int64 type: integer style: form - description: 按所属库区ID筛选。 explode: true in: query name: zoneId required: false schema: format: int64 type: integer style: form - description: 按库位编码筛选。 explode: true in: query name: code required: false schema: type: string style: form - description: 按库位状态筛选。 explode: true in: query name: status required: false schema: $ref: '#/components/schemas/EntityStatus' style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/LocationListResponse' description: 库位的分页列表。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:read summary: 列出库位 tags: - Locations x-accepts: application/json post: description: | 在指定库区中创建一个新库位。此操作是幂等的。 **所需权限:** `warehouse:write` **使用场景:** - 仓库扩建时批量创建库位 - 系统初始化时导入库位数据 - 货架调整后创建新库位 operationId: createLocation parameters: - description: 一个唯一的密钥(例如,UUID),以确保资源的幂等创建。 explode: false in: header name: Idempotency-Key required: true schema: format: uuid type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/LocationCreateRequest' description: 要创建的库位信息。 required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/LocationResponse' description: 库位已成功创建。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。当请求与服务器的当前状态冲突时,将发送此响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:write summary: 创建库位 tags: - Locations x-content-type: application/json x-accepts: application/json /api/v1/locations/code/{code}: get: description: | 通过库位编码检索特定库位的详细信息。 **所需权限:** `warehouse:read` **使用场景:** - 验证库位编码有效性 - 获取库位容量和规格信息 - 库存操作前查询库位状态 operationId: getLocationByCode parameters: - description: 库位编码。 explode: false in: path name: code required: true schema: type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/LocationResponse' description: 库位详情。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:read summary: 获取库位详情 tags: - Locations x-accepts: application/json put: description: | 更新特定库位的信息。 **所需权限:** `warehouse:write` **使用场景:** - 调整库位容量和规格 - 更新库位类型和属性 - 同步货架调整后的库位变更 operationId: updateLocation parameters: - description: 库位编码。 explode: false in: path name: code required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/LocationUpdateRequest' description: 要更新的库位信息。 required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/LocationResponse' description: 库位已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:write summary: 更新库位 tags: - Locations x-content-type: application/json x-accepts: application/json /api/v1/locations/code/{code}/status: put: description: | 启用或禁用特定库位。 **所需权限:** `warehouse:write` **使用场景:** - 库位维护时临时禁用 - 新库位投入使用时启用 - 库存策略调整时控制库位可用性 operationId: updateLocationStatus parameters: - description: 库位编码。 explode: false in: path name: code required: true schema: type: string style: simple - description: 新的库位状态。 explode: true in: query name: status required: true schema: $ref: '#/components/schemas/EntityStatus' style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/LocationResponse' description: 库位状态已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - warehouse:write summary: 更新库位状态 tags: - Locations x-accepts: application/json /api/v1/products/spus: get: description: 检索产品SPU的分页列表,允许过滤和排序。 operationId: listProductSpus parameters: - description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form - description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form - description: 结果的排序字段。使用逗号分隔的字段列表。 explode: true in: query name: sort required: false schema: example: "createdAt,spuCode" type: string style: form - description: 排序方向。ASC为升序,DESC为降序。 explode: true in: query name: isAsc required: false schema: $ref: '#/components/schemas/SortDirection' style: form - description: 按SPU编码筛选。 explode: true in: query name: spuCode required: false schema: type: string style: form - description: 按产品名称筛选。 explode: true in: query name: productName required: false schema: type: string style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/ProductSpuListResponse' description: 产品SPU的分页列表。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:read summary: 列出产品SPU tags: - Product SPUs x-accepts: application/json post: description: 在主数据中创建一个新的产品SPU。此操作是幂等的,支持上游系统推送产品SPU数据。 operationId: createProductSpu parameters: - description: 一个唯一的密钥(例如,UUID),以确保资源的幂等创建。 explode: false in: header name: Idempotency-Key required: true schema: format: uuid type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductSpuCreateRequest' description: 要创建的产品SPU。 required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/ProductSpuResponse' description: 产品SPU已成功创建。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。当请求与服务器的当前状态冲突时,将发送此响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:write summary: 创建一个产品SPU tags: - Product SPUs x-content-type: application/json x-accepts: application/json /api/v1/products/spus/code/{spuCode}: delete: description: 通过SPU编码删除产品SPU。使用业务编码而非内部ID进行操作。 operationId: deleteProductSpuByCode parameters: - description: 产品SPU的业务编码。 explode: false in: path name: spuCode required: true schema: example: SPU-001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple responses: "204": description: 产品SPU已成功删除。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。产品SPU无法删除,例如,它有关联的产品。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:write summary: 通过SPU编码删除产品SPU tags: - Product SPUs x-accepts: application/json get: description: 通过SPU编码检索特定产品SPU的详细信息。使用业务编码而非内部ID进行查询。 operationId: getProductSpuByCode parameters: - description: 产品SPU的业务编码。 explode: false in: path name: spuCode required: true schema: example: SPU-001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/ProductSpuResponse' description: 产品SPU详情。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:read summary: 通过SPU编码获取产品SPU tags: - Product SPUs x-accepts: application/json put: description: 通过SPU编码更新产品SPU的所有属性。使用业务编码而非内部ID进行操作。 operationId: updateProductSpuByCode parameters: - description: 产品SPU的业务编码。 explode: false in: path name: spuCode required: true schema: example: SPU-001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductSpuUpdateRequest' description: 要更新的完整产品SPU数据。 required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/ProductSpuResponse' description: 产品SPU已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:write summary: 通过SPU编码更新产品SPU(完整) tags: - Product SPUs x-content-type: application/json x-accepts: application/json /api/v1/products: get: description: 检索产品的分页列表,允许过滤和排序。 operationId: listProducts parameters: - description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form - description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form - description: 结果的排序字段。使用逗号分隔的字段列表。 explode: true in: query name: sort required: false schema: example: "createdAt,sku" type: string style: form - description: 排序方向。ASC为升序,DESC为降序。 explode: true in: query name: isAsc required: false schema: $ref: '#/components/schemas/SortDirection' style: form - description: 按产品SKU筛选。 explode: true in: query name: sku required: false schema: type: string style: form - description: 按产品状态筛选。 explode: true in: query name: status required: false schema: $ref: '#/components/schemas/ProductStatus' style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/ProductListResponse' description: 产品的分页列表。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:read summary: 列出产品 tags: - Products x-accepts: application/json post: description: 在主数据中创建一个新产品。此操作是幂等的,支持上游系统推送产品数据。 operationId: createProduct parameters: - description: 一个唯一的密钥(例如,UUID),以确保资源的幂等创建。 explode: false in: header name: Idempotency-Key required: true schema: format: uuid type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductCreateRequest' description: 要创建的产品。 required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/ProductResponse' description: 产品已成功创建。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。当请求与服务器的当前状态冲突时,将发送此响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:write summary: 创建一个产品 tags: - Products x-content-type: application/json x-accepts: application/json /api/v1/products/batch: post: description: 支持上游系统批量推送产品数据到WMS系统。适用于ERP系统、电商平台等批量同步产品主数据的场景。批量操作具有事务一致性:要么全部成功创建,要么全部失败。 operationId: createProductsBatch parameters: - description: 一个唯一的密钥(例如,UUID),以确保批量操作的幂等性。 explode: false in: header name: Idempotency-Key required: true schema: format: uuid type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductBatchRequest' description: 批量创建的产品数据。 required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/ProductBatchResponse' description: 批量操作成功完成,返回创建的产品ID列表。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:write summary: 批量创建产品 tags: - Products x-content-type: application/json x-accepts: application/json /api/v1/products/skuCode/{skuCode}: delete: description: 通过产品SKU编码删除产品。外部skuCode将映射到内部的sku或gsku字段。 operationId: deleteProductBySkuCode parameters: - description: 产品SKU编码(外部编码,将映射到内部sku或gsku)。 explode: false in: path name: skuCode required: true schema: example: WIDGET-001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple responses: "204": description: 产品已成功删除。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。产品无法删除,例如,它有关联的库存。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:write summary: 通过SKU编码删除产品 tags: - Products x-accepts: application/json get: description: 通过产品SKU编码检索特定产品的详细信息。外部skuCode将映射到内部的sku或gsku字段。 operationId: getProductBySkuCode parameters: - description: 产品SKU编码(外部编码,将映射到内部sku或gsku)。 explode: false in: path name: skuCode required: true schema: example: WIDGET-001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/ProductResponse' description: 产品详情。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:read summary: 通过SKU编码获取产品 tags: - Products x-accepts: application/json patch: description: 通过产品SKU编码更新产品的一个或多个属性。外部skuCode将映射到内部的sku或gsku字段。 operationId: partialUpdateProductBySkuCode parameters: - description: 产品SKU编码(外部编码,将映射到内部sku或gsku)。 explode: false in: path name: skuCode required: true schema: example: WIDGET-001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductPartialUpdateRequest' description: 要更新的产品属性。 required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/ProductResponse' description: 产品已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:write summary: 通过SKU编码更新产品(部分) tags: - Products x-content-type: application/json x-accepts: application/json put: description: 通过产品SKU编码更新产品的所有属性。外部skuCode将映射到内部的sku或gsku字段。 operationId: updateProductBySkuCode parameters: - description: 产品SKU编码(外部编码,将映射到内部sku或gsku)。 explode: false in: path name: skuCode required: true schema: example: WIDGET-001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductUpdateRequest' description: 要更新的完整产品数据。 required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/ProductResponse' description: 产品已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - product:write summary: 通过SKU编码更新产品(完整) tags: - Products x-content-type: application/json x-accepts: application/json /api/v1/inbound/orders: get: description: | 检索入库单的分页列表,支持多种筛选条件和排序。 **所需权限:** `inbound:read` **使用场景:** - ERP系统查询入库单状态 - 供应商门户查看入库进度 - 仓库管理系统监控入库作业 - 财务系统核对入库记录 operationId: listInboundOrders parameters: - description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form - description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form - description: 结果的排序字段。使用逗号分隔的字段列表。 explode: true in: query name: sort required: false schema: example: "createdAt,inboundNo" type: string style: form - description: 排序方向。ASC为升序,DESC为降序。 explode: true in: query name: isAsc required: false schema: $ref: '#/components/schemas/SortDirection' style: form - description: 按入库单号筛选。 explode: true in: query name: inboundNo required: false schema: type: string style: form - description: 按入库类型筛选。 explode: true in: query name: inboundType required: false schema: $ref: '#/components/schemas/InboundTypeEnum' style: form - description: 按入库单状态筛选。 explode: true in: query name: status required: false schema: $ref: '#/components/schemas/InboundOrderStatusEnum' style: form - description: 按货主编码筛选。 explode: true in: query name: ownerCode required: false schema: type: string style: form - description: 按仓库编码筛选。 explode: true in: query name: warehouseCode required: false schema: type: string style: form - description: 创建时间起始日期筛选。 explode: true in: query name: startDate required: false schema: format: date type: string style: form - description: 创建时间结束日期筛选。 explode: true in: query name: endDate required: false schema: format: date type: string style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/InboundOrderListResponse' description: 入库单的分页列表。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - inbound:read summary: 列出入库单 tags: - Inbound Orders x-accepts: application/json post: description: | 在系统中创建一个新的入库单,支持同时创建明细和箱子信息。此操作是幂等的。 **所需权限:** `inbound:write` **使用场景:** - ERP系统推送采购入库单 - 供应商系统创建退货入库单 - 调拨系统创建转库入库单 - 第三方系统集成入库作业 operationId: createInboundOrder parameters: - description: 一个唯一的密钥(例如,UUID),以确保资源的幂等创建。 explode: false in: header name: Idempotency-Key required: true schema: format: uuid type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/InboundOrderCreateRequest' description: 要创建的入库单信息。 required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/InboundOrderResponse' description: 入库单已成功创建。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。当请求与服务器的当前状态冲突时,将发送此响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - inbound:write summary: 创建入库单 tags: - Inbound Orders x-content-type: application/json x-accepts: application/json /api/v1/inbound/orders/{inboundNo}: delete: description: | 通过入库单号取消入库单。只有未收获的入库单才能被取消。 **所需权限:** `inbound:write` **使用场景:** - ERP系统取消已下发的入库单 - 供应商取消预约入库 - 处理异常情况下的入库单撤销 operationId: cancelInboundOrderByCode parameters: - description: 入库单号。 explode: false in: path name: inboundNo required: true schema: example: IB202501130001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple responses: "204": description: 入库单已成功取消。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。入库单无法取消,例如,状态不允许取消。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - inbound:write summary: 通过入库单号取消入库单 tags: - Inbound Orders x-accepts: application/json get: description: | 通过入库单号检索特定入库单的详细信息,包括明细和箱子信息。 **所需权限:** `inbound:read` **使用场景:** - 查询入库单详细状态和进度 - 获取入库明细用于对账 - 追踪特定入库单的处理情况 operationId: getInboundOrderByCode parameters: - description: 入库单号。 explode: false in: path name: inboundNo required: true schema: example: IB202501130001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/InboundOrderDetailResponse' description: 入库单详情。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - inbound:read summary: 通过入库单号获取入库单 tags: - Inbound Orders x-accepts: application/json put: description: | 通过入库单号更新入库单信息。 **所需权限:** `inbound:write` **使用场景:** - ERP系统同步入库单变更 - 供应商更新预约入库信息 - 调整入库单明细和数量 operationId: updateInboundOrderByCode parameters: - description: 入库单号。 explode: false in: path name: inboundNo required: true schema: example: IB202501130001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/InboundOrderUpdateRequest' description: 要更新的入库单信息。 required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/InboundOrderResponse' description: 入库单已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - inbound:write summary: 通过入库单号更新入库单 tags: - Inbound Orders x-content-type: application/json x-accepts: application/json /api/v1/inbound/orders/{inboundNo}/status: patch: description: | 更新入库单的状态,如审核、开始处理。 **所需权限:** `inbound:write` **使用场景:** - ERP系统审核入库单 - 仓库系统更新作业状态 - 供应商确认入库预约 - 系统集成时同步状态变更 operationId: updateInboundOrderStatus parameters: - description: 入库单号。 explode: false in: path name: inboundNo required: true schema: example: IB202501130001 pattern: "^[A-Za-z0-9-]{1,50}$" type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/InboundOrderStatusUpdateRequest' description: 状态更新请求。 required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/InboundOrderResponse' description: 入库单状态已成功更新。 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。状态转换不被允许。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - inbound:write summary: 更新入库单状态 tags: - Inbound Orders x-content-type: application/json x-accepts: application/json /api/v1/stock/queries: post: description: | 根据仓库和产品SKU列表查询详细库存信息。 **所需权限:** `stock:read` **使用场景:** - ERP系统同步库存数据 - 电商平台查询可售库存 - 订单履约前检查库存可用性 - 库存报表和分析 operationId: getStocks requestBody: content: application/json: schema: $ref: '#/components/schemas/StockQueryRequest' required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/StockQueryResponse' description: 成功获取库存信息 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "403": content: application/json: examples: insufficient_scope: summary: 权限范围不足 value: success: false code: AUTH004 message: Insufficient scope for this operation timestamp: 2024-01-01T12:00:00Z error: code: AUTH004 message: Your token does not have the required scope to access this resource client_disabled: summary: 客户端已被禁用 value: success: false code: AUTH006 message: Client has been disabled timestamp: 2024-01-01T12:00:00Z error: code: AUTH006 message: Your client credentials have been disabled by the administrator schema: $ref: '#/components/schemas/ApiErrorResponse' description: 禁止访问。客户端没有访问内容的权限。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - stock:read summary: 查询产品库存 tags: - Stock x-content-type: application/json x-accepts: application/json /api/v1/stock/page/queries: post: description: | 根据仓库和产品SKU列表分页查询详细库存信息。 **所需权限:** `stock:read` **使用场景:** - ERP系统同步库存数据 - 电商平台查询可售库存 - 订单履约前检查库存可用性 - 库存报表和分析 operationId: getPageStocks parameters: - description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form - description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form requestBody: content: application/json: schema: $ref: '#/components/schemas/StockQueryRequest' required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/StockPageListResponse' description: 成功获取库存信息 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - stock:read summary: 分页查询产品库存 tags: - Stock x-content-type: application/json x-accepts: application/json /api/v1/outboundOrder: post: description: | 创建出库单。 **所需权限:** `outbound:write` **使用场景:** - 电商平台创建发货订单 - ERP系统推送出库指令 - 订单系统同步出库需求 operationId: createNewOrder requestBody: content: application/json: schema: $ref: '#/components/schemas/OutboundOrder' required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/ApiResponseBase' description: 出库单已成功创建 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "403": content: application/json: examples: insufficient_scope: summary: 权限范围不足 value: success: false code: AUTH004 message: Insufficient scope for this operation timestamp: 2024-01-01T12:00:00Z error: code: AUTH004 message: Your token does not have the required scope to access this resource client_disabled: summary: 客户端已被禁用 value: success: false code: AUTH006 message: Client has been disabled timestamp: 2024-01-01T12:00:00Z error: code: AUTH006 message: Your client credentials have been disabled by the administrator schema: $ref: '#/components/schemas/ApiErrorResponse' description: 禁止访问。客户端没有访问内容的权限。 "409": content: application/json: examples: insufficient_stock: summary: 库存不足 value: success: false code: INSUFFICIENT_STOCK message: 库存数量不足以满足出库需求 timestamp: 2024-01-01T12:00:00Z error: code: INSUFFICIENT_STOCK message: SKU库存不足,请求数量超过可用库存 duplicate_order: summary: 重复订单 value: success: false code: DUPLICATE_ORDER message: 出库单已存在 timestamp: 2024-01-01T12:00:00Z error: code: DUPLICATE_ORDER message: 相同的客户订单号已存在出库单 schema: $ref: '#/components/schemas/ApiErrorResponse' description: 业务冲突 - 订单状态不允许创建或库存不足 "422": content: application/json: examples: invalid_product: summary: 无效产品 value: success: false code: INVALID_PRODUCT message: 产品信息无效 timestamp: 2024-01-01T12:00:00Z error: code: INVALID_PRODUCT message: 指定的SKU不存在或已停用 schema: $ref: '#/components/schemas/ApiErrorResponse' description: 业务逻辑验证失败 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - outbound:write summary: 创建出库单 tags: - OutboundOrder x-content-type: application/json x-accepts: application/json /api/v1/outboundOrder/{wmsOrderNo}/cancel: post: description: | 取消出库单。 **所需权限:** `outbound:write` **使用场景:** - 订单取消后撤销出库指令 - 处理异常情况下的出库单撤销 - 客户修改订单后重新安排出库 operationId: cancel parameters: - explode: false in: path name: wmsOrderNo required: true schema: type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/ApiResponseBase' description: 出库单已成功取消 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "403": content: application/json: examples: insufficient_scope: summary: 权限范围不足 value: success: false code: AUTH004 message: Insufficient scope for this operation timestamp: 2024-01-01T12:00:00Z error: code: AUTH004 message: Your token does not have the required scope to access this resource client_disabled: summary: 客户端已被禁用 value: success: false code: AUTH006 message: Client has been disabled timestamp: 2024-01-01T12:00:00Z error: code: AUTH006 message: Your client credentials have been disabled by the administrator schema: $ref: '#/components/schemas/ApiErrorResponse' description: 禁止访问。客户端没有访问内容的权限。 "404": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 "409": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。当请求与服务器的当前状态冲突时,将发送此响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - outbound:write summary: 取消出库单 tags: - OutboundOrder x-accepts: application/json /api/v1/expressChannel: get: description: | 获取所有可用的物流渠道信息。 **所需权限:** `express:read` **使用场景:** - 获取可用物流渠道列表 - 查询物流渠道配置信息 - 电商平台同步物流渠道数据 operationId: list responses: "200": content: application/json: schema: $ref: '#/components/schemas/ApiListResponseBase' description: 成功获取物流渠道列表 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "403": content: application/json: examples: insufficient_scope: summary: 权限范围不足 value: success: false code: AUTH004 message: Insufficient scope for this operation timestamp: 2024-01-01T12:00:00Z error: code: AUTH004 message: Your token does not have the required scope to access this resource client_disabled: summary: 客户端已被禁用 value: success: false code: AUTH006 message: Client has been disabled timestamp: 2024-01-01T12:00:00Z error: code: AUTH006 message: Your client credentials have been disabled by the administrator schema: $ref: '#/components/schemas/ApiErrorResponse' description: 禁止访问。客户端没有访问内容的权限。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - express:read summary: 获取所有物流渠道 tags: - ExpressChannel x-accepts: application/json /api/v1/outboundOrders: get: description: | 分页查询出库单列表,支持多种筛选条件。 **所需权限:** `outbound:read` **使用场景:** - 批量查询出库单状态 - 按条件筛选出库单 - 监控出库作业进度 - 生成出库报表 operationId: pageQueryOutboundOrder parameters: - description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form - description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form - description: WMS单号 explode: true in: query name: wmsOrderNo required: false schema: type: string style: form - description: 平台单号 explode: true in: query name: platformOrderNo required: false schema: type: string style: form - description: 订单状态 explode: true in: query name: orderState required: false schema: type: string style: form - description: 跟踪号 explode: true in: query name: trackingNo required: false schema: type: string style: form - description: "单据类型(DROP_SHIPPING:一件代发, FBA:备货中转)" explode: true in: query name: orderType required: false schema: type: string style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/OutboundOrderListResponse' description: 成功获取出库单列表 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "403": content: application/json: examples: insufficient_scope: summary: 权限范围不足 value: success: false code: AUTH004 message: Insufficient scope for this operation timestamp: 2024-01-01T12:00:00Z error: code: AUTH004 message: Your token does not have the required scope to access this resource client_disabled: summary: 客户端已被禁用 value: success: false code: AUTH006 message: Client has been disabled timestamp: 2024-01-01T12:00:00Z error: code: AUTH006 message: Your client credentials have been disabled by the administrator schema: $ref: '#/components/schemas/ApiErrorResponse' description: 禁止访问。客户端没有访问内容的权限。 "422": content: application/json: examples: invalid_filter: summary: 无效筛选条件 value: success: false code: INVALID_FILTER message: 筛选条件格式错误 timestamp: 2024-01-01T12:00:00Z error: code: INVALID_FILTER message: 日期范围或状态筛选条件无效 schema: $ref: '#/components/schemas/ApiErrorResponse' description: 业务逻辑验证失败 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 security: - BearerAuth: - outbound:read summary: 分页查询出库单 tags: - OutboundOrder x-accepts: application/json /api/v1/transactions: get: description: 根据过滤条件查询计费流水,支持分页。 operationId: listChargeTransactions parameters: - description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form - description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form - description: 客户编码 explode: true in: query name: customerCode required: false schema: type: string style: form - description: 仓库编码 explode: true in: query name: warehouseCode required: false schema: type: string style: form - description: 流水编号 explode: true in: query name: transactionsCode required: false schema: type: string style: form - description: 业务单号 explode: true in: query name: bizBillNo required: false schema: type: string style: form - description: 流水类型 explode: true in: query name: bizType required: false schema: $ref: '#/components/schemas/ChargeBizType' style: form - description: 计费状态 explode: true in: query name: chargeStatus required: false schema: $ref: '#/components/schemas/ChargeStatus' style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/ChargeTransactionListResponse' description: 成功获取计费流水列表 "400": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 "401": content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 "500": content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 summary: 查询计费流水列表 tags: - Charge x-accepts: application/json components: parameters: PageNumber: description: 页码(从1开始) explode: true in: query name: pageNumber required: false schema: default: 1 example: 1 minimum: 1 type: integer style: form PageSize: description: 每页记录数 explode: true in: query name: pageSize required: false schema: default: 20 example: 20 maximum: 100 minimum: 1 type: integer style: form responses: BadRequest: content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 错误的请求。由于被认为是客户端错误(例如,格式错误的请求语法、无效的请求消息帧或欺骗性的请求路由),服务器无法或不会处理该请求。 Unauthorized: content: application/json: examples: invalid_token: summary: 无效令牌 value: success: false code: AUTH003 message: Access token has expired or is invalid timestamp: 2024-01-01T12:00:00Z error: code: AUTH003 message: The provided access token is expired or invalid missing_token: summary: 缺少认证令牌 value: success: false code: AUTH001 message: Missing authorization header timestamp: 2024-01-01T12:00:00Z error: code: AUTH001 message: Authorization header with Bearer token is required invalid_credentials: summary: 无效凭证 value: success: false code: AUTH002 message: Invalid client credentials or API key timestamp: 2024-01-01T12:00:00Z error: code: AUTH002 message: The provided client credentials or API key is invalid schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未经授权。客户端必须对自己进行身份验证才能获得请求的响应。 Forbidden: content: application/json: examples: insufficient_scope: summary: 权限范围不足 value: success: false code: AUTH004 message: Insufficient scope for this operation timestamp: 2024-01-01T12:00:00Z error: code: AUTH004 message: Your token does not have the required scope to access this resource client_disabled: summary: 客户端已被禁用 value: success: false code: AUTH006 message: Client has been disabled timestamp: 2024-01-01T12:00:00Z error: code: AUTH006 message: Your client credentials have been disabled by the administrator schema: $ref: '#/components/schemas/ApiErrorResponse' description: 禁止访问。客户端没有访问内容的权限。 NotFound: content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 未找到。服务器找不到请求的资源。 Conflict: content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 冲突。当请求与服务器的当前状态冲突时,将发送此响应。 TooManyRequests: content: application/json: examples: rate_limit_exceeded: summary: 超出频率限制 value: success: false code: AUTH005 message: Rate limit exceeded timestamp: 2024-01-01T12:00:00Z error: code: AUTH005 message: "Too many requests, please try again later" details: - field: rate_limit message: Maximum 100 requests per minute allowed - field: retry_after message: Please wait 60 seconds before next request schema: $ref: '#/components/schemas/ApiErrorResponse' description: 请求过多。用户在给定的时间内发送了太多请求("速率限制")。 InternalServerError: content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' description: 内部服务器错误。服务器遇到了不知道如何处理的情况。 schemas: ApiResponseBase: example: code: "200" data: "{}" success: true message: 操作成功 timestamp: 2024-01-01T00:00:00Z properties: success: description: 请求是否成功 example: true type: boolean message: default: Success description: 响应消息 example: 操作成功 type: string code: default: "200" description: 响应代码 example: "200" type: string timestamp: description: 响应时间戳 example: 2024-01-01T00:00:00Z format: date-time type: string data: description: 响应数据,具体类型由子类定义 nullable: true type: object required: - code - message - success - timestamp type: object ApiErrorResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: error: $ref: '#/components/schemas/Error' required: - error type: object Error: properties: code: description: 机器可读的错误代码 example: VALIDATION_ERROR type: string message: description: 人类可读的错误描述 example: 提供的数据无效 type: string details: description: 错误详情列表 items: $ref: '#/components/schemas/ErrorDetail' type: array required: - code - message type: object ErrorDetail: properties: field: description: 导致错误的字段名 example: sku type: string issue: description: 字段的具体问题描述 example: SKU必须是唯一的 type: string required: - field - issue type: object Pagination: properties: total: description: 总记录数 example: 100 minimum: 0 type: integer pageNumber: description: 当前页码(从1开始) example: 1 minimum: 1 type: integer size: description: 每页记录数 example: 20 maximum: 1000 minimum: 1 type: integer required: - pageNumber - size - total type: object BaseEntity: $ref: '#/components/schemas/PublicBaseEntity' Weight: description: 产品重量信息。 properties: weightKg: description: 重量(千克)。 example: 1.25 format: double maximum: 100000 minimum: 0 type: number weightLb: description: 重量(磅)。 example: 2.76 format: double maximum: 100000 minimum: 0 type: number type: object Packaging: description: 包装信息。 properties: packageLengthCm: description: 包材长度(厘米)。 example: 25.5 format: double maximum: 10000 minimum: 0.1 type: number packageWidthCm: description: 包材宽度(厘米)。 example: 15.5 format: double maximum: 10000 minimum: 0.1 type: number packageHeightCm: description: 包材高度(厘米)。 example: 10.5 format: double maximum: 10000 minimum: 0.1 type: number packageLengthInch: description: 包材长度(英寸)。 example: 10.04 format: double maximum: 10000 minimum: 0.1 type: number packageWidthInch: description: 包材宽度(英寸)。 example: 6.1 format: double maximum: 10000 minimum: 0.1 type: number packageHeightInch: description: 包材高度(英寸)。 example: 4.13 format: double maximum: 10000 minimum: 0.1 type: number packageWeightKg: description: 包材重量(千克)。 example: 1.5 format: double maximum: 100000 minimum: 0.01 type: number packageWeightLb: description: 包材重量(磅)。 example: 3.31 format: double maximum: 100000 minimum: 0.01 type: number packageMetricVolume: description: 包装公制体积(立方厘米)。 example: 4144.13 format: double minimum: 0.01 type: number packageImperialVolume: description: 包装英制体积(立方英寸)。 example: 252.93 format: double minimum: 0.01 type: number type: object Pricing: description: 价格信息。 properties: value: description: 产品价值。 example: 99.99 format: double minimum: 0 type: number currency: $ref: '#/components/schemas/Currency' type: object Attributes: description: 产品属性。 properties: containingElectric: default: false description: 是否含有电子元件。 type: boolean dangerousGoods: default: false description: 是否危险品。 type: boolean needsPackaging: default: true description: 是否需要包装。 type: boolean multiItemIndependentPackaging: default: false description: 多件独立包装。 type: boolean packagingMaterial: default: false description: 是否包材。 type: boolean serialNumberManagement: default: false description: 是否序列号管理。 type: boolean type: object Dimensions: description: 产品尺寸信息。 properties: lengthCm: description: 长度(厘米)。 example: 20.5 format: double maximum: 10000 minimum: 0 type: number widthCm: description: 宽度(厘米)。 example: 10.5 format: double maximum: 10000 minimum: 0 type: number heightCm: description: 高度(厘米)。 example: 5.5 format: double maximum: 10000 minimum: 0 type: number lengthInch: description: 长度(英寸)。 example: 8.07 format: double maximum: 10000 minimum: 0 type: number widthInch: description: 宽度(英寸)。 example: 4.13 format: double maximum: 10000 minimum: 0 type: number heightInch: description: 高度(英寸)。 example: 2.17 format: double maximum: 10000 minimum: 0 type: number metricVolume: description: 公制体积(立方厘米)。 example: 1127.5 format: double minimum: 0 type: number imperialVolume: description: 英制体积(立方英寸)。 example: 68.83 format: double minimum: 0 type: number type: object Product: allOf: - $ref: '#/components/schemas/PublicBaseEntity' - description: 表示主数据中的产品。 properties: id: description: 产品的唯一标识符。 example: 12345 format: int64 maximum: 9223372036854776000 minimum: 1 readOnly: true type: integer userId: description: 用户ID。 example: 1001 format: int64 maximum: 9223372036854776000 minimum: 1 type: integer spuCode: description: SPU编码,关联产品SPU。使用业务编码而非内部ID。 example: SPU-001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string upc: description: 通用产品代码。 example: "123456789012" pattern: "^[0-9][0-9]{11}$" type: string sku: description: 库存单位。产品的唯一的内部标识符。 example: WIDGET-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string skuCode: description: 外部SKU编码。映射到内部的sku或gsku字段,用于外部系统集成。 example: EXT-WIDGET-001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string gsku: description: 全局库存单位。 example: GSKU-001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string amazonFnSku: description: Amazon FN SKU。 example: FN-SKU-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string serialNumber: description: 序列号。 example: SN-001 maxLength: 100 minLength: 1 pattern: "^[A-Z0-9-]{1,100}$" type: string dimensions: $ref: '#/components/schemas/Dimensions' weight: $ref: '#/components/schemas/Weight' packaging: $ref: '#/components/schemas/Packaging' pricing: $ref: '#/components/schemas/Pricing' attributes: $ref: '#/components/schemas/Attributes' imageUrl: description: 产品图片URL。 example: https://example.com/product-image.jpg maxLength: 2048 type: string status: $ref: '#/components/schemas/ProductStatus' type: object ProductSpu: allOf: - $ref: '#/components/schemas/PublicBaseEntity' - description: 产品SPU信息。 properties: id: description: SPU ID。 format: int64 readOnly: true type: integer userId: description: 用户ID。 format: int64 type: integer spuCode: description: SPU编码。 example: SPU-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string productName: description: 产品名称。 example: Premium Quality Widget maxLength: 200 minLength: 1 type: string description: description: 产品描述。 example: 高品质的产品,适用于多种场景 maxLength: 1000 minLength: 1 type: string category: description: 产品分类。 example: 电子产品 maxLength: 100 minLength: 1 pattern: "^[\\u4e00-\\u9fa5A-Za-z0-9\\s-_]{1,100}$" type: string brand: description: 产品品牌。 example: 知名品牌 maxLength: 100 minLength: 1 pattern: "^[\\u4e00-\\u9fa5A-Za-z0-9\\s-_]{1,100}$" type: string status: $ref: '#/components/schemas/ProductStatus' required: - productName - spuCode type: object ProductCreateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: spuCode: description: SPU编码,关联产品SPU。使用业务编码耏非内部ID。 example: SPU-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string upc: description: 通用产品代码。 example: "123456789012" maxLength: 12 minLength: 12 pattern: "^\\d{12}$" type: string sku: description: 库存单位。产品的唯一的内部标识符。 example: WIDGET-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string amazonFnSku: description: Amazon FN SKU。 example: FN-SKU-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string serialNumber: description: 序列号。 example: SN-001 maxLength: 100 minLength: 1 pattern: "^[A-Z0-9-]{1,100}$" type: string dimensions: $ref: '#/components/schemas/Dimensions' weight: $ref: '#/components/schemas/Weight' packaging: $ref: '#/components/schemas/Packaging' pricing: $ref: '#/components/schemas/Pricing' attributes: $ref: '#/components/schemas/Attributes' imageUrl: description: 产品图片URL。 example: https://example.com/product-image.jpg maxLength: 2048 minLength: 10 pattern: ^https?://.+ type: string required: - packaging - sku - spuCode type: object ProductUpdateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: spuCode: description: SPU编码,关联产品SPU。使用业务编码耏非内部ID。 example: SPU-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string upc: description: 通用产品代码。 example: "123456789012" maxLength: 12 minLength: 12 pattern: "^\\d{12}$" type: string amazonFnSku: description: Amazon FN SKU。 example: FN-SKU-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string serialNumber: description: 序列号。 example: SN-001 maxLength: 100 minLength: 1 pattern: "^[A-Z0-9-]{1,100}$" type: string dimensions: $ref: '#/components/schemas/Dimensions' weight: $ref: '#/components/schemas/Weight' packaging: $ref: '#/components/schemas/Packaging' pricing: $ref: '#/components/schemas/Pricing' attributes: $ref: '#/components/schemas/Attributes' imageUrl: description: 产品图片URL。 example: https://example.com/product-image.jpg maxLength: 2048 minLength: 10 pattern: ^https?://.+ type: string type: object description: 完整更新(PUT)需要所有字段。 ProductPartialUpdateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: spuCode: description: SPU编码,关联产品SPU。使用业务编码耏非内部ID。 example: SPU-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string upc: description: 通用产品代码。 example: "123456789012" maxLength: 12 minLength: 12 pattern: "^\\d{12}$" type: string amazonFnSku: description: Amazon FN SKU。 example: FN-SKU-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string serialNumber: description: 序列号。 example: SN-001 maxLength: 100 minLength: 1 pattern: "^[A-Z0-9-]{1,100}$" type: string dimensions: $ref: '#/components/schemas/Dimensions' weight: $ref: '#/components/schemas/Weight' packaging: $ref: '#/components/schemas/Packaging' pricing: $ref: '#/components/schemas/Pricing' attributes: $ref: '#/components/schemas/Attributes' imageUrl: description: 产品图片URL。 example: https://example.com/product-image.jpg maxLength: 2048 minLength: 10 pattern: ^https?://.+ type: string type: object description: 部分更新(PATCH)的所有字段都是可选的。 ProductSpuCreateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: spuCode: description: SPU编码。 example: SPU-001 maxLength: 50 minLength: 1 pattern: "^[A-Za-z0-9-]{1,50}$" type: string productName: description: 产品名称。 example: Premium Quality Widget maxLength: 200 minLength: 1 type: string description: description: 产品描述。 example: 高品质的产品,适用于多种场景 maxLength: 1000 minLength: 1 type: string category: description: 产品分类。 example: 电子产品 maxLength: 100 minLength: 1 pattern: "^[\\u4e00-\\u9fa5A-Za-z0-9\\s-_]{1,100}$" type: string brand: description: 产品品牌。 example: 知名品牌 maxLength: 100 minLength: 1 pattern: "^[\\u4e00-\\u9fa5A-Za-z0-9\\s-_]{1,100}$" type: string required: - productName type: object ProductSpuUpdateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: productName: description: 产品名称。 example: Premium Quality Widget maxLength: 200 minLength: 1 type: string description: description: 产品描述。 example: 高品质的产品,适用于多种场景 maxLength: 1000 minLength: 1 type: string category: description: 产品分类。 example: 电子产品 maxLength: 100 minLength: 1 pattern: "^[\\u4e00-\\u9fa5A-Za-z0-9\\s-_]{1,100}$" type: string brand: description: 产品品牌。 example: 知名品牌 maxLength: 100 minLength: 1 pattern: "^[\\u4e00-\\u9fa5A-Za-z0-9\\s-_]{1,100}$" type: string required: - productName type: object ProductBatchRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - description: 批量操作请求,支持上游系统批量推送产品数据。 properties: products: description: 产品数组。 items: $ref: '#/components/schemas/ProductCreateRequest' maxItems: 100 minItems: 1 type: array required: - products type: object ProductResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: data: $ref: '#/components/schemas/Product' type: object ProductListResponse: allOf: - $ref: '#/components/schemas/ApiListResponseBase' - properties: data: items: $ref: '#/components/schemas/Product' type: array type: object ProductSpuResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: data: $ref: '#/components/schemas/ProductSpu' type: object ProductSpuListResponse: allOf: - $ref: '#/components/schemas/ApiListResponseBase' - properties: data: items: $ref: '#/components/schemas/ProductSpu' type: array type: object ProductBatchResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - description: 批量操作响应。 properties: data: $ref: '#/components/schemas/ProductBatchResponse_allOf_data' required: - data type: object StockQueryRequest: allOf: - properties: warehouseCode: description: 仓库编码 type: string gsku: description: 产品gsku列表 items: type: string type: array required: - warehouseCode type: object StockQueryResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: data: items: $ref: '#/components/schemas/StockInfo' type: array type: object OutboundOrder: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - description: 订单信息 properties: orderType: description: 单据类型 enum: - DROP_SHIPPING - FBA example: DROP_SHIPPING type: string x-enum-descriptions: - 一件代发 - 直接从仓库发货到客户 - FBA备货中转 - 发货到亚马逊FBA仓库 x-apifox-enum: - value: DROP_SHIPPING name: 一件代发 description: 直接从仓库发货到最终客户,适用于电商业务 - value: FBA name: FBA备货中转 description: 发货到亚马逊FBA仓库进行备货和后续配送 expressChannelsCode: description: 物流渠道代码 type: string labelUrl: description: 自提面单url type: string trackingNo: description: 跟踪号 type: string platformOrderNo: description: 平台单号 type: string warehouseCode: description: 仓库代码 type: string toFullName: description: 收货人 type: string toNumber: description: 收货人联系号码 type: string toCountry: description: 收货国家 type: string toProvince: description: 收货省/州 type: string toCity: description: 收货城市 type: string toAddressLine1: description: 收货地址行1 type: string toAddressLine2: description: 收货地址行2 type: string toZipCode: description: 收货邮编 type: string details: description: 订单sku明细 items: $ref: '#/components/schemas/OutboundOrderDetail' type: array required: - details - expressChannelsCode - platformOrderNo - toAddressLine1 - toCity - toCountry - toFullName - toNumber - toProvince - toZipCode - trackingNo - warehouseCode type: object OutboundOrderDetail: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - description: 订单明细 properties: sku: description: sku编码 type: string quantity: description: 数量 format: int32 type: integer required: - quantity - sku type: object OrderQueryVo: properties: orderType: description: 单据类型 enum: - DROP_SHIPPING - FBA example: DROP_SHIPPING type: string x-enum-descriptions: - 一件代发 - 直接从仓库发货到客户 - FBA备货中转 - 发货到亚马逊FBA仓库 x-apifox-enum: - value: DROP_SHIPPING name: 一件代发 description: 直接从仓库发货到最终客户,适用于电商业务 - value: FBA name: FBA备货中转 description: 发货到亚马逊FBA仓库进行备货和后续配送 orderState: description: 订单出库状态 enum: - DRAFT - NOT_OUT - OUTED - ERROR example: NOT_OUT type: string x-enum-descriptions: - 草稿/已取消 - 订单尚未开始处理或已被取消 - 未出库 - 订单已创建但尚未完成出库 - 已出库 - 订单已完成出库 - 异常 - 订单处理过程中出现异常 x-apifox-enum: - value: DRAFT name: 草稿/已取消 description: 订单尚未开始处理或已被取消,可以修改或删除 - value: NOT_OUT name: 未出库 description: 订单已创建但尚未完成出库,正在处理中 - value: OUTED name: 已出库 description: 订单已完成出库,货物已发出 - value: ERROR name: 异常 description: 订单处理过程中出现异常,需要人工处理 errorMsg: description: 异常信息 type: string trackingNo: description: 运单号 type: string charges: description: 计费项 items: $ref: '#/components/schemas/Charge' type: array customerCode: description: 客户代码 type: string expressChannelCode: description: 物流渠道 type: string platformOrderNo: description: 平台单号 type: string wmsOrderNo: description: wms单号 type: string warehouseCode: description: 仓库代码 type: string toFullName: description: 收货人 type: string toNumber: description: 收货人联系号码 type: string toCountry: description: 收货国家 type: string toProvince: description: 收货省/州 type: string toCity: description: 收货城市 type: string toAddressLine1: description: 收货地址行1 type: string toAddressLine2: description: 收货地址行2 type: string toZipCode: description: 收货邮编 type: string details: items: $ref: '#/components/schemas/OutboundOrderDetail' type: array type: object Charge: properties: name: description: 计费项名称 type: string amount: description: 计费金额 type: number createTime: description: 计费时间 type: string type: object ExpressChannel: description: 物流渠道 properties: channelCode: description: 渠道代码 type: string channelName: description: 渠道名称 type: string selfTag: description: 是否自供面单(1_是) format: int32 type: integer type: object InboundOrder: allOf: - $ref: '#/components/schemas/PublicBaseEntity' - description: 入库单信息 properties: inboundNo: description: 入库单号 example: IB202501130001 maxLength: 50 type: string inboundType: $ref: '#/components/schemas/InboundTypeEnum' arriveMethod: $ref: '#/components/schemas/ArrivalMethodEnum' asnOrderCode: description: 关联预报单编码 example: ASN202501130001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string ownerCode: description: 货主编码 example: OWNER-001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string ownerName: description: 货主名称 example: 示例货主公司 maxLength: 100 readOnly: true type: string warehouseCode: description: 仓库编码 example: WH-BJ-001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string warehouseName: description: 仓库名称 example: 北京仓库 maxLength: 100 readOnly: true type: string status: $ref: '#/components/schemas/InboundOrderStatusEnum' transportType: description: 运输方式 enum: - AIR - SEA - RAIL - TRUCK - EXPRESS - OTHER example: EXPRESS type: string x-enum-descriptions: - 航空运输 - 通过飞机进行的快速运输方式 - 海运运输 - 通过船舶进行的大宗货物运输 - 铁路运输 - 通过火车进行的陆地运输 - 卡车运输 - 通过货车进行的公路运输 - 快递运输 - 通过快递公司进行的小件运输 - 其他运输 - 其他特殊运输方式 x-apifox-enum: - value: AIR name: 航空运输 description: 通过飞机进行的快速运输方式,时效快但成本高 - value: SEA name: 海运运输 description: 通过船舶进行的大宗货物运输,成本低但时效长 - value: RAIL name: 铁路运输 description: 通过火车进行的陆地运输,适用于中远距离大宗货物 - value: TRUCK name: 卡车运输 description: 通过货车进行的公路运输,灵活性高适用于短距离配送 - value: EXPRESS name: 快递运输 description: 通过快递公司进行的小件运输,时效快服务全面 - value: OTHER name: 其他运输 description: 其他特殊运输方式,如管道运输、特种车辆等 expectArriveTime: description: 预期送达时间 example: 2025-01-15T10:00:00Z format: date-time type: string trackingNo: description: 跟踪号(快递单号/运单号) example: SF1234567890 maxLength: 100 type: string carrierCode: description: 承运商编码 example: CARRIER-SF maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string attachmentUrls: description: 附件地址(多个逗号分隔) example: "https://example.com/doc1.pdf,https://example.com/doc2.pdf" maxLength: 2048 type: string totalBoxReceive: description: 已接收箱子总数 example: 5 minimum: 0 type: integer totalSkuReceive: description: 已接收SKU总数 example: 20 minimum: 0 type: integer totalBoxAsn: description: 预报箱子总数 example: 6 minimum: 0 type: integer totalSkuAsn: description: 预报SKU总数 example: 25 minimum: 0 type: integer lastReceiveTime: description: 最后接收时间 example: 2025-01-13T15:30:00Z format: date-time type: string isMetric: default: true description: 是否使用公制单位 example: true type: boolean remark: description: 备注 example: 特殊处理要求 maxLength: 500 type: string type: object InboundOrderDetail: allOf: - $ref: '#/components/schemas/PublicBaseEntity' - description: 入库单明细信息 properties: boxCode: description: 箱子编码 example: BOX-001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string skuCode: description: 商品编码(外部SKU编码,映射到内部sku或gsku) example: EXT-WIDGET-001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string skuName: description: 商品名称 example: 高品质小工具 maxLength: 200 readOnly: true type: string quantity: description: 产品数量 example: 10 minimum: 1 type: integer dimensions: $ref: '#/components/schemas/InboundDimensions' weight: $ref: '#/components/schemas/InboundWeight' expirationDate: description: 到期日期 example: 2025-12-31 format: date type: string productionDate: description: 生产日期 example: 2025-01-01 format: date type: string skuAttributes: description: SKU扩展属性(JSON格式) example: "{\"color\": \"red\", \"size\": \"L\"}" maxLength: 1000 type: string inTransitQuantity: description: 在途库存 example: 5 minimum: 0 type: integer type: object InboundOrderBox: allOf: - $ref: '#/components/schemas/PublicBaseEntity' - description: 入库单箱子信息 properties: boxNo: description: 箱号 example: BOX-001 maxLength: 50 type: string boxStartNo: description: 起始箱号 example: 1 minimum: 1 type: integer boxEndNo: description: 结束箱号 example: 5 minimum: 1 type: integer boxCount: description: 箱子数量 example: 5 minimum: 1 type: integer dimensions: $ref: '#/components/schemas/InboundDimensions' weight: $ref: '#/components/schemas/InboundWeight' totalVolume: description: 总体积 example: 1580.25 format: double minimum: 0 type: number totalWeight: description: 总重量 example: 6.25 format: double minimum: 0 type: number details: description: 箱内明细列表 items: $ref: '#/components/schemas/InboundOrderDetail' type: array type: object InboundOrderCreateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: inboundNo: description: 入库单号(如不提供系统自动生成) example: IB202501130001 maxLength: 50 type: string inboundType: $ref: '#/components/schemas/InboundTypeEnum' arriveMethod: $ref: '#/components/schemas/ArrivalMethodEnum' asnOrderCode: description: 关联预报单编码 example: ASN202501130001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string warehouseCode: description: 仓库编码 example: WH-BJ-001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string transportType: description: 运输方式 enum: - AIR - SEA - RAIL - TRUCK - EXPRESS - OTHER example: EXPRESS type: string x-enum-descriptions: - 航空运输 - 通过飞机进行的快速运输方式 - 海运运输 - 通过船舶进行的大宗货物运输 - 铁路运输 - 通过火车进行的陆地运输 - 卡车运输 - 通过货车进行的公路运输 - 快递运输 - 通过快递公司进行的小件运输 - 其他运输 - 其他特殊运输方式 x-apifox-enum: - value: AIR name: 航空运输 description: 通过飞机进行的快速运输方式,时效快但成本高 - value: SEA name: 海运运输 description: 通过船舶进行的大宗货物运输,成本低但时效长 - value: RAIL name: 铁路运输 description: 通过火车进行的陆地运输,适用于中远距离大宗货物 - value: TRUCK name: 卡车运输 description: 通过货车进行的公路运输,灵活性高适用于短距离配送 - value: EXPRESS name: 快递运输 description: 通过快递公司进行的小件运输,时效快服务全面 - value: OTHER name: 其他运输 description: 其他特殊运输方式,如管道运输、特种车辆等 expectArriveTime: description: 预期送达时间 example: 2025-01-15T10:00:00Z format: date-time type: string trackingNo: description: 跟踪号(快递单号/运单号) example: SF1234567890 maxLength: 100 type: string carrierCode: description: 承运商编码 example: CARRIER-SF maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string attachmentUrls: description: 附件地址(多个逗号分隔) example: https://example.com/doc1.pdf maxLength: 2048 type: string remark: description: 备注 example: 特殊处理要求 maxLength: 500 type: string boxes: description: 入库单箱子列表 items: $ref: '#/components/schemas/InboundOrderBoxCreateRequest' minItems: 1 type: array required: - inboundType - warehouseCode type: object InboundOrderDetailCreateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: skuCode: description: 商品编码(外部SKU编码,映射到内部sku或gsku) example: EXT-WIDGET-001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string quantity: description: 产品数量 example: 10 minimum: 1 type: integer skuAttributes: description: SKU扩展属性(JSON格式) example: "{\"color\": \"red\", \"size\": \"L\"}" maxLength: 1000 type: string required: - quantity - skuCode type: object InboundOrderBoxCreateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: boxCount: description: 箱子数量 minimum: 1 type: integer details: description: 箱内明细列表 items: $ref: '#/components/schemas/InboundOrderDetailCreateRequest' minItems: 1 type: array required: - boxCount type: object InboundOrderUpdateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: inboundType: $ref: '#/components/schemas/InboundTypeEnum' arriveMethod: $ref: '#/components/schemas/ArrivalMethodEnum' asnOrderCode: description: 关联预报单编码 example: ASN202501130001 maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string transportType: description: 运输方式 enum: - AIR - SEA - RAIL - TRUCK - EXPRESS - OTHER example: EXPRESS type: string x-enum-descriptions: - 航空运输 - 通过飞机进行的快速运输方式 - 海运运输 - 通过船舶进行的大宗货物运输 - 铁路运输 - 通过火车进行的陆地运输 - 卡车运输 - 通过货车进行的公路运输 - 快递运输 - 通过快递公司进行的小件运输 - 其他运输 - 其他特殊运输方式 x-apifox-enum: - value: AIR name: 航空运输 description: 通过飞机进行的快速运输方式,时效快但成本高 - value: SEA name: 海运运输 description: 通过船舶进行的大宗货物运输,成本低但时效长 - value: RAIL name: 铁路运输 description: 通过火车进行的陆地运输,适用于中远距离大宗货物 - value: TRUCK name: 卡车运输 description: 通过货车进行的公路运输,灵活性高适用于短距离配送 - value: EXPRESS name: 快递运输 description: 通过快递公司进行的小件运输,时效快服务全面 - value: OTHER name: 其他运输 description: 其他特殊运输方式,如管道运输、特种车辆等 expectArriveTime: description: 预期送达时间 example: 2025-01-15T10:00:00Z format: date-time type: string trackingNo: description: 跟踪号(快递单号/运单号) example: SF1234567890 maxLength: 100 type: string carrierCode: description: 承运商编码 example: CARRIER-SF maxLength: 50 pattern: "^[A-Za-z0-9-]{1,50}$" type: string attachmentUrls: description: 附件地址(多个逗号分隔) example: https://example.com/doc1.pdf maxLength: 2048 type: string remark: description: 备注 example: 特殊处理要求 maxLength: 500 type: string boxes: description: 入库单箱子列表 items: $ref: '#/components/schemas/InboundOrderBoxCreateRequest' type: array type: object InboundOrderStatusUpdateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: status: $ref: '#/components/schemas/InboundOrderStatusEnum' remark: description: 状态变更备注 example: 审核通过 maxLength: 500 type: string required: - status type: object InboundOrderResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: data: $ref: '#/components/schemas/InboundOrder' type: object InboundOrderDetailResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: data: $ref: '#/components/schemas/InboundOrderDetailResponse_allOf_data' type: object InboundOrderListResponse: allOf: - $ref: '#/components/schemas/ApiListResponseBase' - properties: data: items: $ref: '#/components/schemas/InboundOrder' type: array type: object Address: properties: province: description: 省/州/郦 example: California maxLength: 100 minLength: 1 type: string city: description: 城市 example: 苏州市 maxLength: 100 minLength: 1 type: string zipCode: description: 邮编 example: "215000" maxLength: 100 pattern: "^[0-9A-Z-]{1,100}$" type: string addressLine1: description: 地址行1 example: 苏州工业园区星湖街328号 maxLength: 100 minLength: 1 type: string addressLine2: description: 地址行2(可选) example: 创意产业园A栋 maxLength: 100 type: string country: $ref: '#/components/schemas/Country' required: - addressLine1 - city - country - province - zipCode type: object ContactInfo: properties: contacts: description: 联系人 example: John Smith maxLength: 50 minLength: 1 type: string phone: description: 电话 example: +1-555-123-4567 maxLength: 20 pattern: "^[\\+]?[0-9\\s\\-\\(\\)\\.\\ ]{7,20}$" type: string email: description: 邮箱 example: contact@warehouse.com format: email maxLength: 30 type: string required: - contacts - phone type: object Warehouse: allOf: - $ref: '#/components/schemas/PublicBaseEntity' - properties: warehouseId: description: 仓库唯一标识 example: 1001 format: int64 type: integer code: description: 仓库编码 example: WH001 maxLength: 20 minLength: 1 pattern: "^[A-Z0-9-]{1,20}$" type: string name: description: 仓库名称 example: Los Angeles Warehouse maxLength: 40 minLength: 1 type: string address: $ref: '#/components/schemas/Address' contactInfo: $ref: '#/components/schemas/ContactInfo' currency: $ref: '#/components/schemas/Currency' enterprise: description: 公司 example: ABC Logistics Inc. maxLength: 50 type: string recipient: description: 收件人 example: Warehouse Manager maxLength: 64 minLength: 1 type: string sort: description: 排序 example: 1 format: int64 maximum: 9999 minimum: 0 type: integer remark: description: 备注 example: 华东区主要仓库 maxLength: 500 type: string status: $ref: '#/components/schemas/EntityStatus' required: - code - name - status - warehouseId type: object Zone: allOf: - $ref: '#/components/schemas/PublicBaseEntity' - properties: zoneId: description: 库区唯一标识 example: 2001 format: int64 type: integer warehouseId: description: 所属仓库ID example: 1001 format: int64 type: integer warehouseName: description: 所属仓库名称 example: 苏州主仓 type: string code: description: 库区编码 example: ZN001 maxLength: 20 minLength: 1 pattern: "^[A-Z0-9-]{1,20}$" type: string name: description: 库区名称 example: A区 maxLength: 100 minLength: 1 type: string priority: description: 优先级 example: 1 format: int64 maximum: 999 minimum: 1 type: integer zoneType: description: 库区类型 enum: - STORAGE - PICKING - PACKING - STAGING - DOCK - RETURNS - QUARANTINE example: STORAGE type: string x-enum-descriptions: - 存储区 - 主要用于商品存储 - 拣货区 - 用于订单拣货作业 - 打包区 - 用于商品打包作业 - 暂存区 - 临时存放区域 - 月台区 - 车辆装卸区域 - 退货区 - 退货处理区域 - 隔离区 - 问题商品隔离区域 x-apifox-enum: - value: STORAGE name: 存储区 description: 主要用于商品存储,包括普通存储和特殊存储 - value: PICKING name: 拣货区 description: 用于订单拣货作业,提高拣货效率 - value: PACKING name: 打包区 description: 用于商品打包作业,包括单件和批量打包 - value: STAGING name: 暂存区 description: 临时存放区域,用于中转和缓冲 - value: DOCK name: 月台区 description: 车辆装卸区域,连接内外部运输 - value: RETURNS name: 退货区 description: 退货处理区域,处理客户退回商品 - value: QUARANTINE name: 隔离区 description: 问题商品隔离区域,用于质量检查和处理 remark: description: 备注 example: 主要存储区域 maxLength: 500 type: string status: $ref: '#/components/schemas/EntityStatus' required: - code - name - status - warehouseId - zoneId type: object Location: allOf: - $ref: '#/components/schemas/PublicBaseEntity' - properties: locationId: description: 库位唯一标识 example: 3001 format: int64 type: integer warehouseId: description: 所属仓库ID example: 1001 format: int64 type: integer zoneId: description: 所属库区ID example: 2001 format: int64 type: integer warehouseName: description: 所属仓库名称 example: 苏州主仓 type: string zoneName: description: 所属库区名称 example: A区 type: string code: description: 库位编码 example: A01-01-01 maxLength: 30 minLength: 1 pattern: "^[A-Z0-9-]{1,30}$" type: string sort: description: 排序/优先级 example: 1 format: int64 maximum: 9999 minimum: 0 type: integer remark: description: 备注 example: 靠近出入口的库位 maxLength: 500 type: string status: $ref: '#/components/schemas/EntityStatus' required: - code - locationId - status - warehouseId - zoneId type: object WarehouseCreateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: code: description: 仓库编码 example: WH001 maxLength: 20 minLength: 1 pattern: "^[A-Z0-9-]{1,20}$" type: string name: description: 仓库名称 example: Los Angeles Warehouse maxLength: 40 minLength: 1 type: string province: description: 省/州/郦 example: California maxLength: 100 minLength: 1 type: string city: description: 城市 example: Los Angeles maxLength: 100 minLength: 1 type: string zipCode: description: 邮编/邮政编码 example: "90210" maxLength: 20 pattern: "^[A-Za-z0-9\\s-]{1,20}$" type: string addressLine1: description: 地址行1 example: 123 Main Street maxLength: 100 minLength: 1 type: string addressLine2: description: 地址行2(可选) example: Suite 100 maxLength: 100 type: string country: $ref: '#/components/schemas/Country' currency: $ref: '#/components/schemas/Currency' enterprise: description: 公司 example: ABC Logistics Inc. maxLength: 50 type: string contacts: description: 联系人 example: John Smith maxLength: 50 minLength: 1 type: string phone: description: 电话 example: +1-555-123-4567 maxLength: 20 pattern: "^[\\+]?[0-9\\s\\-\\(\\)\\.\\ ]{7,20}$" type: string email: description: 邮箱 example: contact@warehouse.com format: email maxLength: 30 type: string recipient: description: 收件人 example: Warehouse Manager maxLength: 64 minLength: 1 type: string sort: description: 排序 example: 1 format: int32 maximum: 255 minimum: 0 type: integer remark: description: 备注 example: 华东区主要仓库 maxLength: 500 type: string required: - addressLine1 - city - code - contacts - country - currency - name - phone - province - recipient - zipCode type: object WarehouseUpdateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: name: description: 仓库名称 example: Los Angeles Warehouse maxLength: 40 minLength: 1 type: string province: description: 省/州/郦 example: California maxLength: 100 minLength: 1 type: string city: description: 城市 example: Los Angeles maxLength: 100 minLength: 1 type: string zipCode: description: 邮编/邮政编码 example: "90210" maxLength: 20 pattern: "^[A-Za-z0-9\\s-]{1,20}$" type: string addressLine1: description: 地址行1 example: 123 Main Street maxLength: 100 minLength: 1 type: string addressLine2: description: 地址行2(可选) example: Suite 100 maxLength: 100 type: string country: $ref: '#/components/schemas/Country' currency: $ref: '#/components/schemas/Currency' enterprise: description: 公司 example: ABC Logistics Inc. maxLength: 50 type: string contacts: description: 联系人 example: John Smith maxLength: 50 minLength: 1 type: string phone: description: 电话 example: +1-555-123-4567 maxLength: 20 pattern: "^[\\+]?[0-9\\s\\-\\(\\)\\.\\ ]{7,20}$" type: string email: description: 邮箱 example: contact@warehouse.com format: email maxLength: 30 type: string recipient: description: 收件人 example: Warehouse Manager maxLength: 64 minLength: 1 type: string sort: description: 排序 example: 1 format: int32 maximum: 255 minimum: 0 type: integer remark: description: 备注 example: 华东区主要仓库 maxLength: 500 type: string required: - addressLine1 - city - contacts - country - currency - name - phone - province - recipient - zipCode type: object ZoneCreateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: warehouseId: description: 所属仓库ID example: 1001 format: int64 type: integer code: description: 库区编码 example: ZN001 type: string name: description: 库区名称 example: A区 type: string priority: description: 优先级 example: 1 format: int64 maximum: 999 minimum: 1 type: integer zoneType: description: 库区类型 enum: - STORAGE - PICKING - PACKING - STAGING - DOCK - RETURNS - QUARANTINE example: STORAGE type: string x-enum-descriptions: - 存储区 - 主要用于商品存储 - 拣货区 - 用于订单拣货作业 - 打包区 - 用于商品打包作业 - 暂存区 - 临时存放区域 - 月台区 - 车辆装卸区域 - 退货区 - 退货处理区域 - 隔离区 - 问题商品隔离区域 x-apifox-enum: - value: STORAGE name: 存储区 description: 主要用于商品存储,包括普通存储和特殊存储 - value: PICKING name: 拣货区 description: 用于订单拣货作业,提高拣货效率 - value: PACKING name: 打包区 description: 用于商品打包作业,包括单件和批量打包 - value: STAGING name: 暂存区 description: 临时存放区域,用于中转和缓冲 - value: DOCK name: 月台区 description: 车辆装卸区域,连接内外部运输 - value: RETURNS name: 退货区 description: 退货处理区域,处理客户退回商品 - value: QUARANTINE name: 隔离区 description: 问题商品隔离区域,用于质量检查和处理 remark: description: 备注 example: 主要存储区域 maxLength: 500 type: string required: - code - name - warehouseId type: object ZoneUpdateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: name: description: 库区名称 example: A区 type: string priority: description: 优先级 example: 1 format: int64 maximum: 999 minimum: 1 type: integer zoneType: description: 库区类型 enum: - STORAGE - PICKING - PACKING - STAGING - DOCK - RETURNS - QUARANTINE example: STORAGE type: string x-enum-descriptions: - 存储区 - 主要用于商品存储 - 拣货区 - 用于订单拣货作业 - 打包区 - 用于商品打包作业 - 暂存区 - 临时存放区域 - 月台区 - 车辆装卸区域 - 退货区 - 退货处理区域 - 隔离区 - 问题商品隔离区域 x-apifox-enum: - value: STORAGE name: 存储区 description: 主要用于商品存储,包括普通存储和特殊存储 - value: PICKING name: 拣货区 description: 用于订单拣货作业,提高拣货效率 - value: PACKING name: 打包区 description: 用于商品打包作业,包括单件和批量打包 - value: STAGING name: 暂存区 description: 临时存放区域,用于中转和缓冲 - value: DOCK name: 月台区 description: 车辆装卸区域,连接内外部运输 - value: RETURNS name: 退货区 description: 退货处理区域,处理客户退回商品 - value: QUARANTINE name: 隔离区 description: 问题商品隔离区域,用于质量检查和处理 remark: description: 备注 example: 主要存储区域 maxLength: 500 type: string required: - name type: object LocationCreateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: warehouseId: description: 所属仓库ID example: 1001 format: int64 type: integer zoneId: description: 所属库区ID example: 2001 format: int64 type: integer code: description: 库位编码 example: A01-01-01 type: string sort: description: 排序/优先级 example: 1 format: int64 maximum: 9999 minimum: 0 type: integer remark: description: 备注 example: 靠近出入口的库位 maxLength: 500 type: string required: - code - warehouseId - zoneId type: object LocationUpdateRequest: allOf: - $ref: '#/components/schemas/ExtensibleRequest' - properties: sort: description: 排序/优先级 example: 1 format: int64 maximum: 9999 minimum: 0 type: integer remark: description: 备注 example: 靠近出入口的库位 maxLength: 500 type: string type: object WarehouseResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: data: $ref: '#/components/schemas/Warehouse' type: object WarehouseListResponse: allOf: - $ref: '#/components/schemas/ApiListResponseBase' - properties: data: items: $ref: '#/components/schemas/Warehouse' type: array type: object ZoneResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: data: $ref: '#/components/schemas/Zone' type: object ZoneListResponse: allOf: - $ref: '#/components/schemas/ApiListResponseBase' - properties: data: items: $ref: '#/components/schemas/Zone' type: array type: object LocationResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: data: $ref: '#/components/schemas/Location' type: object LocationListResponse: allOf: - $ref: '#/components/schemas/ApiListResponseBase' - properties: data: items: $ref: '#/components/schemas/Location' type: array type: object ChargeTransaction: description: 计费流水信息 properties: customerCode: description: 客户编码 type: string warehouseCode: description: 仓库编码 type: string transactionsCode: description: 流水单号 type: string bizBillNo: description: 业务单号 type: string money: description: 金额 type: string currency: description: 币种 type: string bizType: description: 业务类型 type: string chargeStatus: description: 计费状态 type: string paymentStatus: description: 扣费状态 type: string billingStatus: description: 出账状态 type: string chargeTime: description: 计费时间 format: date-time type: string remark: description: 备注 type: string type: object ChargeTransactionResponse: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: data: $ref: '#/components/schemas/ChargeTransaction' type: object ChargeTransactionListResponse: allOf: - $ref: '#/components/schemas/ApiListResponseBase' - properties: data: items: $ref: '#/components/schemas/ChargeTransaction' type: array type: object SortDirection: description: 排序方向枚举 enum: - ASC - DESC example: ASC type: string x-enum-descriptions: - 升序排列 - 从小到大或从A到Z - 降序排列 - 从大到小或从Z到A x-apifox-enum: - value: ASC name: 升序 description: 升序排列 - 数值从小到大,字母从A到Z,日期从早到晚 - value: DESC name: 降序 description: 降序排列 - 数值从大到小,字母从Z到A,日期从晚到早 EntityStatus: description: 实体状态枚举 enum: - ENABLED - DISABLED example: ENABLED type: string x-enum-descriptions: - 已启用 - 实体正常可用 - 已禁用 - 实体暂停使用 x-apifox-enum: - value: ENABLED name: 已启用 description: 实体处于正常可用状态,可以进行相关业务操作 - value: DISABLED name: 已禁用 description: 实体暂停使用,不可进行相关业务操作但保留数据 ApiListResponseBase: allOf: - $ref: '#/components/schemas/ApiResponseBase' - properties: pagination: $ref: '#/components/schemas/Pagination' type: object PublicBaseEntity: description: 所有业务实体的基础字段,包含审计信息 properties: createBy: description: 创建者ID example: 1 format: int64 type: integer createTime: description: 创建时间 example: 2024-01-01T10:00:00Z format: date-time type: string updateBy: description: 更新者ID example: 1 format: int64 type: integer updateTime: description: 更新时间 example: 2024-01-01T10:30:00Z format: date-time type: string params: additionalProperties: true description: 扩展参数 example: key1: value1 key2: value2 type: object type: object Country: description: 支持的国家代码(ISO 3166-1 alpha-2标准) enum: - US - CA - CN example: US type: string x-enum-descriptions: - 美国 (United States) - 加拿大 (Canada) - 中国 (China) x-apifox-enum: - value: US name: 美国 description: United States - 美利坚合众国 - value: CA name: 加拿大 description: Canada - 加拿大联邦 - value: CN name: 中国 description: China - 中华人民共和国 Currency: description: 支持的货币代码 enum: - USD - CAD - CNY - EUR - GBP - JPY - MXN - AUD - SGD - HKD - KRW example: USD type: string x-enum-descriptions: - 美元 (United States Dollar) - 加元 (Canadian Dollar) - 人民币 (Chinese Yuan) - 欧元 (Euro) - 英镑 (British Pound) - 日元 (Japanese Yen) - 墨西哥比索 (Mexican Peso) - 澳元 (Australian Dollar) - 新加坡元 (Singapore Dollar) - 港币 (Hong Kong Dollar) - 韩元 (South Korean Won) x-apifox-enum: - value: USD name: 美元 description: United States Dollar - 美国官方货币 - value: CAD name: 加元 description: Canadian Dollar - 加拿大官方货币 - value: CNY name: 人民币 description: Chinese Yuan - 中华人民共和国官方货币 - value: EUR name: 欧元 description: Euro - 欧盟统一货币 - value: GBP name: 英镑 description: British Pound - 英国官方货币 - value: JPY name: 日元 description: Japanese Yen - 日本官方货币 - value: MXN name: 墨西哥比索 description: Mexican Peso - 墨西哥官方货币 - value: AUD name: 澳元 description: Australian Dollar - 澳大利亚官方货币 - value: SGD name: 新加坡元 description: Singapore Dollar - 新加坡官方货币 - value: HKD name: 港币 description: Hong Kong Dollar - 香港特别行政区官方货币 - value: KRW name: 韩元 description: South Korean Won - 韩国官方货币 ExtensibleRequest: properties: params: additionalProperties: true description: "扩展参数,Map类型,用于后期扩展" example: custom_field: some_value another_field: nested: true type: object type: object ProductStatus: description: 产品状态枚举 enum: - ACTIVE - INACTIVE - DRAFT example: ACTIVE type: string x-enum-descriptions: - 激活状态 - 产品可正常使用和销售 - 非激活状态 - 产品暂停使用但保留记录 - 草稿状态 - 产品处于编辑中尚未发布 x-apifox-enum: - value: ACTIVE name: 激活状态 description: 产品可正常使用和销售,支持库存管理和订单处理 - value: INACTIVE name: 非激活状态 description: 产品暂停使用但保留历史记录,不支持新的业务操作 - value: DRAFT name: 草稿状态 description: 产品处于编辑中尚未发布,需要完善信息后才能激活 InboundTypeEnum: description: 入库类型枚举 enum: - DROPSHIPPING - FBA_PREP - DEVAN_TRANSFER - RELABELING - RETURN_HANDLING example: DROPSHIPPING type: string x-enum-descriptions: - 一件代发入库 - 直接从供应商发货到客户的商品入库 - FBA备货入库 - 为亚马逊FBA准备的商品入库和预处理 - 拆柜转库 - 从集装箱拆货后转移到仓库的入库 - 重贴标入库 - 需要重新贴标或换标的商品入库 - 退货处理入库 - 客户退回商品的处理和重新入库 x-apifox-enum: - value: DROPSHIPPING name: 一件代发 description: 直接从供应商发货到客户的商品入库,通常用于跨境电商业务 - value: FBA_PREP name: FBA备货 description: 为亚马逊FBA准备的商品入库和预处理,包括标签、包装等服务 - value: DEVAN_TRANSFER name: 拆柜转库 description: 从集装箱拆货后转移到仓库的入库,常用于海运货物处理 - value: RELABELING name: 重贴标 description: 需要重新贴标或换标的商品入库,通常涉及品牌或规格变更 - value: RETURN_HANDLING name: 退货处理 description: 客户退回商品的处理和重新入库,需要质量检查和状态更新 InboundOrderStatusEnum: description: 入库单状态枚举 enum: - DRAFT - PENDING_APPROVAL - APPROVED - PARTIALLY_RECEIVED - RECEIVED - CANCELLED - PARTIALLY_PUTAWAY - PUTAWAY_COMPLETED example: DRAFT type: string x-enum-descriptions: - 草稿 - 入库单初始创建状态,可编辑修改 - 待审核 - 已提交审核,等待审批通过 - 已审核待入库 - 审核通过,等待货物到达仓库 - 部分收货 - 部分货物已到达并收货 - 全部收货 - 所有货物已到达并收货完成 - 已取消 - 入库单已被取消,不再处理 - 部分上架 - 部分货物已完成上架入库 - 全部上架 - 所有货物已完成上架,入库作业完成 x-apifox-enum: - value: DRAFT name: 草稿 description: 入库单初始创建状态,可编辑修改,尚未提交审核 - value: PENDING_APPROVAL name: 待审核 description: 已提交审核,等待审批通过,此时不可修改入库单信息 - value: APPROVED name: 已审核待入库 description: 审核通过,等待货物到达仓库,可以开始接收货物 - value: PARTIALLY_RECEIVED name: 部分收货 description: 部分货物已到达并收货,仍有货物在途或待收 - value: RECEIVED name: 全部收货 description: 所有货物已到达并收货完成,可以开始上架作业 - value: CANCELLED name: 已取消 description: 入库单已被取消,不再处理,通常由于业务变更或异常 - value: PARTIALLY_PUTAWAY name: 部分上架 description: 部分货物已完成上架入库,仍有货物待上架 - value: PUTAWAY_COMPLETED name: 全部上架 description: 所有货物已完成上架,入库作业完成,可用于出库 ArrivalMethodEnum: description: 到仓方式枚举 enum: - LCL_LT25KG - PALLET_STD - PALLET_NON_STD - FCL_20GP - FCL_20HQ - FCL_40GP - FCL_40HQ - FCL_45GP - FCL_45HQ example: LCL_LT25KG type: string x-enum-descriptions: - 散箱-不超过25KG - 小件散装货物,重量不超过25公斤 - 标准托盘 - 使用标准尺寸托盘运输的货物 - 非标准托盘 - 使用非标准尺寸托盘运输的货物 - 20尺柜 - 20英尺标准集装箱 - 20尺高柜 - 20英尺高立方集装箱 - 40尺柜 - 40英尺标准集装箱 - 40尺高柜 - 40英尺高立方集装箱 - 45尺柜 - 45英尺标准集装箱 - 45尺高柜 - 45英尺高立方集装箱 x-apifox-enum: - value: LCL_LT25KG name: 散箱-不超过25KG description: 小件散装货物,重量不超过25公斤,适用于小批量货物运输 - value: PALLET_STD name: 标准托盘 description: 使用标准尺寸托盘运输的货物,便于机械化装卸操作 - value: PALLET_NON_STD name: 非标准托盘 description: 使用非标准尺寸托盘运输的货物,需要特殊处理设备 - value: FCL_20GP name: 20尺柜 description: 20英尺标准集装箱,内部尺寸约5.9m×2.3m×2.4m - value: FCL_20HQ name: 20尺高柜 description: 20英尺高立方集装箱,内部尺寸约5.9m×2.3m×2.7m - value: FCL_40GP name: 40尺柜 description: 40英尺标准集装箱,内部尺寸约12m×2.3m×2.4m - value: FCL_40HQ name: 40尺高柜 description: 40英尺高立方集装箱,内部尺寸约12m×2.3m×2.7m - value: FCL_45GP name: 45尺柜 description: 45英尺标准集装箱,内部尺寸约13.5m×2.3m×2.4m - value: FCL_45HQ name: 45尺高柜 description: 45英尺高立方集装箱,内部尺寸约13.5m×2.3m×2.7m InboundDimensions: description: 尺寸信息 properties: length: description: 长度 example: 20.5 format: double minimum: 0 type: number width: description: 宽度 example: 15.5 format: double minimum: 0 type: number height: description: 高度 example: 10.5 format: double minimum: 0 type: number type: object InboundWeight: description: 重量信息 properties: weight: description: 重量 example: 1.25 format: double minimum: 0 type: number type: object StockDetailInfo: properties: status: description: 库存状态(合格、不合格) enum: - QUALIFIED - UNQUALIFIED example: QUALIFIED type: string x-enum-descriptions: - 合格 - 质量符合标准的库存 - 不合格 - 质量不符合标准的库存 x-apifox-enum: - value: QUALIFIED name: 合格 description: 质量符合标准的库存,可以正常销售和发货 - value: UNQUALIFIED name: 不合格 description: 质量不符合标准的库存,需要处理或隔离 age: description: 库龄(天) type: integer num: description: 数量 type: integer gsku: description: 产品gsku type: string type: object StockInfo: properties: warehouseCode: description: 仓库编码 type: string gsku: description: 产品gsku type: string productName: description: 产品名称 type: string length: description: 产品长度(Inch) format: double type: number width: description: 产品宽度(Inch) format: double type: number height: description: 产品高度(Inch) format: double type: number weight: description: 产品重量(LB) format: double type: number qualified: description: 合格总数 type: integer unqualified: description: 不合格总数 type: integer details: items: $ref: '#/components/schemas/StockDetailInfo' type: array type: object StockPageListResponse: allOf: - $ref: '#/components/schemas/ApiListResponseBase' - properties: data: items: $ref: '#/components/schemas/StockInfo' type: array type: object OutboundOrderListResponse: allOf: - $ref: '#/components/schemas/ApiListResponseBase' - properties: data: items: $ref: '#/components/schemas/OrderQueryVo' type: array type: object ChargeBizType: description: 业务类型枚举 enum: - inbound - warehouseInternal - outbound - warehouseRent - order - other example: inbound type: string x-enum-descriptions: - 入库 - 库中 - 出库 - 仓租 - 工单 - 其他 x-apifox-enum: - value: inbound name: 入库 - value: warehouseInternal name: 库中 - value: outbound name: 出库 - value: warehouseRent name: 仓租 - value: order name: 工单 - value: other name: 其他 ChargeStatus: description: 计费状态枚举 enum: - "-1" - "0" - "1" - "2" - "3" example: "1" type: string x-enum-descriptions: - 计费异常 - 未计费 - 已计费 - 重新计费 - 已作废 x-apifox-enum: - value: "-1" name: 计费异常 - value: "0" name: 未计费 - value: "1" name: 已计费 - value: "2" name: 重新计费 - value: "3" name: 已作废 TokenRequest: example: clientId: EOUSSQNWMRVX15GA apiKey: 8MO5994KEQMEZMAN clientSecret: tiy3dbyW8l5W06sFQwsjOIU8-xTLbRJJVtxreGlka8Y= properties: clientId: description: | 系统管理员生成的客户端ID,32位大写字母和数字组合。 每个上游系统都有唯一的clientId,用于标识和追踪API访问。 example: EOUSSQNWMRVX15GA maxLength: 32 minLength: 32 pattern: "^[A-Z0-9]{32}$" type: string clientSecret: description: | 系统管理员生成的客户端密钥,Base64编码的64字节随机字符串。 此密钥只在生成时显示一次,请妥善保存。 example: tiy3dbyW8l5W06sFQwsjOIU8-xTLbRJJVtxreGlka8Y= maxLength: 44 minLength: 43 type: string apiKey: description: | 仓库用户生成的API密钥,32位大写字母和数字组合。 关联到特定仓库和权限范围,决定了访问令牌的权限。 example: 8MO5994KEQMEZMAN maxLength: 32 minLength: 32 pattern: "^[A-Z0-9]{32}$" type: string required: - apiKey - clientId - clientSecret type: object TokenResponse: example: access_token: eyJraWQiOiI3ZTUxOWIwOS01ZWQ0LTRhZTctYjk4NS1lYWRlNjM0N2IzZDkiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxOTI3OTgyMzMzNjI4MzcwOTQ1IiwiYXVkIjoiRU9VU1NRTldNUlZYMTVHQSIsInVzZXJfaWQiOiIxOTI3OTgyMzMzNjI4MzcwOTQ1IiwiYXBpX2tleSI6IjhNTzU5OTRLRVFNRVpNQU4iLCJzeXN0ZW1faWQiOiJnd21zLWRldiIsInZlbmRvciI6InRlc3RfdmViZG9yIiwic2NvcGUiOiJpbnZlbnRvcnk6cmVhZCBvcmRlcjpyZWFkIGFwaTpyZWFkIHdhcmVob3VzZTpyZWFkIiwiaXNzIjoiaHR0cHM6Ly9nd21zLmptYWxsdGVjaC5jb20vYXBpLWdhdGV3YXkvYXV0aC1hcGkiLCJleHAiOjE3NTMzNTQ4NzYsImlhdCI6MTc1MzM1MTI3NiwiY2xpZW50X2lkIjoiRU9VU1NRTldNUlZYMTVHQSJ9.lOIqdQdGEkAM8kX93sPYISHKqNuQZQnTwMoJIkOkBFRsCCyarMthOp5akFqyuI15c3odEpdgXWWpB6gN5Zk_ikU1OViG1mDMSvlTcoFkm6b65ocF_j6PXb8YxfdVRobcQPjN22lfy8XoB1DCLbmSQGptYdfmjRWflKw23fMoCJxcxZ26_bVtKOmywP8qBg3WwGSk8GB45QPsXxMOHCsdCx9lZkWNrMpmVk-Pa2d0vH8Ty1raA0HSWw7VixZNMwLfrDlGtEuxQZWBS_ohwfDCjhHewnKzt_n35FaLnt4CRikTp0UUt71TnpUU0nkt4sqWLiky3RlGxqaeRCqP8a1WGQ api_key: 8MO5994KEQMEZMAN user_id: "1927982333628370945" system_id: gwms-dev vendor: test_vebdor scope: inventory:read order:read api:read warehouse:read token_type: Bearer expires_in: 3600 client_id: EOUSSQNWMRVX15GA properties: access_token: description: | JWT访问令牌,用于后续API调用的身份验证。 令牌包含用户身份、权限范围和过期时间等信息。 example: eyJraWQiOiI3ZTUxOWIwOS01ZWQ0LTRhZTctYjk4NS1lYWRlNjM0N2IzZDkiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxOTI3OTgyMzMzNjI4MzcwOTQ1IiwiYXVkIjoiRU9VU1NRTldNUlZYMTVHQSIsInVzZXJfaWQiOiIxOTI3OTgyMzMzNjI4MzcwOTQ1IiwiYXBpX2tleSI6IjhNTzU5OTRLRVFNRVpNQU4iLCJzeXN0ZW1faWQiOiJnd21zLWRldiIsInZlbmRvciI6InRlc3RfdmViZG9yIiwic2NvcGUiOiJpbnZlbnRvcnk6cmVhZCBvcmRlcjpyZWFkIGFwaTpyZWFkIHdhcmVob3VzZTpyZWFkIiwiaXNzIjoiaHR0cHM6Ly9nd21zLmptYWxsdGVjaC5jb20vYXBpLWdhdGV3YXkvYXV0aC1hcGkiLCJleHAiOjE3NTMzNTQ4NzYsImlhdCI6MTc1MzM1MTI3NiwiY2xpZW50X2lkIjoiRU9VU1NRTldNUlZYMTVHQSJ9.lOIqdQdGEkAM8kX93sPYISHKqNuQZQnTwMoJIkOkBFRsCCyarMthOp5akFqyuI15c3odEpdgXWWpB6gN5Zk_ikU1OViG1mDMSvlTcoFkm6b65ocF_j6PXb8YxfdVRobcQPjN22lfy8XoB1DCLbmSQGptYdfmjRWflKw23fMoCJxcxZ26_bVtKOmywP8qBg3WwGSk8GB45QPsXxMOHCsdCx9lZkWNrMpmVk-Pa2d0vH8Ty1raA0HSWw7VixZNMwLfrDlGtEuxQZWBS_ohwfDCjhHewnKzt_n35FaLnt4CRikTp0UUt71TnpUU0nkt4sqWLiky3RlGxqaeRCqP8a1WGQ type: string api_key: description: API密钥 example: 8MO5994KEQMEZMAN type: string user_id: description: 用户ID example: "1927982333628370945" type: string system_id: description: 系统ID example: gwms-dev type: string vendor: description: 供应商 example: test_vebdor type: string scope: description: | 令牌权限范围,以空格分隔的字符串。 权限范围由apiKey关联的仓库用户权限决定。 example: inventory:read order:read api:read warehouse:read type: string token_type: description: 令牌类型 enum: - Bearer example: Bearer type: string expires_in: description: 令牌过期时间(秒) example: 3600 type: integer client_id: description: 客户端ID example: EOUSSQNWMRVX15GA type: string required: - access_token - api_key - client_id - expires_in - scope - system_id - token_type - user_id - vendor type: object ProductBatchResponse_allOf_data: properties: productIds: description: 成功创建的产品ID列表。 items: description: 产品ID。 example: 12345 format: int64 type: integer type: array type: object InboundOrderDetailResponse_allOf_data: allOf: - $ref: '#/components/schemas/InboundOrder' - properties: boxes: description: 入库单箱子列表,每个箱子包含其内部的明细信息 items: $ref: '#/components/schemas/InboundOrderBox' type: array type: object securitySchemes: BearerAuth: bearerFormat: JWT description: "使用JWT Bearer令牌进行身份验证。\n\n## 认证流程\n\n1. **获取凭证**:\n - 系统管理员为上\ 游系统生成clientId和clientSecret\n - 仓库用户生成apiKey,关联到特定仓库和权限范围\n\n2. **获取令牌**:\ \n ```bash\n curl -X POST https://gwms.jmalltech.com/api-gateway/auth-api/token\ \ \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"\ clientId\": \"IDE83SL50613FYBFID79DZIPIS1LCWWK\", \n \"clientSecret\"\ : \"xQHvfsCSzftBX2PrQlbndT7SJ32ht4n3SXjhZyaHmeA=\",\n \"apiKey\": \"\ E2E44WBGMJUBQUOBOCTQFPEPDQA8QU6Y\"\n }'\n ```\n\n3. **使用令牌**:\n ```bash\n\ \ curl -H \"Authorization: Bearer {access_token}\" \\\n https://api.your-wms.com/api/v1/products\n\ \ ```\n\n## 认证头部格式\n\n所有API请求必须包含以下HTTP头部:\n\n```\nAuthorization: Bearer\ \ {access_token}\n```\n\n其中`{access_token}`是从认证端点获取的JWT令牌。\n\n## 错误响应\n\n认\ 证失败时,API将返回以下错误响应:\n\n- **401 Unauthorized**:令牌无效、过期或缺失\n ```json\n {\n\ \ \"success\": false,\n \"code\": \"AUTH003\",\n \"message\": \"\ Access token has expired or is invalid\",\n \"timestamp\": \"2024-01-01T12:00:00Z\"\ ,\n \"error\": {\n \"code\": \"AUTH003\",\n \"message\": \"The\ \ provided access token is expired or invalid\"\n }\n }\n ```\n\n- **403\ \ Forbidden**:令牌有效但权限不足\n ```json\n {\n \"success\": false,\n \"code\"\ : \"AUTH004\",\n \"message\": \"Insufficient scope for this operation\"\ ,\n \"timestamp\": \"2024-01-01T12:00:00Z\",\n \"error\": {\n \"\ code\": \"AUTH004\",\n \"message\": \"Your token does not have the required\ \ scope to access this resource\"\n }\n }\n ```\n\n- **429 Too Many Requests**:\ 超过访问频率限制\n ```json\n {\n \"success\": false,\n \"code\": \"AUTH005\"\ ,\n \"message\": \"Rate limit exceeded\",\n \"timestamp\": \"2024-01-01T12:00:00Z\"\ ,\n \"error\": {\n \"code\": \"AUTH005\",\n \"message\": \"Too\ \ many requests, please try again later\",\n \"details\": [\n \ \ {\n \"field\": \"rate_limit\",\n \"message\": \"Maximum\ \ 100 requests per minute allowed\"\n },\n {\n \"field\"\ : \"retry_after\",\n \"message\": \"Please wait 60 seconds before\ \ next request\"\n }\n ]\n }\n }\n ```\n" scheme: bearer type: http OAuth2Scopes: description: | 权限范围定义,用于控制API访问权限。实际认证使用Bearer令牌,此处仅用于文档说明。 ## 权限范围详细说明 | 权限范围 | 描述 | 适用API | 示例操作 | |---------|------|---------|---------| | `product:read` | 产品数据读取权限 | `/api/v1/products/*`, `/api/v1/products/spus/*` | 查询产品列表、获取产品详情、查询SPU信息 | | `product:write` | 产品数据写入权限 | `/api/v1/products/*`, `/api/v1/products/spus/*` | 创建产品、更新产品信息、删除产品、管理SPU | | `warehouse:read` | 仓库数据读取权限 | `/api/v1/warehouses/*`, `/api/v1/zones/*`, `/api/v1/locations/*` | 查询仓库列表、获取仓库详情、查询库区和库位信息 | | `warehouse:write` | 仓库数据写入权限 | `/api/v1/warehouses/*`, `/api/v1/zones/*`, `/api/v1/locations/*` | 创建仓库、更新仓库信息、管理库区和库位、修改状态 | | `stock:read` | 库存数据读取权限 | `/api/v1/stock/*` | 查询库存数量、库存明细、库存历史记录 | | `stock:write` | 库存数据写入权限 | `/api/v1/stock/*` | 库存调整、库存转移、库存冻结/解冻 | | `inbound:read` | 入库单读取权限 | `/api/v1/inbound/*` | 查询入库单列表、获取入库单详情、查看入库进度 | | `inbound:write` | 入库单写入权限 | `/api/v1/inbound/*` | 创建入库单、更新入库单、取消入库单、修改入库单状态 | | `outbound:read` | 出库单读取权限 | `/api/v1/outbound/*` | 查询出库单列表、获取出库单详情、查看出库进度 | | `outbound:write` | 出库单写入权限 | `/api/v1/outbound/*` | 创建出库单、更新出库单、取消出库单、修改出库单状态 | | `express:read` | 物流渠道读取权限 | `/api/v1/expressChannel/*` | 查询物流渠道列表、获取物流渠道详情 | | `express:write` | 物流渠道写入权限 | `/api/v1/expressChannel/*` | 创建物流渠道、更新物流渠道信息、启用/禁用物流渠道 | ## 权限最佳实践 1. **最小权限原则**:仅申请业务所需的最小权限范围 2. **权限分离**:读写权限分离,避免不必要的写入权限 3. **定期审计**:定期审查和更新API密钥的权限范围 4. **环境隔离**:不同环境(开发、测试、生产)使用不同的API密钥 flows: clientCredentials: scopes: product:read: 读取产品信息,包括产品列表、详情、SPU信息 product:write: 创建、更新、删除产品信息和SPU信息 warehouse:read: 读取仓库、库区、库位信息 warehouse:write: 创建、更新仓库、库区、库位信息,修改状态 stock:read: 查询库存信息,包括实时库存和历史记录 stock:write: 调整库存,执行库存操作 inbound:read: 查看入库单列表和详情 inbound:write: 创建、更新入库单,修改入库单状态 outbound:read: 查看出库单列表和详情 outbound:write: 创建、更新、取消出库单 express:read: 查看物流渠道信息 express:write: 管理物流渠道配置 charge:read: 查看计费流水信息 charge:write: 修改计费流水信息 tokenUrl: https://gwms.jmalltech.com/api-gateway/auth-api/token type: oauth2