The viesapi-cli.exe
client application allows for quick and automatic checking of entities (contractors) from the command line level (CLI / CMD) in terms of their current status in the VIES system. The application also allows you to save the downloaded data to a file in 3 formats:
- JSON
- PROP (list of properties in form of key = value)
- XML
Application has been successfully tested in the following versions of MS Windows: XP, 7, 10 and 11. The latest version of the application is always available for download from the Download page.
The full functionality of the application can be checked – without the need to create an account – using the provided Test API
To use the add-in in the production API, you need to set up an account on the viesapi.eu website, purchase a minimum of the Business plan and generate an API key and API key identifier.
The process of registering and setting up an account as well as generating keys has been described on the Documentation website.
Activation
The shared executable program viesapi-cli.exe
does not require installation and does not have to be run under an account with administrative privileges. To run the program, select the Command Prompt
application from the Start
menu or type cmd
in the Search programs and files
field and press Enter:
After starting the console, go to the directory where the zip file with viesapi-cli.exe
was downloaded and unpacked.
Starting the program without specifying parameters displays the help window.
Configuration
Launching the viesapi-cli.exe
application without specifying the API key ID
and API key
allows you to query the test environment (more details on the Test VIES API page).
In order to connect to the production environment, it is necessary to call out the viesapi-cli.exe
application with the authentication parameters, which are:
keyid
– the parameter should contain the API key identifier (ID) generated on the account on the viesapi.eu website,key
– the parameter should contain the API key (Key) generated on the account on the viesapi.eu website.
Details on generating the identifier and key are described on the Documentation page. Below is an example of calling the application with authentication parameters (keyid
and key
):
viesapi-cli.exe -keyid XXXXXXXXXXXX -key YYYYYYYYYYYY -vies -format xml
Calling syntax
Syntax of calling the viesapi-cli.exe
program:
viesapi-cli.exe <action>
Available actions:
-help
– description of program calling parameters
-vies
– current VIES system status
-account
– current account status
-data
– get company data from VIES
-data-parsed
– get company data from VIES with parsed data
-batch-upload
– upload batch of VAT numbers and get batch token
-batch-download
– check batch result and download data
Available options:
-keyid string
– API key identifier
-key string
– API key
-euvat number
– EU VAT ID number with country prefix
-token string
– batch token value
-format type
– output format type (json, prop, xml), default: json
-file-in path
– input file path
-file-out path
– output file path
-proxy url
– HTTP proxy configuration (as URL http://user:password@hostname:port
)
Examples
ATTENTION! The following examples are adapted to the data collected in the test environment. To perform checks on the production environment, add the –keyid
and –key
parameters with the appropriate values to each query.
1. Checks the current VIES system status and displays the result as XML:
viesapi-cli.exe -vies -format xml
2. Checks the current account status and saves the result to a JSON file:
viesapi-cli.exe -account -file-out result.json
.
3. Downloads company data from VIES and displays the result as PROP:
viesapi-cli.exe -data -euvat PL5213003700 -format prop
4. Downloads company parsed data from VIES and saves the result to a JSON file:
viesapi-cli.exe -data-parsed -euvat PL5213003700 -file-out result.json
5. Uploads a batch file (one number per line) and receives a batch token for result checking:
viesapi-cli.exe -batch-upload -file-in numbers.csv
6. Checks the current batch status and saves the result to a JSON file:
viesapi-cli.exe -batch-download -token 1fd853a5-ac9e-490c-81a1-d4900a9c906c -file-out result.json