API Documentation

Our API endpoint allows you to integrate vehicle transportation costs into your own systems, including UK/EU Transport, International shipping, IVA testing, DVLA, Import Tax & Duty and more

Authentication

This endpoint requires authentication. Include a valid API Key in the request:

  • Header: x-api-key: YOUR_API_KEY

If you would like to apply for an API key, please contact nick@shipmycar.co.uk

Get All Costs

This API endpoint calculates potential vehicle transportation costs, determines if a route is quotable, and provides a breakdown of costs where applicable. It handles various route types including UK domestic, UK-EU, EU-UK, and International routes, incorporating driving distance calculations, port lookups, database route checks, IVA / MOT Testing, DVLA registration, and tax estimations.

Endpoint

POST /api/getallcosts

Request Body

The request body must be in JSON format (`Content-Type: application/json`).

FieldTypeRequiredMax LenDescriptionExample
vehicleYearNumberYesN/AThe manufacturing year of the vehicle (e.g., YYYY).1966
vehicleMakeStringYes100The make/manufacturer of the vehicle."Ford"
vehicleModelStringYes100The model of the vehicle."Mustang"
vehicleValueNumberYesN/AThe estimated value of the vehicle (non-negative).10000
vehicleCurrencyStringYes3The 3-letter ISO currency code for the `vehicleValue`."USD"
collectionAddressStringYes250The full collection address. Must be specific enough for geocoding (e.g., include city/state/country)."kansas, usa"
deliveryAddressStringYes250The full delivery address. Must be specific enough for geocoding."cardiff, uk"
collectionCountryStringYes100The country where collection occurs. Should match values recognized by the system (e.g., "United States")."United States"
deliveryCountryStringYes100The country where delivery occurs. Should match values recognized by the system (e.g., "United Kingdom")."United Kingdom"
targetCurrencyStringYes3The 3-letter ISO currency code for the desired output currency. All cost values will be converted to this currency."GBP"

Success Response (Status Code: 200 OK)

The response body will be in JSON format.

FieldTypeDescription
quotableBoolean`true` if a price can be estimated (driving distance found OR valid port-to-port database route found), `false` otherwise.
routeIdNumber / NullThe internal ID of the database route used for port-based international routes. `null` for driving routes (UK/EU).
closestOriginPortObject / NullDetails of the closest origin port found for port-based routes. `null` for driving routes. Object format: `{ "id": String, "name": String, "countryCode": String, "coordinates": [Number, Number] }`.
closestDestinationPortObject / NullDetails of the closest destination port found for port-based routes. `null` for driving routes. Object format: `{ "id": String, "name": String, "countryCode": String, "coordinates": [Number, Number] }`.
import_vatNumberEstimated UK Import VAT based on vehicle value, age, and origin. Calculated only for quotable UK import routes (`eu-to-uk`, `international-to-uk`). `0` otherwise.
import_dutyNumberEstimated UK Import Duty based on vehicle value, age, and origin. Calculated only for quotable UK import routes (`eu-to-uk`, `international-to-uk`). `0` otherwise.
quoteCostItemsArray / NullAn array of detailed cost items that make up the quote. Includes shipping, handling, testing, registration etc. Each item contains details such as description, amount, VAT, and other attributes. `null` if an error occurred during item processing.
totalFreightCostNumberThe total cost of all freight-related items (shipping, handling, transport) before taxes.
totalRegCostsNumberThe total cost of all registration-related items (testing, DVLA fees, etc.) before taxes.
totalCostExTaxesNumberThe total cost of all items excluding taxes (VAT, import duties).
totalCostNumberThe grand total cost including all items and applicable taxes.
finalCurrencyStringThe 3-letter ISO currency code that all monetary values are expressed in. This will match the requested `targetCurrency`.
exchangeRateToGBPNumberThe exchange rate used to convert between GBP and the `finalCurrency`. This is the rate of finalCurrency to 1 GBP.

quoteCostItems Object Structure

FieldTypeDescription
quoteCostIdString / NumberUnique identifier for the cost item. May be a string ID or a numeric ID.
descriptionStringDescription of the cost item (may include route details, services provided, etc).
amountNumberThe calculated amount for this specific line item (excluding VAT).
vatNumberThe VAT amount specifically applied to this line item (if any).
optionalBooleanWhether this cost item is considered optional.
orderKeyNumberA key used for sorting/ordering items in display.
isFreightOptionBooleanWhether this cost item is a freight option.
isUnloadingChargeBooleanWhether this cost item relates to unloading charges.
fullDescString / NullA more detailed description of the service, may include HTML formatting.
freightRelatedBooleanWhether this cost item relates directly to freight charges (e.g., shipping, port fees) or to other services (e.g., testing, registration, admin).

Error Responses

Status Code: 400 Bad Request

  • Cause: Invalid JSON format in the request body OR missing/invalid required input parameters (e.g., address too long, non-numeric year).
  • Response Body Example:
    { "error": "Missing or invalid required parameters.", "details": [ "Valid vehicleYear required.", "collectionAddress required and must be 250 chars or less.", "targetCurrency required and must be a valid 3-letter currency code." ] }

Status Code: 500 Internal Server Error

  • Cause: An unexpected error occurred on the server during processing (e.g., database connection issue, failed geocoding for a valid-looking address, unhandled code error).
  • Response Body Example:
    { "error": "An unexpected error occurred while processing your request.", "quotable": false, "routeId": null, "closestOriginPort": null, "closestDestinationPort": null, "transportCost": null, "distanceMiles": null, "import_vat": 0, "import_duty": 0, "quoteCostItems": null }

Examples

Example Request (US to UK with Classic Car)

{ "vehicleYear": 1966, "vehicleMake": "Ford", "vehicleModel": "Mustang", "vehicleValue": 10000, "vehicleCurrency": "USD", "collectionAddress": "kansas, usa", "deliveryAddress": "cardiff, uk", "collectionCountry": "United States", "deliveryCountry": "United Kingdom", "targetCurrency": "GBP" }

International to UK Response (US to UK with Classic Car)

{ "quotable": true, "routeId": 2, "closestOriginPort": { "id": "2", "name": "Houston", "countryCode": "US", "coordinates": [ -94.988122, 29.673089 ] }, "closestDestinationPort": { "id": "5", "name": "ShipMyCar UK Depot", "countryCode": "GB", "coordinates": [ -1.401047, 50.9242 ] }, "import_vat": 370.01, "import_duty": 0, "quoteCostItems": [ { "description": "US Customs and Loading Fees", "amount": 195, "vat": 0, "quoteCostId": 15, "orderKey": 2, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "fullDesc": "We carry out all US customs paperwork on your behalf including and security checks<br/><br/>Our specially trained port operators will then carefully load your vehicle into a container and strap & chock so it will not move at all during transit", "freightRelated": true }, { "description": "Port-to-Port Shipping (consolidated container)", "amount": 1095, "vat": 0, "quoteCostId": 1479, "orderKey": 3, "isFreightOption": false, "isUnloadingCharge": false, "optional": true, "fullDesc": "<p>This price is for a consolidated container, which means your vehicle will be in a container with another car. This is sometimes called 'shared' container shipment.<br /><br />This is a completely safe way of shipping, all cars are loaded into containers by our trained port operators and shipped using only shipping lines that specialise in vehicle shipments.<br /><br />Consolidated container shipments can take longer to clear US customs and to ship, therefore you can opt for your own 20ft container", "freightRelated": true }, { "description": "HMRC Customs Clearance & NOVA Service", "amount": 150, "vat": 0, "quoteCostId": "HMRC_CLEARANCE_NOVA", "orderKey": 5, "freightRelated": false }, { "description": "Fully Comprehensive Marine Insurance (450GBP excess)", "amount": 200, "vat": 0, "quoteCostId": 29, "orderKey": 6, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "fullDesc": "Our marine insurance policy covers any damage made during transit. ", "freightRelated": true }, { "description": "UK Terminal Handling Charges", "amount": 175, "vat": 0, "quoteCostId": 30, "orderKey": 7, "isFreightOption": false, "isUnloadingCharge": true, "optional": false, "fullDesc": "<p>When the ship docks at the UK port, we have your container unloaded from the vessel and have to pay the terminal handling and shipping line charges to do so.</p>", "freightRelated": true }, { "description": "Container Unloading, Customs Clearance and NOVA", "amount": 245, "vat": 0, "quoteCostId": 32, "orderKey": 8.05, "isFreightOption": false, "isUnloadingCharge": true, "optional": false, "fullDesc": "<p>Once container is unloaded from vessel we have to truck it to our unloading depot in Milton Keynes for unloading.</p> <p>We then carry ou customs clearance and submit the vehicle to the HMRC NOVA system which is required for DVLA registration at a later date.</p>", "freightRelated": true }, { "description": "Historic MOT Test Fee", "amount": 54.85, "vat": 0, "quoteCostId": "MOT_TEST_HISTORIC", "orderKey": 70, "freightRelated": false }, { "description": "DVLA Registration Fee", "amount": 55, "vat": 0, "quoteCostId": "DVLA_REG_FEE", "orderKey": 80, "freightRelated": false }, { "description": "Free Road Tax (Historic Vehicle)", "amount": 0, "vat": 0, "quoteCostId": "ROAD_TAX_FREE_HISTORIC", "orderKey": 85, "freightRelated": false }, { "quoteCostId": "ROAD_TRANSPORT_UK_DB", "description": "UK Road Transport - From: ShipMyCar, Tanners Drive, Milton Keynes, MK14 5BN, UK to Cardiff, Cardiff, Wales, United Kingdom", "amount": 291.98, "vat": 48.66, "orderKey": 97, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "freightRelated": true }, { "description": "UK Number Plates", "amount": 25, "vat": 5, "quoteCostId": "UK_NUMBER_PLATES", "orderKey": 98, "freightRelated": false }, { "description": "ShipMyCar Administration Fee", "amount": 275, "vat": 0, "quoteCostId": 39, "orderKey": 9999, "isFreightOption": false, "isUnloadingCharge": false, "optional": true, "fullDesc": "<p>This is a non refundable cost for all of our services</p>", "freightRelated": false }, { "quoteCostId": "INT_ROAD_TRANSPORT_11_US", "description": "Road Transport in US: From Kansas, United States to Houston ", "amount": 1120.81, "vat": 0, "orderKey": 0, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "freightRelated": true } ], "totalFreightCost": 3322.79, "totalRegCosts": 564.85, "totalCostExTaxes": 3887.64, "totalCost": 4257.65, "finalCurrency": "GBP", "exchangeRateToGBP": 1 }

UK to UK Domestic Transport Response

Request example: Tesla Model 3 from Manchester to Cardiff

{ "quotable": true, "routeId": null, "closestOriginPort": null, "closestDestinationPort": null, "import_vat": 0, "import_duty": 0, "quoteCostItems": [ { "quoteCostId": "ROAD_TRANSPORT_UK_DB", "description": "UK Road Transport - From: Manchester, Greater Manchester, England, United Kingdom to Cardiff, Cardiff, Wales, United Kingdom ", "amount": 377.42, "vat": 62.9, "orderKey": 10, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "freightRelated": true } ], "totalFreightCost": 377.42, "totalRegCosts": 0, "totalCostExTaxes": 377.42, "totalCost": 377.42, "finalCurrency": "GBP", "exchangeRateToGBP": 1 }

UK Export to International Response

Request example: Land Rover Defender from Cardiff to Kansas, USA

{ "quotable": true, "routeId": 28, "closestOriginPort": { "id": "5", "name": "ShipMyCar UK Depot", "countryCode": "GB", "coordinates": [ -1.401047, 50.9242 ] }, "closestDestinationPort": { "id": "2", "name": "Houston", "countryCode": "US", "coordinates": [ -94.988122, 29.673089 ] }, "import_vat": 0, "import_duty": 0, "quoteCostItems": [ { "quoteCostId": "ROAD_TRANSPORT_UK_DB", "description": "UK Collection & Transport to ShipMyCar UK Depot", "amount": 272.32, "vat": 45.39, "orderKey": 1, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "freightRelated": true }, { "description": "Customs Clearance and Loading", "amount": 150, "vat": 0, "quoteCostId": 11229, "orderKey": 2, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "fullDesc": "Vehicle will be loaded onto vessel, and secured ready for shipping.<br/><br/>All export paperwork carried out on your behalf", "freightRelated": false }, { "description": "Port-to-Port Shipping (consolidated container)", "amount": 1695, "vat": 0, "quoteCostId": 11222, "orderKey": 3, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "fullDesc": "<p>Your vehicle will be loaded into a shared container using R-Raks - this is a very safe method of shipping", "freightRelated": true }, { "description": "Fully Comprehensive Marine Insurance (450GBP excess)", "amount": 500, "vat": 0, "quoteCostId": 11223, "orderKey": 4, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "fullDesc": "Our marine policy is fully comprehensive and charged at a competitive rate", "freightRelated": true }, { "quoteCostId": "INT_ROAD_TRANSPORT_11_US", "description": "Road Transport in US: From Houston to Kansas, United States ", "amount": 1119.75, "vat": 0, "orderKey": 95, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "freightRelated": true }, { "description": "**Arrival Charges and any applicable import tax / duties are not included in this estimate - please contact us for further information **", "amount": 0, "vat": 0, "quoteCostId": 3552574, "orderKey": 1000, "isFreightOption": false, "isUnloadingCharge": false, "optional": false, "fullDesc": null, "freightRelated": false }, { "description": "ShipMyCar Administration Fee", "amount": 275, "vat": 0, "quoteCostId": 39, "orderKey": 9999, "isFreightOption": false, "isUnloadingCharge": false, "optional": true, "fullDesc": "<p>This is a non refundable cost for all of our services</p>", "freightRelated": false } ], "totalFreightCost": 3587.07, "totalRegCosts": 425, "totalCostExTaxes": 4012.07, "totalCost": 4012.07, "finalCurrency": "GBP", "exchangeRateToGBP": 1 }

UK to EU Transport Response

Request example: Tesla Model 3 from Cardiff to Paris

{ "quotable": true, "routeId": null, "closestOriginPort": null, "closestDestinationPort": null, "import_vat": 0, "import_duty": 0, "quoteCostItems": [ { "description": "Fully Insured Road Transport by open transport from Cardiff, Cardiff, Wales, United Kingdom to Paris, France.<br>Includes all EU export clearances and UK Customs Clearance and NOVA.<br>Excludes any applicable import tax/duty.", "amount": 2530.9, "vat": 0, "quoteCostId": "EU_TRANSPORT_COMBINED_10_2", "orderKey": 10, "freightRelated": true } ], "totalFreightCost": 2530.9, "totalRegCosts": 0, "totalCostExTaxes": 2530.9, "totalCost": 2530.9, "finalCurrency": "GBP", "exchangeRateToGBP": 1 }

EU to UK Transport Response

Request example: Tesla Model 3 from Paris to Cardiff

{ "quotable": true, "routeId": null, "closestOriginPort": null, "closestDestinationPort": null, "import_vat": 5000, "import_duty": 0, "quoteCostItems": [ { "description": "Fully Insured Road Transport by open transport from Paris, France to Cardiff, Cardiff, Wales, United Kingdom.<br>Includes all EU export and UK import clearances.<br>Excludes any applicable import tax/duty which is quoted separately.", "amount": 2540.5, "vat": 0, "quoteCostId": "EU_TRANSPORT_COMBINED_10_1", "orderKey": 10, "freightRelated": true } ], "totalFreightCost": 2540.5, "totalRegCosts": 0, "totalCostExTaxes": 2540.5, "totalCost": 7540.5, "finalCurrency": "GBP", "exchangeRateToGBP": 1 }

Error Response (400 Bad Request - Invalid Parameters)

{ "error": "Missing or invalid required parameters.", "details": [ "Valid vehicleYear required.", "collectionAddress required and must be 250 chars or less.", "targetCurrency required and must be a valid 3-letter currency code." ] }

Error Response (500 Server Error)

{ "error": "An unexpected error occurred while processing your request.", "quotable": false, "routeId": null, "closestOriginPort": null, "closestDestinationPort": null, "transportCost": null, "distanceMiles": null, "import_vat": 0, "import_duty": 0, "quoteCostItems": null }