Skip to main content

What you can do

List documents linked to a Shipment, a Declaration, or an NCTS Transit Declaration, then download one document. A download response is JSON with a short-lived URL. It is not a file stream and it is not an HTTP redirect.

Before you start

You need the public ID of the Shipment, Declaration, or Transit Declaration, plus X-Eaze-Client-Ref. The credential needs the module that owns the resource: import or export, or ncts. Not every portal file is available here. source is generated for a file Eaze Customs produced, or verified_upload for a promoted NCTS source file. Shipment manifest source files are not listed as downloadable declaration documents.

Steps

1

List documents

Call the list that matches the resource. An empty page means nothing is available yet. Poll again later. Customs release does not mean a final PDF exists.
2

Download one document

Call Download Document with the document id.
Send an HTTP GET to url before expiresAt. The default lifetime is 60 seconds. Download the bytes as a file. Do not send the Eaze Customs credential to that URL, and do not parse the file response as JSON.
If the private file is not confirmed in storage, the download returns HTTP 503. Retry later with the same document ID. Create a new download URL after the previous one expires. Do not cache the URL.

Working example

Statuses and errors

Next: Operations.