phprestsoappostman

Using EU VIES REST Service to check VAT Number


So i'm trying to check VAT Numbers using the REST Service the EU provides.

Here is some documentation about it:
https://ec.europa.eu/taxation_customs/vies/#/technical-information

I'm using Postman for a check. Using this URL:
https://ec.europa.eu/taxation_customs/vies/rest-api/check-vat-test-service

The request body JSON example:

{
  "countryCode": "DE",
  "vatNumber": "DE129273398",
  "requesterMemberStateCode": "DE",
  "requesterNumber": "DE811115368",
  "traderName": "Bayerische Motoren Werke Aktiengesellschaft",
  "traderStreet": "Petuelring 130",
  "traderPostalCode": "80809",
  "traderCity": "München",
  "traderCompanyType": "AG"
}

I always (for over a week) get the answer the service is not available:

{
  "actionSucceed" : false,
  "errorWrappers" : [ {
    "error" : "SERVICE_UNAVAILABLE"
  } ]
}

When using this URL:
https://ec.europa.eu/taxation_customs/vies/rest-api/check-vat-number

with the same request body i always get:

{
    "countryCode": "DE",
    "vatNumber": "DE811115368",
    "requestDate": "2023-11-04T14:19:45.180Z",
    "valid": false,
    "requestIdentifier": "",
    "name": "---",
    "address": "---",
    "traderName": "---",
    "traderStreet": "---",
    "traderPostalCode": "---",
    "traderCity": "---",
    "traderCompanyType": "---",
    "traderNameMatch": "NOT_PROCESSED",
    "traderStreetMatch": "NOT_PROCESSED",
    "traderPostalCodeMatch": "NOT_PROCESSED",
    "traderCityMatch": "NOT_PROCESSED",
    "traderCompanyTypeMatch": "NOT_PROCESSED"
}

Am i doing something wrong?


Solution

  • Afaik detailed information on the holder is not available for German VAT numbers. If you omit the "DE" prefix from the fields vatNumber and requesterNumber, you will get a result for valid from https://ec.europa.eu/taxation_customs/vies/rest-api/check-vat-number though.

    If you test with a Austrian VAT#, for example, you'll get more information.

    {
      "countryCode": "AT",
      "vatNumber": "U18522105",
      "requesterMemberStateCode": "DE",
      "requesterNumber": "811115368"
    }
    

    results in

    {
        "countryCode": "AT",
        "vatNumber": "U18522105",
        "requestDate": "2023-11-04T15:00:25.677Z",
        "valid": true,
        "requestIdentifier": "WAPIAAAAYua2Xl4O",
        "name": "KSR Group GmbH",
        "address": "Im Wirtschaftspark 15\nAT-3494 Gedersdorf",
        "traderName": "---",
        "traderStreet": "---",
        "traderPostalCode": "---",
        "traderCity": "---",
        "traderCompanyType": "---",
        "traderNameMatch": "NOT_PROCESSED",
        "traderStreetMatch": "NOT_PROCESSED",
        "traderPostalCodeMatch": "NOT_PROCESSED",
        "traderCityMatch": "NOT_PROCESSED",
        "traderCompanyTypeMatch": "NOT_PROCESSED"
    }