Check a UK VAT number API
Date | Amount |
---|---|
Version and status | |
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 |
Overview
This API enables your application to:
- check if a UK VAT number is registered
- view the name and address of the business that the UK VAT number is registered to
- get a reference number that you can use to prove you checked a UK VAT number
The Check a UK VAT Number API works in two modes:
- Simple unverified check, which does not provide a reference number
- Verified check, which provides a reference number
Versioning
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.
Errors
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.
Testing
You can use the sandbox environment to test this API.
Access a set of mock VAT registration numbers to use when testing in the sandbox environment.
Endpoints
/organisations/vat/check-vat-number/lookup/{targetVrn}
Get a VAT registration
GET
Allows retrieval of name and address of a VAT registered company
Path parameters
Name | Description |
---|---|
targetVrn
string
required
|
UK VAT registration number you wish to check.
For example: |
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the version of the API that you want to call. See versioning.
|
See also fraud prevention.
Responses
HTTP status 200 (OK)
{ "target": { "name":"Credite Sberger Donal Inc.", "vatNumber":"553557881", "address":{ "line1":"131B Barton Hamlet", "postcode":"SW97 5CK", "countryCode":"GB" } }, "processingDate":"2019-01-31T12:43:17+00:00" }
HTTP status 400 (Bad Request)
{ "code": "INVALID_REQUEST", "message": "Invalid targetVrn - Vrn parameters should be 9 or 12 digits" }
Name | Description |
---|---|
message
string
required
|
|
code
string
required
|
|
HTTP status 404 (Not Found)
{ "code": "NOT_FOUND", "message": "targetVrn does not match a registered company" }
Name | Description |
---|---|
message
string
required
|
|
code
string
required
|
|
HTTP status 500 (Internal Server Error)
{ "code": "INTERNAL_SERVER_ERROR", "message": "Unknown error" }
Name | Description |
---|---|
message
string
required
|
|
code
string
required
|
|
Error scenarios
Scenario | HTTP status | Code |
---|---|---|
Invalid request |
400 (Bad Request) |
INVALID_REQUEST |
Not found |
404 (Not Found) |
NOT_FOUND |
Internal server error |
500 (Internal Server Error) |
INTERNAL_SERVER_ERROR |
For error scenarios that are common across all APIs, and for error formats, see our reference guide.
Close Section
/organisations/vat/check-vat-number/lookup/{targetVrn}/{requesterVrn}
Get a VAT registration with a reference number
GET
Retrieves the name and address of a UK VAT-registered business, if the business exists.
Path parameters
Name | Description |
---|---|
targetVrn
string
required
|
UK VAT registration number you want to check.
For example: |
requesterVrn
string
required
|
Your VAT registration number.
For example: |
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the version of the API that you want to call. See versioning.
|
See also fraud prevention.
Responses
HTTP status 200 (OK)
{ "target":{ "name":"Credite Sberger Donal Inc.", "vatNumber":"553557881", "address":{ "line1":"131B Barton Hamlet", "postcode":"SW97 5CK", "countryCode":"GB" } }, "requester":"146295999727", "consultationNumber":"ypAeKRPlW", "processingDate":"2019-01-31T12:53:05+00:00" }
HTTP status 400 (Bad Request)
{ "code": "INVALID_REQUEST", "message": "Invalid requesterVrn - Vrn parameters should be 9 or 12 digits" }
Name | Description |
---|---|
message
string
required
|
|
code
string
required
|
|
HTTP status 403 (Forbidden)
{ "code": "INVALID_REQUEST", "message": "requesterVrn does not match a registered company" }
Name | Description |
---|---|
message
string
required
|
|
code
string
required
|
|
HTTP status 404 (Not Found)
{ "code": "NOT_FOUND", "message": "targetVrn does not match a registered company" }
Name | Description |
---|---|
message
string
required
|
|
code
string
required
|
|
HTTP status 500 (Internal Server Error)
{ "code": "INTERNAL_SERVER_ERROR", "message": "Unknown error" }
Name | Description |
---|---|
message
string
required
|
|
code
string
required
|
|
Error scenarios
Scenario | HTTP status | Code |
---|---|---|
Invalid request |
400 (Bad Request) |
INVALID_REQUEST |
Invalid request |
403 (Forbidden) |
INVALID_REQUEST |
Not found |
404 (Not Found) |
NOT_FOUND |
Internal server error |
500 (Internal Server Error) |
INTERNAL_SERVER_ERROR |
For error scenarios that are common across all APIs, and for error formats, see our reference guide.
Close Section