UK VAT exchange rates API

Hi all,

A while back there was a discussion about accepting multiple currencies. This is something that I’ve set up for DataTables sales as well, but, as @rachelandrew indicates in the earlier thread, you need extra information in order to be able to do UK VAT accounting correctly.

To that end I wrote an API for use internally - a backend service consumes the data published by HMRC and stores it in a database that the API can query. I use this for the majority of my invoices now, and I thought some other bootstrappers in the UK might be able to benefit from it.

Information about the API is available in my blog and its own page, but in summary all you need to do is request the currency you want the published exchange rate for and it gives back a JSON object:

I hope one or more of you find it of some use!

Allan

3 Likes

The list of countries you used has some issues: Abu Dhabi and Dubai are listed as separate countries, but they are both part of the United Arab Emirates (ISO 3166-1 alpha-2 code AE).

Other than that, looks good!

Thanks for spotting that. The data comes straight from HMRC’s own XML file, so I’m not too sure why they break it up like that… I’ll try to find out :smile:

Allan