Expedite Custom Clearance by Uploading Commercial Invoice Electronically Before or After Creating a Shipment
Scenario 1 - Pre-Shipment Document Upload
Goal: Upload up to 5 shipping documents (e.g., “Commercial Invoice") before creating the shipment
Endpoint: Use the Upload Multiple Documents endpoint.
Action: Upload your documents
1. Send a request with the shipping documents (e.g. “Commercial Invoice”).
2. For each document uploaded successfully, the response will include a docID.
Outcome: You will receive a docID for each successfully uploaded document, which you will use in the next step.
Goal: Associate the docID from Step 1 with the shipment when creating it.
Endpoint: Use the Create Shipment endpoint.
Action:
1. Include the docID values from the previous step under the ShipmentSpecialServices.etdDetail.attachedDocuments.documentId field in the shipment creation payload.
Payload Example:
2. In the request body of the shipment creation, you will need to specify the documentId for each document uploaded in Step 1, under the appropriate structure:
Outcome: Your documents are now linked to the shipment and ready for submission.
Goal: Finalize the shipment creation and submit it with the attached documents.
Action: Submit the shipment creation request with the full payload including the documentId values from Step 2.
Outcome: The shipment will be created with the attached documents.
Scenario 2 - Post-Shipment Document Upload
Goal: Create the shipment with Electronic Trade Document parameters.
Endpoint: Use the Create Shipment endpoint.
Action:
1. Send a shipment request with shipment level specialServiceTypes as "ELECTRONIC_TRADE_DOCUMENTS" and list of shipping documents mentioned under shippingDocumentTypes (eg. “COMMERCIAL_INVOICE”).
2. For successful shipment creation, the response will include folderId.
Outcome: You will receive a masterTrackingNumber, which you will use in the next step.
Goal: Upload the documents and associate with the shipment masterTrackingNumber created from Step 1.
Endpoint: Use the Upload Multiple Documents endpoint.
Action:
1. Include the masterTrackingNumber value from the previous step under the documentInformation. trackingNumber field in the request payload.
2. In the request payload of the Upload Multiple Documents, you will need to specify the masterTrackingNumber from Step 1 and metadata associated with each document, under the appropriate structure.
Outcome: Your documents are now uploaded and linked to the shipment.
Did you find API Recipes helpful?
