Command-line tools
You can interact with the Invoicetronic API from the command line. That is convenient because you don't need to be a programmer and you can automate tasks via cronjobs or other means. This page presents you with two convenient tools to achieve this goal.
invoice
. Easily exchange invoice files from the command line.curl
. The de facto standard in command line data transfer.
invoice
You don't need to learn the API or any programming language to send and receive
invoices. The invoice
command lets you quickly and intuitively
exchange invoice file(s) from the command line.
At a glance
Sending an invoice can be as simple as issuing this command:
Say you have many files to upload, you can use wildcards:In the first line above, we're also deleting files from the disk once successfully uploaded.
Receiving files is also super simple:
The above will download all new invoices and store them in the current directory.
Quickstart
How to use invoice
with the Invoicetronic API
Features
The invoice
command is designed for simplicity and has just one clear goal: to
exchange invoice file(s) from the command line. There are very few specific
commands, each geared towards a simple task.
Upload
The send
command uploads invoice file(s) to the SDI.
- Plain invoice file (.xml)
- Signed invoice file (.xml.p7m)
- Base64-encoded invoice file
- Bulk upload
- Pre-flight invoice validation (option)
- Delete local file(s) once successfully uploaded (option)
- Apply a digital signature to unsigned files (option)
Download
The receive
and get
commands download invoices from the SDI.
- Single invoice
- Bulk download
- Save to a specific destination (option)
- Only unread invoices (option)
- As JSON, to pipe the output to more tools (option)
- Delete remote invoice once successfully downloaded (option)
Configuration
The config
command lets us persist some settings so we don't have to repeat ourselves:
- Verbose mode on/off
- API key persistence
- Remote host address
- Use alternate config file
Installation Guide
invoice
command-line application is available for Windows, macOS, and Linux.
Windows
- Go to the Releases page
-
Download the appropriate file for your CPU:
Download Architecture invoice-[version]-windows-x64.zip
64-bit Intel/AMD invoice-[version]-windows-x86.zip
32-bit Intel/AMD invoice-[version]-windows-arm64.zip
ARM devices -
Open Command Prompt or PowerShell and navigate to the download location:
-
Extract the ZIP file:
Iftar
does not exist on your system, you'll have to decompress it either withExpand-Archive
(PowerShell) or manually, with the Windows Explorer. -
Run the application:
Optional: Add to PATH for system-wide access:
- Copy
invoice.exe
to a permanent location - Add that location to your PATH environment variable
- Restart Command Prompt/PowerShell
macOS
- Go to the Releases page
-
Download the appropriate file for your CPU:
Download Architecture invoice-[version]-macos-amd64.tar.gz
64-bit Intel/AMD invoice-[version]-macos-arm64.tar.gz
M1/M2/M3 Macs -
Open Terminal and navigate to the download location:
- Extract the archive:
- Run the application:
Optional: Move to system PATH:
Linux
-
Go to the Releases page
-
Download the appropriate file for your CPU:
Download Architecture application-[version]-linux-amd64.tar.gz
64-bit Intel/AMD application-[version]-linux-i386.tar.gz
32-bit Intel/AMD application-[version]-linux-arm64.tar.gz
ARM devices Intel -
Open terminal and navigate to the download location:
- Extract the archive:
- Run the application:
Optional: Move to system PATH:
curl
curl is the de facto standard in command-line data transfer. It is ubiquitous and used daily by virtually every Internet-using human, albeit probably unbeknownst to them.
Like invoice
, you don't need to write a program to work with the Invoicetronic API, but it is more complex and has a steeper learning curve. It allows you to interact with all API endpoints and perform many tasks, not just send and receive invoices.