This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
@speedway Is using a third party API wrapper an option? If so a third party that uses a REST API to provide this same data would be much simpler to develop a workflow for. I was able to find a number of third parties that provide various alternatives to the SOAP API provided by europa.eu for VIES VAT validation. Using one of these third parties I was able to toss together a simple REST API example (See attached). The third party provider I used was isvat.eu and per their documentation all the data returned comes from the VIES VAT Validation System.
If using a third party is not an option the options to use eurpopa.eu's SOAP API would be to either mimic the form data submitted by their web form. This would require capturing network traffic for a successful form submission and indepth review of their html for the web form to piece the process together. The other option would be to develop a direct SOAP API integration which would require detailed documentation of the API and knowledge of how SOAP API's work. From looking at the information available it seems most of the SOAP API documentation is in the WSDL file rather than documented on their website. My experience with SOAP API's is also limited so I wasn't able to piece together a working example for you.
@speedway the wsdl document just describes the soap api. Think of it as the help manual. It provides information on the the available endpoints, what each endpoint expects for input, and possible responses. The xml returned by postman and the download tool when accessing this URL isn't helpful beyond this and won't return the VAT validation you are looking for. If I have some time I will see if I can get a working SOAP example created. Please keep in mind though that this will take a lot more effort to get working than the REST example I provided, and in the mean time it might be worth while to see if there is another REST API wrapper for the VIES validation service.
@speedway So I spent some time with the SOAP api this morning. After going through the WSDL and some examples I found online I was able to get a working SOAP request without having to replicate the form data used by the interactive website. The example injects the VAT number and country code into an XML request body for the SOAP api and passes it to the VIES service. The response back is an XML response with the validation information. I didn't bother parsing the response so you will need to do that on your own but this example should at least get you started with the SOAP api instead of using the alternative REST provider I originally recommended.