Generate a gate pass document that authorizes a container to enter or leave a port terminal. This is
a standard document in freight operations.
New endpoint:
GET /api/v1/freight-orders/{id}/gate-pass β returns PDF (Content-Type: application/pdf)
Gate pass should include:
- Gate pass number (auto-generated, e.g.
GP-2025-00042)
- QR code encoding the tracking URL for the order
- Container code with Code 128 barcode
- Container size and type
- Voyage number, vessel name
- Departure port and arrival port
- Customer company name
- Agent name (if
AGT-001 is done, otherwise orderedBy)
- Valid date range (departure date Β± 3 days for buffer)
- Large bold text:
GATE IN or GATE OUT (request param: direction=IN|OUT)
New endpoint parameter:
GET /api/v1/freight-orders/{id}/gate-pass?direction=IN
Gate pass layout suggestion:
βββββββββββββββββββββββββββββββββββββββ
β *** GATE IN PASS *** β
β GP-2025-00042 β
β β
β Container: MSCU1234567 β
β |||||||||||||||||||||||| (Code128) β
β Size: 20ft Type: DRY β
β β
β Voyage: VOY-2025-001 β
β Vessel: MV Freight Star β
β Route: Jebel Ali β Shanghai β
β β
β Customer: Acme Trading LLC β
β Valid: 2025-03-29 to 2025-04-04 β
β β
β βββββββββββ β
β β QR β Scan to track β
β β Code β β
β βββββββββββ β
βββββββββββββββββββββββββββββββββββββββ
Business rules:
- Gate pass can only be generated for orders with status
PENDING, CONFIRMED, or IN_TRANSIT
- Return 409 if order is
CANCELLED or DELIVERED
direction parameter is required, return 400 if missing
Acceptance criteria:
Generate a gate pass document that authorizes a container to enter or leave a port terminal. This is
a standard document in freight operations.
New endpoint:
GET /api/v1/freight-orders/{id}/gate-passβ returns PDF (Content-Type:application/pdf)Gate pass should include:
GP-2025-00042)AGT-001is done, otherwiseorderedBy)GATE INorGATE OUT(request param:direction=IN|OUT)New endpoint parameter:
GET /api/v1/freight-orders/{id}/gate-pass?direction=INGate pass layout suggestion:
Business rules:
PENDING,CONFIRMED, orIN_TRANSITCANCELLEDorDELIVEREDdirectionparameter is required, return 400 if missingAcceptance criteria: