Official client libraries

We have a couple of official libraries you can use to easily connect your app/service to Each library comes with it's own documentation and examples.

Choose your language:

CURL examples

If your language isn't listed, you can use CURL. The --user argument engages http basic auth.

Get a list of your products

curl --user <your-api-key-id>:<your-api-key-password> -H "Content-Type: application/json"

Create a product

curl --user <your-api-key-id>:<your-api-key-password> -H "Content-Type: application/json" -d '{"name": "Blue Suede Shoes", "unit": "pairs"}'

Create an invoice

curl --user <your-api-key-id>:<your-api-key-password> -H "Content-Type: application/json" -d '{"date": "20230101", "client": {"company": "Acme Shoe factory"}, "rows": [{"product_name": "Blue Suede Shoes", "unit": "pairs"}]}'

Create an invoice and send it via email

First, create the invoice. Don't forget to set the email field on the client:
curl --user <your-api-key-id>:<your-api-key-password> -H "Content-Type: application/json" -d '{"date": "20230101", "client": {"company": "Acme Shoe factory", "email": ""}, "rows": [{"product_name": "Blue Suede Shoes", "unit": "pairs"}]}'
Then grab the id from the response (123 in this case):
# => Response: {"data":{"id":123,"number":1,"date":"2023-01-01","client_id":324,"days":30,"our_reference":"","your_reference":"","sent":false,"paid_at":null,"locale":"sv","currency":"SEK" ...
Issue a POST request to the "send" endpoint using the id from the response. A "delivery_method" param is optional.
curl --user <your-api-key-id>:<your-api-key-password> -H "Content-Type: application/json" -d {}