What you can do
The Create Shipment, Create Transit Declaration, Create Upload, Complete Upload, and both import requests require anIdempotency-Key header.
This key allows you to safely retry a request if the network fails after it is sent. It prevents duplicate records but does not make a failed business operation succeed.
Before you start
Generate a unique key for each new request. A UUID is recommended. The key must contain 1 to 200 visible ASCII characters. The generated API description specifies 8 to 255 characters, but the API accepts 1 to 200 characters. Always follow the API’s accepted range: 1 to 200 characters. Eaze Customs stores the key for 30 days.Steps
1
Use a new key for a new action
A new Shipment, a new upload, and a new import each need their own key.
2
Reuse the key only for the same request
If you do not receive a response, send the same method, path, headers, and JSON body with the same key. Eaze Customs returns the original result instead of creating a second record.
3
Change the key when the request changes
A corrected file, a different template, or any changed field is a new request. Use a new key. After Import Manifest accepts the file, also create a new upload. A header mismatch returned before acceptance does not consume the upload. See Manifest Import.
Working example
idempotency_in_progress. Wait briefly and send the same request again.
Idempotency is not upload reuse
An idempotency replay returns the original import acceptance. It does not start a second import. A consumeduploadId cannot be used on a new import, even when the accepted import failed or needs review. Create a new upload, then submit a new import with a new key. HTTP 422 for missing headers is returned before the upload is reserved, so that uploadId can be sent again.
See Operations for polling, and File Uploads for the upload reservation.
Next: Shipments.