Create an international shipment
This guide walks through creating a cross-border shipment from Japan to the United States using YunExpress. The same flow applies to any supported courier and shipping lane.Before you start
- You have an API token and
shipperAccountIdfrom onboarding (see Authentication) - You know your courier slug and product code (see Couriers and product codes)
1. Prepare the shipment data
An international shipment requires:- Ship-from address — your warehouse or fulfillment center
- Ship-to address — the customer’s delivery address
- Parcel details — weight and item-level customs declarations (English description, quantity, unit price, unit weight)
Customs declarations (
descriptionEn, unitPrice, unitWeight) are required for cross-border shipments. Missing or inaccurate customs data can cause delays at customs clearance.2. Create the label
3. Check the response
201 Created
status is created, the label is ready. Save the id — you’ll use it to retrieve the label document and track the shipment.
If status is failed, check the error object for the courier’s rejection reason. See Error Handling for guidance.
4. Next steps
Retrieve the label document
Download the airway bill PDF to attach to the package.
Track the shipment
Monitor shipment progress with normalized tracking data.
Tips for international shipments
- HS codes — Including Harmonized System codes (
hsCode) speeds up customs clearance. Look up codes at your country’s customs authority. - Local descriptions — The
descriptionLocalfield provides item descriptions in the destination country’s language, which can help with customs processing. - Idempotency — Always use a meaningful
idempotencyKey(e.g., your order ID) so retries are safe. See Idempotency and Retries.