Create a shipping label
Creates a shipping label for the specified courier and shipment details. Supports idempotent creation — replaying a request with the same idempotencyKey returns the original result with HTTP 200 instead of creating a duplicate.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request payload for creating a shipping label.
Request payload for creating a shipping label.
Client-generated unique key to ensure idempotent label creation. Replaying a request with the same key returns the original result.
1 - 100"unique-key-per-request"
Courier code to use. Call GET /couriers to list valid courier codes available to your account, then pass one of the returned code values.
1"yunexpress"
Courier service configuration.
Shipment details including origin, destination, and parcels.
Label output preferences.
Measurement units for weight and dimensions.
Order reference information.
Customs declaration information for cross-border shipments.
Additional service options as code-value pairs.
Dangerous goods declaration.
Pickup point configuration.
Courier-specific options.
Response
Result of a label creation request.
Result of a label creation request.
Unique label identifier.
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
Label creation outcome — created or failed.
created "created"
Courier service used.
"yunexpress"
Customer order number associated with this label.
"N-2026-05-27-TEST-03"
Order number assigned by the courier, or null on failure.
"YT2503010001"
Tracking number assigned by the courier, or null if not yet available.
"YT2503010001CN"
Error details if the label creation failed, otherwise null.