This version is in beta - expect some breaking changes.

Check a UK VAT number API

Dates and amounts
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:

  1. Simple unverified check, which does not provide a reference number
  2. 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.

Skip to main content

Endpoints

/organisations/vat/check-vat-number/lookup/{targetVrn}

Get a VAT registration
GET

Allows retrieval of name and address of a VAT registered company

Authorisation

This endpoint is open access and requires no Authorization header.

Path parameters

Path parameters table
Name Description
targetVrn
string
required

UK VAT registration number you wish to check.
A 9-digit or 12-digit number.

For example: 123456789

Request headers

Request headers Table
Name Description
Accept
required

Specifies the version of the API that you want to call. See versioning.

For example:

See also fraud prevention.

Response

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"
}

Error scenarios

Error scenarios table
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.

Authorisation

This endpoint is open access and requires no Authorization header.

Path parameters

Path parameters table
Name Description
targetVrn
string
required

UK VAT registration number you want to check.
A 9-digit or 12-digit number.

For example: 123456789

requesterVrn
string
required

Your VAT registration number.
A 9-digit or 12-digit number.

For example: 123456789

Request headers

Request headers Table
Name Description
Accept
required

Specifies the version of the API that you want to call. See versioning.

For example:

See also fraud prevention.

Response

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"
}

Error scenarios

Error scenarios table
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

Skip to main content