Check TIN (Tax Identification Numbers) from Database against public Webservice of European Commission

Dear all,

I could use a little help with sending of webservice request for any entry in the source database.

What I try to manage:
I would like to send a webservice request to the public TIN-on-Web-Webservice of the European Commission for validating TIN (Tax Identification Numbers) saved in our Database.

Information about this Webservice:
https://ec.europa.eu/taxation_customs/tin/#/check-tin
ToW-ProgrammingGuide.zip (134.1 KB)

Example of source table:

ALLGNR ALSTAN ALTIN
6123 DE 53497136022
1 DE 48493105276
12508 DE 79426055813

The Result of the Webservice-Request should be appended to the EasyMorph source table.
The Webservice will answer with the following fields in XML-Format: countryCode, tinNumber, requestDate, validStructure, validSyntax (optional; only included if validStructure is true).

Example of result table:

ALLGNR ALSTAN ALTIN WSAcountryCode WSAtinNumber WSArequestDate WSAvalidStructure WSAvalidSyntax
6123 DE 53497136022 DE 53497136022 2021-05-16+01:00 true true
1 DE 48493105276 DE 48493105276 2021-05-16+01:00 true true
12508 DE 79426055814 DE 79426055814 2021-05-16+01:00 true false

Could somebody help me out?

Best regards,
Patrick

Please, what kind of help do you need?

Hi Patrick,

The ProgrammingGiude didn’t help much. However, I used the DevTools in Chrome to track and analyze the web-request generated on the page you provided TIN on-the-Web - European Commission and it turns out it makes a simple HTTP POST request to https://ec.europa.eu/taxation_customs/tin/rest-api/tinRequest with the following payload (country code and TIN are taken from your example):

{msCode: "DE", tinNumber: "53497136022"}

So I reproduced the same request in the project below. You can modify it to run iterations.
europe-tin.morph (3.2 KB)