This commit is contained in:
2026-09-16 15:21:08 +08:00
parent 912feca56f
commit 8f0622058d
20 changed files with 447 additions and 41 deletions
@@ -4,6 +4,29 @@ info:
version: 1.0.0
description: Internal stateless PDF rendering API. This path must not be exposed through Gateway.
paths:
/internal/print/v1/pdfs/fba-pallet-labels:
post:
summary: Generate shared domestic and overseas FBA pallet labels as landscape A4 pages
operationId: generateFbaPalletLabels
description: One label per page in input order. The destination is the FBA code such as SCK8; the stored pallet code (including internal warehouse number such as 141) is printed verbatim and encoded as Code 128. No business lookup or new numbering.
security: [{ internalServiceToken: [] }]
parameters: [{ $ref: '#/components/parameters/RequestId' }]
requestBody:
required: true
content: { application/json: { schema: { $ref: '#/components/schemas/FbaPalletPdfRequest' } } }
responses:
'200':
description: PDF generation succeeded, or a business error was returned as ApiResponse JSON.
headers:
Content-Disposition: { schema: { type: string } }
Cache-Control: { schema: { type: string, example: no-store } }
X-Print-Page-Count: { schema: { type: integer, minimum: 1, maximum: 2000 } }
content:
application/pdf: { schema: { type: string, format: binary } }
application/json: { schema: { $ref: '#/components/schemas/ApiError' } }
'413':
description: Request body exceeds the configured limit.
content: { application/json: { schema: { $ref: '#/components/schemas/ApiError' } } }
/internal/print/v1/pdfs/inbound-marks:
post:
summary: Generate an inbound-mark PDF
@@ -153,6 +176,28 @@ components:
schema:
type: string
schemas:
FbaPalletPdfRequest:
type: object
required: [templateCode, pageSpec, downloadFileName, labels]
properties:
templateCode: { type: string, enum: [FBA_PALLET_A4_LANDSCAPE_V1] }
pageSpec:
type: object
required: [widthMm, heightMm]
properties:
widthMm: { type: number, enum: [297] }
heightMm: { type: number, enum: [210] }
downloadFileName: { type: string, minLength: 4, maxLength: 120, description: PDF filename without path separators or control characters }
labels:
type: array
minItems: 1
maxItems: 2000
items:
type: object
required: [fbaWarehouseCode, palletCode]
properties:
fbaWarehouseCode: { type: string, pattern: '^[A-Z0-9][A-Z0-9-]{0,31}$', example: SCK8 }
palletCode: { type: string, minLength: 1, maxLength: 80, description: Printable ASCII with no surrounding spaces; unchanged text and Code 128 payload, example: MSCU6639870-141-001 }
InboundMarkPdfRequest:
type: object
required: [templateCode, pageSpec, labels]