Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone,
I am trying to connect to the VIES database SOAP API. This database returns if a VAT-number is valid and known within the EU.
I want to implement this into a table, however that is step two.
For now I am just trying to figure out how to get the API to work and return the desired value.
This is what my current query looks like:
let
SourceURL = "http://ec.europa.eu/taxation_customs/vies/checkVatTestService.wsdl",
options = [ #"Accept-Encoding"= "gzip,deflate",
SOAPAction="",
#"Content-Type"="text/xml;charset=UTF-8",
#"Connection"="Keep-Alive"
],
WebContent = Web.Contents("http://ec.europa.eu/taxation_customs/vies/checkVatTestService.wsdl",
[Content=Text.ToBinary("
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv=#(0022)http://schemas.xmlsoap.org/soap/envelope/#(0022) xmlns:urn=#(0022)urn:ec.europa.eu:taxud:vies:services:checkVat:types#(0022)>
<soapenv:Header/>
<soapenv:Body>
<urn:checkVat>
<urn:countryCode>NL</urn:countryCode>
<urn:vatNumber>810433941B01</urn:vatNumber>
</urn:checkVat>
</soapenv:Body>
</soapenv:Envelope>
"),
Headers=options]) ,
XmlContent = Xml.Tables(WebContent)
in
XmlContent
in the body I need to provide the countryCode and vatNumber, however the 'final' query just seems to show some metadata regarding the api, I do not get the desired response, being for example 'VAT valid'.
Does anyone have any tips on how to get this to work?
Solved! Go to Solution.
You are using the wrong URL. checkVatTestService can only be used with VAT numbers 100 or 200, and only to test if the service is up.
By the way, the website uses a REST API instead. Much simpler.
https://ec.europa.eu/taxation_customs/vies/rest-api/ms/NL/vat/810433941B01
Hi @SuperFiets_ ,
By 'VAT valid', are you referring to the following document:
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You are using the wrong URL. checkVatTestService can only be used with VAT numbers 100 or 200, and only to test if the service is up.
By the way, the website uses a REST API instead. Much simpler.
https://ec.europa.eu/taxation_customs/vies/rest-api/ms/NL/vat/810433941B01
Hi,
Thanks for your response, the image you supplied is the exact api response I am looking for.
Did you do this through Power BI? Or through something else?
Also where did you find the documentation or something similair saying that there is a REST API available? On the official site all I can find is documentation about a SOAP API.
I went to the website and examined the network traffic upon pressing the form button.
Do you need the Power Query code?
No thank you very much!
I figured it out with the link you supplied!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
54 | |
54 | |
37 | |
29 |
User | Count |
---|---|
78 | |
64 | |
45 | |
40 | |
40 |