280 lines
27 KiB
YAML
280 lines
27 KiB
YAML
openapi: 3.0.3
|
||
info: {title: Firstleg Container Customs API, version: 2.0.0}
|
||
paths:
|
||
/api/merchant/v1/customs/pending-summary:
|
||
get:
|
||
summary: 当前客户报关资料待处理柜次数量
|
||
description: >-
|
||
权限merchant:order:view,客户范围仅来自认证上下文。只读COUNT,不创建报关记录。
|
||
最新实际已装柜的退税货物尚未被本客户有效资料覆盖,或DECLARING阶段本客户冻结资料的当前回执为PENDING,均计入。
|
||
同柜多票、多份资料只计一次;已打回等待平台重做、已确认、已完成及其他客户的待办不计入。
|
||
x-permission: merchant:order:view
|
||
responses:
|
||
'200':
|
||
description: ApiResponse,code为200时才成功;失败不能解释为零待办
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
code: {type: string}
|
||
data:
|
||
type: object
|
||
required: [pendingCount]
|
||
properties:
|
||
pendingCount: {type: string, pattern: '^[0-9]+$'}
|
||
/api/platform/v1/customs/loading-plans/{planId}:
|
||
get:
|
||
summary: 查询整柜报关状态、缺资料票及文件映射
|
||
x-permission: platform:firstleg:customs:list
|
||
parameters: [{$ref: '#/components/parameters/PlanId'}]
|
||
responses: {'200': {$ref: '#/components/responses/ContainerResponse'}}
|
||
/api/platform/v1/customs/loading-plans/{planId}/start:
|
||
post:
|
||
summary: 确认开始整柜报关并冻结全部当前资料版本和覆盖范围
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters: [{$ref: '#/components/parameters/PlanId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {$ref: '#/components/requestBodies/ActionBody'}
|
||
responses: {'200': {$ref: '#/components/responses/ContainerResponse'}}
|
||
/api/platform/v1/customs/loading-plans/{planId}/complete-all-buy:
|
||
post:
|
||
summary: 二次确认全买单柜报关完成
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters: [{$ref: '#/components/parameters/PlanId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {$ref: '#/components/requestBodies/ActionBody'}
|
||
responses: {'200': {$ref: '#/components/responses/ContainerResponse'}}
|
||
/api/platform/v1/customs/loading-plans/{planId}/send-to-broker:
|
||
post:
|
||
summary: 将冻结后的退税报关资料首次发送给报关行并生成发送批次
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters: [{$ref: '#/components/parameters/PlanId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {$ref: '#/components/requestBodies/ActionBody'}
|
||
responses: {'200': {$ref: '#/components/responses/ContainerResponse'}}
|
||
/api/platform/v1/customs/loading-plans/{planId}/declaration-batches:
|
||
get:
|
||
summary: 查询整柜正式申报批次和海关结果
|
||
x-permission: platform:firstleg:customs:list
|
||
parameters: [{$ref: '#/components/parameters/PlanId'}]
|
||
responses: {'200': {$ref: '#/components/responses/DeclarationBatchListResponse'}}
|
||
post:
|
||
summary: 创建整柜正式申报批次并冻结提交快照
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters: [{$ref: '#/components/parameters/PlanId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/DeclarationBatchRequest'}}}}
|
||
responses: {'200': {$ref: '#/components/responses/DeclarationBatchResponse'}}
|
||
/api/platform/v1/customs/loading-plans/declaration-batches/{batchId}/submit:
|
||
post:
|
||
summary: 平台人工提交正式申报并回填报关单号
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters: [{$ref: '#/components/parameters/BatchId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/DeclarationBatchRequest'}}}}
|
||
responses: {'200': {$ref: '#/components/responses/DeclarationBatchResponse'}}
|
||
/api/platform/v1/customs/loading-plans/declaration-batches/{batchId}/results:
|
||
get:
|
||
summary: 查询正式申报批次的海关结果历史
|
||
x-permission: platform:firstleg:customs:list
|
||
parameters: [{$ref: '#/components/parameters/BatchId'}]
|
||
responses: {'200': {$ref: '#/components/responses/ClearanceResultListResponse'}}
|
||
post:
|
||
summary: 平台人工录入查验、补资料、放行、扣货或其他海关结果
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters: [{$ref: '#/components/parameters/BatchId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/ClearanceResultRequest'}}}}
|
||
responses: {'200': {$ref: '#/components/responses/ClearanceResultResponse'}}
|
||
/api/platform/v1/customs/loading-plans/clearance-results/{resultId}/resolve:
|
||
post:
|
||
summary: 解决一条待处理海关结果
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters: [{$ref: '#/components/parameters/ResultId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/ClearanceResolveRequest'}}}}
|
||
responses: {'200': {$ref: '#/components/responses/ClearanceResultResponse'}}
|
||
/api/platform/v1/customs/loading-plans/{planId}/submit-to-broker:
|
||
post:
|
||
summary: 将客户确认回执发送给报关行执行
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters: [{$ref: '#/components/parameters/PlanId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {$ref: '#/components/requestBodies/ActionBody'}
|
||
responses: {'200': {$ref: '#/components/responses/ContainerResponse'}}
|
||
/api/platform/v1/customs/loading-plans/documents/{documentId}/receipt/upload:
|
||
post:
|
||
summary: 上传或覆盖冻结客户资料的一对一报关行回执
|
||
description: 报关行回执按冻结客户资料一对一保存;上传后等待对应客户确认或打回。
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters:
|
||
- {$ref: '#/components/parameters/DocumentId'}
|
||
- {$ref: '#/components/parameters/IdempotencyKey'}
|
||
- {name: expectedVersion, in: query, required: true, schema: {type: integer, minimum: 0}}
|
||
requestBody: {$ref: '#/components/requestBodies/FileBody'}
|
||
responses: {'200': {$ref: '#/components/responses/DocumentResponse'}}
|
||
/api/platform/v1/customs/loading-plans/documents/{documentId}/receipt/actions:
|
||
get:
|
||
summary: 平台查询客户回执确认与打回历史
|
||
x-permission: platform:firstleg:customs:list
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}]
|
||
responses: {'200': {$ref: '#/components/responses/ReceiptActionListResponse'}}
|
||
/api/platform/v1/customs/loading-plans/documents/{documentId}/download:
|
||
get:
|
||
summary: 平台下载客户报送资料
|
||
x-permission: platform:firstleg:customs:list
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}]
|
||
responses: {'200': {$ref: '#/components/responses/BinaryResponse'}}
|
||
/api/platform/v1/customs/loading-plans/documents/{documentId}/completion/download:
|
||
get:
|
||
summary: 平台下载预录单
|
||
x-permission: platform:firstleg:customs:list
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}]
|
||
responses: {'200': {$ref: '#/components/responses/BinaryResponse'}}
|
||
/api/platform/v1/customs/loading-plans/documents/{documentId}/final/upload:
|
||
post:
|
||
summary: 上传真实报关完税文件
|
||
x-permission: platform:firstleg:customs:manage
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}, {$ref: '#/components/parameters/IdempotencyKey'}, {name: expectedVersion, in: query, required: true, schema: {type: integer, minimum: 0}}]
|
||
requestBody: {$ref: '#/components/requestBodies/FileBody'}
|
||
responses: {'200': {$ref: '#/components/responses/DocumentResponse'}}
|
||
/api/platform/v1/customs/loading-plans/documents/{documentId}/final/download:
|
||
get:
|
||
summary: 平台下载真实报关完税文件
|
||
x-permission: platform:firstleg:customs:list
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}]
|
||
responses: {'200': {$ref: '#/components/responses/BinaryResponse'}}
|
||
/api/merchant/v1/customs/orders/{orderId}:
|
||
get:
|
||
summary: 客户订单列表查询当前完成装柜退税报关四态
|
||
x-permission: merchant:order:view
|
||
parameters: [{$ref: '#/components/parameters/OrderId'}]
|
||
responses: {'200': {$ref: '#/components/responses/ContainerResponse'}}
|
||
/api/merchant/v1/customs/orders/{orderId}/clearance-results:
|
||
get:
|
||
summary: 客户只读查看自身订单可见的海关结果
|
||
x-permission: merchant:order:view
|
||
parameters: [{$ref: '#/components/parameters/OrderId'}]
|
||
responses: {'200': {$ref: '#/components/responses/ClearanceResultListResponse'}}
|
||
/api/merchant/v1/customs/loading-plans/{planId}/documents/upload:
|
||
post:
|
||
summary: 上传资料并关联当前柜内本客户一个或多个退税入仓码
|
||
x-permission: merchant:order:edit
|
||
parameters:
|
||
- {$ref: '#/components/parameters/PlanId'}
|
||
- {$ref: '#/components/parameters/IdempotencyKey'}
|
||
- {$ref: '#/components/parameters/InboundIds'}
|
||
requestBody: {$ref: '#/components/requestBodies/FileBody'}
|
||
responses: {'200': {$ref: '#/components/responses/DocumentResponse'}}
|
||
/api/merchant/v1/customs/documents/{documentId}/upload:
|
||
post:
|
||
summary: 报关开始前覆盖资料并同步修改同柜关联票
|
||
x-permission: merchant:order:edit
|
||
parameters:
|
||
- {$ref: '#/components/parameters/DocumentId'}
|
||
- {$ref: '#/components/parameters/IdempotencyKey'}
|
||
- {$ref: '#/components/parameters/InboundIds'}
|
||
- {name: expectedVersion, in: query, required: true, schema: {type: integer, minimum: 1}}
|
||
requestBody: {$ref: '#/components/requestBodies/FileBody'}
|
||
responses: {'200': {$ref: '#/components/responses/DocumentResponse'}}
|
||
/api/merchant/v1/customs/documents/{documentId}/inbounds:
|
||
put:
|
||
summary: 报关开始前修改资料关联的同柜退税入仓码
|
||
x-permission: merchant:order:edit
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/ScopeRequest'}}}}
|
||
responses: {'200': {$ref: '#/components/responses/DocumentResponse'}}
|
||
/api/merchant/v1/customs/documents/{documentId}:
|
||
delete:
|
||
summary: 报关开始前逻辑删除误传资料并保留不可变版本
|
||
x-permission: merchant:order:edit
|
||
parameters:
|
||
- {$ref: '#/components/parameters/DocumentId'}
|
||
- {$ref: '#/components/parameters/IdempotencyKey'}
|
||
- {name: expectedVersion, in: query, required: true, schema: {type: integer, minimum: 1}}
|
||
responses: {'200': {$ref: '#/components/responses/ContainerResponse'}}
|
||
/api/merchant/v1/customs/documents/{documentId}/receipt/actions:
|
||
get:
|
||
summary: 客户查询自身资料的回执确认与打回历史
|
||
x-permission: merchant:order:view
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}]
|
||
responses: {'200': {$ref: '#/components/responses/ReceiptActionListResponse'}}
|
||
/api/merchant/v1/customs/documents/{documentId}/download:
|
||
get:
|
||
summary: 客户下载自己当前报送资料
|
||
x-permission: merchant:order:view
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}]
|
||
responses: {'200': {$ref: '#/components/responses/BinaryResponse'}}
|
||
/api/merchant/v1/customs/documents/{documentId}/receipt/download:
|
||
get:
|
||
summary: 客户下载报关行回执
|
||
x-permission: merchant:order:view
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}]
|
||
responses: {'200': {$ref: '#/components/responses/BinaryResponse'}}
|
||
/api/merchant/v1/customs/documents/{documentId}/final/download:
|
||
get:
|
||
summary: 整柜完成后客户下载真实报关完税文件
|
||
x-permission: merchant:order:view
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}]
|
||
responses: {'200': {$ref: '#/components/responses/BinaryResponse'}}
|
||
/api/merchant/v1/customs/documents/{documentId}/receipt/confirm:
|
||
post:
|
||
summary: 客户确认退税报关行整份回执
|
||
x-permission: merchant:order:edit
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {$ref: '#/components/requestBodies/ActionBody'}
|
||
responses: {'200': {$ref: '#/components/responses/ContainerResponse'}}
|
||
/api/merchant/v1/customs/documents/{documentId}/receipt/reject:
|
||
post:
|
||
summary: 客户打回退税报关行回执
|
||
x-permission: merchant:order:edit
|
||
parameters: [{$ref: '#/components/parameters/DocumentId'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||
requestBody: {$ref: '#/components/requestBodies/ActionBody'}
|
||
responses: {'200': {$ref: '#/components/responses/ContainerResponse'}}
|
||
/internal/exports/v1/LOADING_LIST_BUY_DECLARATION_ITEMS/batches:
|
||
post:
|
||
summary: File导出中心按loadingPlanId分页获取已完成装柜买单实际行
|
||
parameters: [{name: X-Internal-Service-Token, in: header, required: true, schema: {type: string}}]
|
||
requestBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/ExportBatchRequest'}}}}
|
||
responses: {'200': {description: 成功, content: {application/json: {schema: {$ref: '#/components/schemas/ExportBatchEnvelope'}}}}}
|
||
components:
|
||
parameters:
|
||
PlanId: {name: planId, in: path, required: true, schema: {$ref: '#/components/schemas/LongId'}}
|
||
OrderId: {name: orderId, in: path, required: true, schema: {$ref: '#/components/schemas/LongId'}}
|
||
DocumentId: {name: documentId, in: path, required: true, schema: {$ref: '#/components/schemas/LongId'}}
|
||
BatchId: {name: batchId, in: path, required: true, schema: {$ref: '#/components/schemas/LongId'}}
|
||
ResultId: {name: resultId, in: path, required: true, schema: {$ref: '#/components/schemas/LongId'}}
|
||
IdempotencyKey: {name: Idempotency-Key, in: header, required: true, schema: {type: string, minLength: 1, maxLength: 128}}
|
||
InboundIds: {name: inboundIds, in: query, required: true, schema: {type: array, minItems: 1, maxItems: 200, items: {$ref: '#/components/schemas/LongId'}}}
|
||
requestBodies:
|
||
ActionBody: {required: true, content: {application/json: {schema: {$ref: '#/components/schemas/ActionRequest'}}}}
|
||
FileBody: {required: true, content: {multipart/form-data: {schema: {type: object, required: [file], properties: {file: {type: string, format: binary, description: 任意格式且最大50MB;multipart整请求上限52MB}}}}}}
|
||
responses:
|
||
ContainerResponse: {description: 成功或业务失败, content: {application/json: {schema: {$ref: '#/components/schemas/ContainerEnvelope'}}}}
|
||
DocumentResponse: {description: 成功或业务失败, content: {application/json: {schema: {$ref: '#/components/schemas/DocumentEnvelope'}}}}
|
||
ReceiptActionListResponse: {description: 回执确认与打回历史, content: {application/json: {schema: {$ref: '#/components/schemas/ReceiptActionListEnvelope'}}}}
|
||
BinaryResponse: {description: 文件二进制, headers: {Content-Disposition: {schema: {type: string}}, Cache-Control: {schema: {type: string, example: no-store}}}, content: {application/octet-stream: {schema: {type: string, format: binary}}}}
|
||
DeclarationBatchResponse: {description: 正式申报批次, content: {application/json: {schema: {$ref: '#/components/schemas/DeclarationBatchEnvelope'}}}}
|
||
DeclarationBatchListResponse: {description: 正式申报批次列表, content: {application/json: {schema: {$ref: '#/components/schemas/DeclarationBatchListEnvelope'}}}}
|
||
ClearanceResultResponse: {description: 海关结果, content: {application/json: {schema: {$ref: '#/components/schemas/ClearanceResultEnvelope'}}}}
|
||
ClearanceResultListResponse: {description: 海关结果列表, content: {application/json: {schema: {$ref: '#/components/schemas/ClearanceResultListEnvelope'}}}}
|
||
schemas:
|
||
LongId: {type: string, pattern: '^[1-9][0-9]*$', description: Long ID序列化为字符串}
|
||
ApiEnvelope: {type: object, required: [code, message, timestamp], properties: {code: {type: string}, message: {type: string}, requestId: {type: string, nullable: true}, traceId: {type: string, nullable: true}, timestamp: {type: string, format: date-time}}}
|
||
ContainerEnvelope: {allOf: [{$ref: '#/components/schemas/ApiEnvelope'}, {type: object, properties: {data: {allOf: [{$ref: '#/components/schemas/ContainerView'}], nullable: true, description: 装柜计划尚未完成时返回null,表示报关流程尚未生成}}}]}
|
||
DocumentEnvelope: {allOf: [{$ref: '#/components/schemas/ApiEnvelope'}, {type: object, properties: {data: {$ref: '#/components/schemas/DocumentView'}}}]}
|
||
ActionRequest: {type: object, required: [expectedVersion, confirm], additionalProperties: false, properties: {expectedVersion: {type: integer, minimum: 0}, confirm: {type: boolean}, remark: {type: string, maxLength: 500, nullable: true}}}
|
||
DeclarationBatchRequest: {type: object, required: [expectedVersion], additionalProperties: false, properties: {expectedVersion: {type: integer, minimum: 0}, customsEntryNo: {type: string, maxLength: 64, nullable: true}, remark: {type: string, maxLength: 500, nullable: true}}}
|
||
ClearanceResultRequest: {type: object, required: [expectedVersion, resultType, occurredAt], additionalProperties: false, properties: {expectedVersion: {type: integer, minimum: 0}, resultType: {type: string, enum: [INSPECTION, SUPPLEMENT_REQUIRED, RELEASED, DETAINED, OTHER]}, occurredAt: {type: string, format: date-time}, resolution: {type: string, maxLength: 1000, nullable: true}, evidenceFileId: {$ref: '#/components/schemas/LongId', nullable: true}, resolved: {type: boolean}}}
|
||
ClearanceResolveRequest: {type: object, required: [expectedVersion], additionalProperties: false, properties: {expectedVersion: {type: integer, minimum: 0}, resolution: {type: string, maxLength: 1000, nullable: true}}}
|
||
ScopeRequest: {type: object, required: [inboundIds, expectedVersion], additionalProperties: false, properties: {inboundIds: {type: array, minItems: 1, maxItems: 200, items: {$ref: '#/components/schemas/LongId'}}, expectedVersion: {type: integer, minimum: 1}}}
|
||
FileView: {type: object, required: [fileId, fileName, fileHash, sizeBytes, version, uploadedAt], properties: {fileId: {$ref: '#/components/schemas/LongId'}, fileName: {type: string}, fileHash: {type: string}, contentType: {type: string, nullable: true}, sizeBytes: {type: integer, format: int64}, version: {type: integer}, uploadedAt: {type: string, format: date-time}}}
|
||
InboundView: {type: object, required: [inboundId, orderId, orderNo, inboundCode, tenantId, customerName, taxMode, covered], properties: {inboundId: {$ref: '#/components/schemas/LongId'}, orderId: {$ref: '#/components/schemas/LongId'}, orderNo: {type: string}, inboundCode: {type: string}, tenantId: {$ref: '#/components/schemas/LongId'}, customerName: {type: string}, taxMode: {type: string, enum: [TAX_REFUND, BUY_DECLARATION]}, covered: {type: boolean}}}
|
||
ReceiptVersionView: {type: object, required: [version, file, createdAt], properties: {version: {type: integer}, file: {$ref: '#/components/schemas/FileView'}, operatorName: {type: string, nullable: true}, createdAt: {type: string, format: date-time}}}
|
||
ReceiptActionView: {type: object, required: [id, receiptVersion, action, createdAt], properties: {id: {$ref: '#/components/schemas/LongId'}, receiptVersion: {type: integer, minimum: 1}, action: {type: string, enum: [CONFIRM, REJECT]}, reason: {type: string, nullable: true}, operatorName: {type: string, nullable: true}, createdAt: {type: string, format: date-time}}}
|
||
BrokerSubmissionView: {type: object, required: [id, customsContainerId, loadingPlanId, batchNo, status, sourceVersion, sentAt, version], properties: {id: {$ref: '#/components/schemas/LongId'}, customsContainerId: {$ref: '#/components/schemas/LongId'}, loadingPlanId: {$ref: '#/components/schemas/LongId'}, batchNo: {type: string}, status: {type: string, enum: [SENT]}, sourceVersion: {type: integer}, sentByName: {type: string, nullable: true}, sentAt: {type: string, format: date-time}, version: {type: integer}}}
|
||
DocumentView: {type: object, required: [documentId, tenantId, source, inboundIds, inboundCodes, frozen, receiptHistory, confirmationHistory], properties: {documentId: {$ref: '#/components/schemas/LongId'}, tenantId: {$ref: '#/components/schemas/LongId'}, source: {$ref: '#/components/schemas/FileView'}, inboundIds: {type: array, items: {$ref: '#/components/schemas/LongId'}}, inboundCodes: {type: array, items: {type: string}}, frozen: {type: boolean}, receipt: {allOf: [{$ref: '#/components/schemas/FileView'}], nullable: true, description: 当前报关行回执文件}, receiptStatus: {type: string, enum: [PENDING, CONFIRMED, REJECTED], nullable: true}, receiptRejectReason: {type: string, nullable: true}, finalDocument: {allOf: [{$ref: '#/components/schemas/FileView'}], nullable: true, description: 真实报关完税文件}, receiptHistory: {type: array, items: {$ref: '#/components/schemas/ReceiptVersionView'}, description: 报关行回执历次上传记录,按版本升序}, confirmationHistory: {type: array, items: {$ref: '#/components/schemas/ReceiptActionView'}, description: 客户对各回执版本的确认与打回动作,按时间升序}}}
|
||
ContainerView: {type: object, required: [aggregateId, loadingPlanId, containerBookingId, status, hasActualCargo, version, taxRefundCount, coveredTaxRefundCount, actualBoxCount, inbounds, documents], properties: {aggregateId: {$ref: '#/components/schemas/LongId'}, loadingPlanId: {$ref: '#/components/schemas/LongId'}, containerBookingId: {$ref: '#/components/schemas/LongId'}, planNo: {type: string}, cabinetNo: {type: string}, containerNo: {type: string, nullable: true}, status: {type: string, enum: [WAITING_CUSTOMER_DOCUMENTS, READY_TO_START, DECLARING, COMPLETED]}, hasActualCargo: {type: boolean, description: 当前完成装柜计划是否仍有实际装柜货物;false时查询成功返回空明细且无需发起报关}, merchantStatus: {type: string, enum: [WAITING_UPLOAD, DOCUMENT_UPLOADED, DECLARING, CUSTOMS_COMPLETED], nullable: true}, version: {type: integer}, taxRefundCount: {type: integer}, coveredTaxRefundCount: {type: integer}, actualBoxCount: {type: integer, format: int64, minimum: 0, description: 当前视角可见的实际装箱数;部分装柜只展示该数量,线下处理后续}, inbounds: {type: array, items: {$ref: '#/components/schemas/InboundView'}}, documents: {type: array, items: {$ref: '#/components/schemas/DocumentView'}}, startedAt: {type: string, format: date-time, nullable: true}, brokerSubmission: {allOf: [{$ref: '#/components/schemas/BrokerSubmissionView'}], nullable: true, description: 资料冻结后首次发送报关行的独立事实}, brokerSubmittedAt: {type: string, format: date-time, nullable: true, description: 已将客户确认后的回执发送给报关行执行的时间;不表示报关完成}, completedAt: {type: string, format: date-time, nullable: true}}}
|
||
DeclarationBatch: {type: object, required: [id, customsContainerId, loadingPlanId, status, sourceVersion, version, results], properties: {id: {$ref: '#/components/schemas/LongId'}, customsContainerId: {$ref: '#/components/schemas/LongId'}, loadingPlanId: {$ref: '#/components/schemas/LongId'}, batchNo: {type: string}, status: {type: string, enum: [READY, SUBMITTED, ACKNOWLEDGED, RESULT_PENDING, CLOSED, CANCELLED]}, sourceVersion: {type: integer}, customsEntryNo: {type: string, nullable: true}, version: {type: integer}, submittedAt: {type: string, format: date-time, nullable: true}, submittedByName: {type: string, nullable: true}, acknowledgedAt: {type: string, format: date-time, nullable: true}, acknowledgedByName: {type: string, nullable: true}, remark: {type: string, nullable: true}, results: {type: array, items: {$ref: '#/components/schemas/ClearanceResult'}}}}
|
||
ClearanceResult: {type: object, required: [id, declarationBatchId, customsContainerId, resultType, resultStatus, occurredAt, recordedAt], properties: {id: {$ref: '#/components/schemas/LongId'}, declarationBatchId: {$ref: '#/components/schemas/LongId'}, customsContainerId: {$ref: '#/components/schemas/LongId'}, resultType: {type: string, enum: [INSPECTION, SUPPLEMENT_REQUIRED, RELEASED, DETAINED, OTHER]}, resultStatus: {type: string, enum: [OPEN, RESOLVED, CANCELLED]}, customsEntryNo: {type: string, nullable: true}, occurredAt: {type: string, format: date-time}, resolution: {type: string, nullable: true}, evidenceFileId: {$ref: '#/components/schemas/LongId', nullable: true}, recordedBy: {$ref: '#/components/schemas/LongId'}, recordedByName: {type: string, nullable: true}, recordedAt: {type: string, format: date-time}, previousResultId: {$ref: '#/components/schemas/LongId', nullable: true}}}
|
||
DeclarationBatchEnvelope: {allOf: [{$ref: '#/components/schemas/ApiEnvelope'}, {type: object, properties: {data: {$ref: '#/components/schemas/DeclarationBatch'}}}]}
|
||
DeclarationBatchListEnvelope: {allOf: [{$ref: '#/components/schemas/ApiEnvelope'}, {type: object, properties: {data: {type: array, items: {$ref: '#/components/schemas/DeclarationBatch'}}}}]}
|
||
ClearanceResultEnvelope: {allOf: [{$ref: '#/components/schemas/ApiEnvelope'}, {type: object, properties: {data: {$ref: '#/components/schemas/ClearanceResult'}}}]}
|
||
ClearanceResultListEnvelope: {allOf: [{$ref: '#/components/schemas/ApiEnvelope'}, {type: object, properties: {data: {type: array, items: {$ref: '#/components/schemas/ClearanceResult'}}}}]}
|
||
ReceiptActionListEnvelope: {allOf: [{$ref: '#/components/schemas/ApiEnvelope'}, {type: object, properties: {data: {type: array, items: {$ref: '#/components/schemas/ReceiptActionView'}}}}]}
|
||
ExportBatchRequest: {type: object, required: [taskId, tenantId, appCode, requestedBy, dispatchVersion, parameters, limit], properties: {taskId: {type: string}, tenantId: {type: string, enum: ['0']}, appCode: {type: string, enum: [PLATFORM]}, requestedBy: {type: string}, dispatchVersion: {type: integer}, parameters: {type: object, required: [loadingPlanId], additionalProperties: false, properties: {loadingPlanId: {type: string}}}, cursor: {type: string, nullable: true}, snapshotToken: {type: string, nullable: true}, limit: {type: integer, minimum: 1, maximum: 500}}}
|
||
ExportBatchEnvelope: {allOf: [{$ref: '#/components/schemas/ApiEnvelope'}, {type: object, properties: {data: {type: object, properties: {schemaVersion: {type: integer}, schemaHash: {type: string}, snapshotToken: {type: string}, columns: {type: array, items: {type: object}}, rows: {type: array, items: {type: object}}, nextCursor: {type: string}, hasMore: {type: boolean}, totalRows: {type: integer, format: int64, nullable: true}}}}}]}
|