Créer des envois via l'API
Après avoir calculé un Landed Cost et créé une commande, vous pouvez envoyer les numéros de suivi et autres détails d'envoi à Zonos via l'API.
Use this workflow when you're creating a shipment for an existing order and don't need to modify item or party details. It supports optional tracking numbers, fulfillment centers, service level selection, and declared value insurance.
mutation CreateShipment($input: ShipmentCreateWorkflowInput!) { shipmentCreateWorkflow(input: $input) { id status trackingDetails { number } serviceLevel { id name carrier { id name } } shipmentCartons { id carton { id width length height weight items { item { id amount description } } } label { url trackingNumber id documentFiling } } }}Variable options:
- With Fulfillment Center: Add
"fulfillmentCenter": "fulfillment_center_12345"to specify the origin location - With Custom Tracking: Set
"generateLabel": falseand add"trackingNumbers": ["tracking_1", "tracking_2"] - With Service Level: Add
"serviceLevel": "dhl.express_example"to select a specific carrier service - With Declared Value Insurance: Add
"isDeclaredValue": trueto enable declared value coverage
Declared value
Set "isDeclaredValue": true to enable declared value coverage for all items in your shipment. Zonos automatically claims the full value of all items submitted in the order; merchants cannot modify this amount. This sets the maximum liability the carrier will accept in case of loss, damage, or theft during transit. This feature is only supported for UPS, FedEx, and DHL shipments. Zonos automatically handles the carrier-specific implementation when you enable declared value, including the appropriate parameters in our API calls to these carriers, so you don't need to manage different carrier requirements.
UPS limitations: UPS only covers values between 100.01-50,000 USD and processes declared value at the carton level. For multi-carton shipments, merchants must split the shipment to designate coverage per carton. UPS also generates an additional insurance form (UPS Control Log) that must be printed with the labels for declared values over 999 USD.
FedEx and DHL: Process declared value at the shipment level with no additional restrictions.
Special services
Use specialServices on a carton to indicate special handling requirements for batteries, dry ice, dangerous goods, or signature requirements. See the special services guide for full details and examples.
Void a shipment
To cancel a created label, use the following mutation to void the shipment. Any associated labels will also be voided automatically. Note that once a shipment is voided, it cannot be updated or restored.
mutation { shipmentStatusUpdate( input: { shipment: "shipment_12345678-1234-1234-1234-123456789stu" status: VOIDED note: "Voiding shipment" } ) { id status }}
Créer un envoi pour des commandes existantes
Créez des envois et des étiquettes avec l'API Zonos après avoir calculé les coûts d'acquittement et créé des commandes.
GraphQL
Ce guide s'adresse aux utilisateurs déjà intégrés à l'API Zonos qui doivent créer des envois pour des commandes existantes. Si vous êtes une plateforme d'expédition, consultez notre guide API Shipment.
Si vous êtes intégré à l'API Zonos et autorisé à expédier en dehors de Dashboard, utilisez la mutation
shipmentCreateWorkflowpour créer des envois et fournir les informations de suivi. Ces mutations permettent également d'informer Zonos des envois domestiques vers des centres de cross-docking.Remarque : Si vous utilisez une application Duty and Tax avec une plateforme qui synchronise automatiquement les numéros de suivi vers Zonos, ou si vous expédiez directement via Dashboard, ces mutations ne sont pas requises.