Direct API integration
Integrate with FlavorCloud
Integrating your cross border shipping experience has never been easier!
Below are the steps for a typical integration flow for creating and tracking shipments using the FlavorCloud APIs.
Step 1: In the checkout flow in your website, call the Post Rates endpoint to retrieve shipping rates for the customer. If the terms of trade on the shipment is DDP, then set “include_landed_cost”: “true” .
o Shipping rates will be served from flavorcloud for the best carrier, service level and route combination.
o You can then surface these rates in your website.
o Rate_hash_key is returned in the response and will be used later to create shipments.
Duty_hash_key is returned in the response and will be used later to create shipments.
Step 2: Register for a “SHIPMENT_COMPLETED” event by calling Subscribe to webhook endpoint. You will be notified when the shipment is created via a webhook. Use of the webhook mechanism is recommended.
On completion of checkout, call the Post shipment endpoint to create the shipment in FlavorCloud. This will lead to the selection of the carrier, confirmation of a rate and the generation of the tracking reference, relevant documentation and label.
o Include the rate_hash_key and duty_hash_key(if applicable) from the previous step in the request.
o Set the async flag to false to receive the response details (tracking number, label and docs) immediately. In this case, you don’t have register or listen for webhook notifications.
o Rerating of the shipment may occur if differences are detected on key fields like origin, destination address, pieces, weight and dimensions.
o Shipment_id is returned in the response and is used for retrieve shipment information.
Step 3: When you’re notified of the shipment-completed event via the webhook, you will receive the tracking, docs and label information as part of the webhook callback.
Alternatively (not recommended), you can poll for shipment tracking reference and documents by calling Get shipment endpoint
o Tracking_number is returned in the response and will be used later to retrieve detailed tracking information.
Certain carriers require creation of consolidation manifest which is used to complete the first mile pickup of the shipment and transport to the carrier consolidation site.
To create a consolidation manifest, call Post manifest shipment endpoint with the list of shipment ids to be added.
Register for a “SHIPMENT_COMPLETED” event by calling Subscribe to webhook endpoint . You will be notified when the shipment is created via a webhook.
To get the consolidation shipment label and docs, call Get manifest shipment endpoint
Step 4: For getting detailed tracking information, Register for a “TRACKING_UPDATES” event by calling Subscribe to webhook endpoint . You will be notified when there are tracking updates via a webhook.
Alternatively, you can call