This version is in beta - expect some breaking changes.
VAT (MTD) API
|Available in Sandbox||Yes|
|Sandbox base URL||https://test-api.service.hmrc.gov.uk|
|Available in Production||Yes|
|Production base URL||https://api.service.hmrc.gov.uk|
Making Tax Digital introduces digital record-keeping for VAT-registered businesses. Those that are above the VAT threshold will be mandated to use this service from April 2019. Those that are below the threshold can use this service voluntarily. HMRC customers (and their agents) will use digital record-keeping software to interact directly with our systems via the MTD APIs.
The MTD VAT API allows software to supply business financial data to HMRC, so that clients can fulfil their obligations.
For more background on the VAT API, see the MTDfB VAT Guide for Vendors.
How it works
- The client (or their agent) enters their VAT account information into the software.
- The software updates HMRC via the API.
- The API submits this information to an HMRC systems database, where the client’s liability is stored to establish whether the client has met their obligations.
It will probably become compulsory to supply header information for this API to prevent fraud. We recommend that you include this now.
Technical issues with the API can be raised via the Software Development Support Team (SDST). Technical support is also available via the API Github page. Please note that Github should be used for technical queries only.
- some APIs may be marked “test only” - this means that they are not available for use in production and may change
- some APIs may be marked “canned” - this means they will return a pre-defined response that may not align with the data provided
It may not be possible to test all scenarios in the sandbox. You can test some scenarios by passing the Gov-Test-Scenario header. Documentation for each endpoint includes a Test data section, which explains the scenarios that you can simulate using the Gov-Test-Scenario header.
If you have a specific testing need that is not supported in the sandbox, contact our support team.
When an API changes in a way that is backwards-incompatible, we increase the version number of the API. See our reference guide for more on versioning.
We use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:
- 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action
- 400 to 499 if it failed because of a client error by your application
- 500 to 599 if it failed because of an error on our server
Errors specific to each API are shown in the Endpoints section, under Response. See our reference guide for more on errors.