Create a quote
Describe the shipment, and we price it with each carrier that can take it. Each estimate in the answer can be booked with Create an order.
Parameters
- purpose_of_shipment_idintegerRequired
The incoterm the goods move under, which settles who pays duties and taxes. Take the id from List purposes of shipment.
Read the ids from List purposes of shipment in the environment you are calling: they differ between the sandbox and production. - reason_for_shipment_idinteger
Why the goods are moving, for customs. Take the id from List reasons for shipment. Left out, we use documents for a document shipment and our default reason for anything else.
Read the ids from List reasons for shipment in the environment you are calling: they differ between the sandbox and production. - value_of_goodsintegerRequired
What the goods are worth in total, at least 1. Customs duties and insurance are worked out from it.
- value_of_goods_currency_idstring
The currency of
value_of_goodsand of each item's value, as a three-letter code from List currencies. - description_of_contentsstring
What is in the shipment, in a few words a customs officer understands. At most 70 characters.
- mass_unitenumRequired
The unit every weight in this request is in.
Possible enum valueskglb - distance_unitenumRequired
The unit every package size in this request is in.
Possible enum valuescminch - is_documentboolean
truewhen the shipment holds only papers. Documents need no items declared. - is_stackableboolean
truewhen other freight may be stacked on top of the packages. - is_liftgate_requiredboolean
truewhen the vehicle needs a lift to load or unload, because there is no loading dock. - is_shipment_protection_requiredboolean
trueto insure the goods for their declared value. - origin_addressobject
Where the carrier collects the goods. Needed to price the shipment.
- destination_addressobject
Where the goods are delivered. Needed to price the shipment.
- packagesarray of objects
Each box or pallet in the shipment. Needed to price the shipment.
- hs_codesarray of objects
Each kind of item in the shipment, as customs sees it. Leave out for a document shipment.
Returns
Returns the quote.
Errors
- 400Bad RequestThe request body isn't valid JSON, or something failed on our side.
- 401UnauthorizedThe token is missing, expired or invalid. Sign in again.
- 422Unprocessable ContentThe request was refused.
errorsays why in one sentence, anderrorslists each reason. - 429Too Many RequestsToo many requests. Wait a little and try again.
1curl -X POST "https://sandbox-api.vatit-stream.com/client_api/v2/quotes" \2 -H "Authorization: Bearer $API_TOKEN" \3 -H "Content-Type: application/json" \4 -d '{5 "purpose_of_shipment_id": 73,6 "reason_for_shipment_id": 45,7 "value_of_goods": 18500,8 "value_of_goods_currency_id": "ZAR",9 "description_of_contents": "Cotton shirts and denim trousers",10 "mass_unit": "kg",11 "distance_unit": "cm",12 "is_document": false,13 "is_stackable": true,14 "is_liftgate_required": false,15 "is_shipment_protection_required": false,16 "origin_address": {17 "name": "Thandi Mokoena",18 "company": "Global Trade Corp",19 "address_1": "14 Bree Street",20 "address_2": "Unit 3",21 "city": "Cape Town",22 "province": "Western Cape",23 "postal_code": "8001",24 "country_id": 23,25 "email": "dispatch@globaltradecorp.example",26 "phone": "+27 21 555 0142",27 "classification": "business"28 },29 "destination_address": {30 "name": "Oliver Bennett",31 "company": "Bennett & Hale Ltd",32 "address_1": "221 Shoreditch High Street",33 "address_2": "Floor 2",34 "city": "London",35 "province": "Greater London",36 "postal_code": "E1 6PJ",37 "country_id": 24,38 "email": "goods-in@bennetthale.example",39 "phone": "+44 20 7946 0321",40 "classification": "business"41 },42 "packages": [43 {44 "weight": 12.5,45 "length": 60,46 "width": 40,47 "height": 3548 }49 ],50 "hs_codes": [51 {52 "code": "620342",53 "country_id": 23,54 "description": "Men'\''s cotton trousers",55 "quantity": 40,56 "item_value": 250,57 "item_mass": 0.258 },59 {60 "code": "620520",61 "country_id": 23,62 "description": "Men'\''s cotton shirts",63 "quantity": 60,64 "item_value": 141.67,65 "item_mass": 0.07566 }67 ]68 }'
{"quote": {"id": 39,"dirty": false,"errors": [],"estimate_taxes_and_duties": false,"estimates": [{"billable_weights": {"metric": {"packages": 1,"mass_unit": "kg","distance_unit": "cm","volumetric_weight": 16.8,"weight": 12.5,"billable_weight": 16.8,"volume": 0.084},"imperial": {"packages": 1,"mass_unit": "lb","distance_unit": "inches","volumetric_weight": 37.04,"weight": 27.56,"billable_weight": 37.04,"volume": 2.9664316254643865}},"estimate_id": 34,"line_items": [{"cost": 2184.5,"currency_id": "ZAR","description": "Freight"},{"cost": 393.21,"currency_id": "ZAR","description": "Fuel surcharge"},{"cost": 450,"currency_id": "ZAR","description": "Customs clearance"}],"quote_expired": false,"shipping_company": "FedEx","shipping_service": "International Priority"}],"hub_transit": false}}