What you can do
Create a Departure, upload a goods file, and read the house consignments and goods items created from that file. Departure file import replaces the current goods details (mode is replace_all). It is allowed only before Customs has assigned an MRN, and only while the declaration can still be edited.
Before you start
nctsmodule andX-Eaze-Client-Ref.- A Departure template ID, or exactly one default Departure template.
commercialReference, your reference for this movement.- A CSV or Excel file with purpose
ncts_items. A typical header row isGoods code, Description, Net weight, Package count, Supplementary unit, Invoice amount, Package type, Shipping marks. Use the columns your template expects.
Steps
1
Create the Departure
Call Create Transit Declaration. Omit
movementType, or set it to DEPARTURE. Do not send Arrival fields.The response includes the public ID and the generated LRN. mrn stays null until Customs registers the movement.2
Upload the goods file
Follow File Uploads with
purpose: ncts_items. NCTS files are parsed when you complete the upload. More than 999 items in one house consignment is rejected at that step.3
Import the details
Call Import Departure Details.Optional
packageType and shippingMarks apply when the file does not supply them. The response is HTTP 202 with operationId and status: queued.4
Read the imported details
Poll Get Operation until the status is terminal. Then call List House Consignments, Get House Consignment, and List Goods Items.
5
Watch the business status
Read the Transit Declaration for status changes. Subscribe to
ncts.departure.released if you want a notification when Customs releases the departure. Then read the declaration and List Transit Documents again. The transit accompanying document is not guaranteed to exist at the moment of release.Working example
businessData, customsOutcome, and finalDocumentStatuses. See NCTS Overview.
A successful import Operation uses type: ncts.details.import. Read house consignments with the Transit Declaration ID:
Statuses and errors
Import is accepted only when the declaration is a Departure, is still editable, is not archived, has no MRN, has no active departure submission, and its status isNEW, READY_TO_DECLARE, BLOCKED, or INVALID.
An invalid goods file finishes as requires_review with error.code: import_file_invalid and retryable: false. Existing house consignments and goods items are left as they were.
A replay of the exact same idempotency key and body returns the original response. A changed body with the same key returns HTTP 409.
Departure status values are listed on Statuses.
Next: NCTS Arrival.