VIES VAT check - Generic Web Service Client

Hi,

I’m trying to implement a VAT number check using the EU’s VIES VAT checker webservice via the Generic Web Service Client.
https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
You can find more information here: Vies on-the-Web - European Commission (europa.eu)
Please note that I’m not using the testserver, but the actual one. It looks exactly the same though.

I’m always getting the following error which I’m stuck with:

Failed on row “Row0”: Index 2 out of bounds for length 2

My input table looks like this.

RowID Country VAT number FullVATNumber
Row0 NL 002564440B01 NL002564440B01

I’ve attached the my workflow for convenience.

Does anybody have an idea what the issue is?
VAT number check.knwf (12.9 KB)

1 Like

Hello @robvp,

I’ve uploaded on my public space a template you could use to query VIES with the VAT number.
Please lookup workflow: LOOKUP_VIES_VAT_NUMBER – KNIME Community Hub
Some sample are included in the “Table Creator” for you to understand how it works (quite easy, you’ll see).

Normally, VIES use SOAP protocol (xml). But you can use the same logic of API’s also. For this, you just have to send a GET request with this query :slight_smile: :

https://ec.europa.eu/taxation_customs/vies/rest-api/ms/XX/vat/#############

Just replace the XX by the country code (2 char iso country that VAT number should start with) and the # by the VAT number (after the country code). There is no authentification needed but there is a limit rate. In this case, you will receive a “MS_MAX_CONCURRENT_REQ” status.

For the limit rate, and before querying, you should first check that your VAT number is correct (maybe with a regex) and check the last date query for every row and query old data only.

Then the response should be treated with a “JSON Path” node :


GB are not included anymore. For that, you should use GOV.UK service (free also).

Please also check the list of country available and the availability of data (some are down for a certain time, so you will not have any response 200).

Hope it helps :slight_smile:
Best regards,
Samir

3 Likes

Thanks Samir!! I’ll have a look to see whether I’ll understand.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.