Custom Connector for HMRC VAT Number Validation

I was scrolling through available API's on HMRC website and noticed this one which is in BETA:


This information would be very useful in PowerApps and also F&O, so I decided to create a custom connector around this API.

To do this I went to custom connectors section in PowerApps:


Then I clicked on New Custom Connector > Create from Blank.


I filled in the image, Host URL and clicked Security.


As this is an Open API and there is no security requirement, I just left this as is and went to the definition tab:


I filled in the various pieces of information here:


Then Clicked on new to create a new action for the first of the 2 available API's which is just to receive the VAT number without a reference number and then clicked on Import from Sample:


Checking the HMRC documents, this is a GET, so mark as GET and then I put in the URL, the URL is a combination of the Host URL and this end point /organisations/vat/check-vat-number/lookup/{targetVrn} when the Target VRN represents the VAT Reg Number you want to retrieve:




This should then create the input parameter you have in PowerAuomate like below:



For the response I put a sample URL in postman HTTP request and it returned the flowing, these will become the output of your step in PowerAutomate:


You can then test it:


Then you should get a response like below:


That's all for now, I will show you next how to use this connector within F&O to validate VAT Numbers.










 

Comments

Popular posts from this blog

"Exception while trying to get Virtual Entity metadata for entity" Error on Data Events

Electronic Reporting displaying Legal Entity Email/Phone by custom Address Purpose

Electronic Reporting Bank Statement Import parsing account number for BAI2.