InvoiceOcean API


This API allows you to easily integrate with other applications. In the examples below we use
cURL, but you can adapt them to any programming language.

All examples work with JSON, too - just change XML to JSON.

NOTE: The current documentation is available on GitHub:

API token

You can get your API token by going to Settings -> Account settings -> Integration -> API Authorization Code in your InvoiceOcean account.


Select all invoices from a selected time period

select invoice from current month:

XML curl "" JSON curl "" You can pass the same parameters that are passed to the application (on the list of invoices)

Select invoice by ID

XML curl "" JSON curl ""

Downloading your invoice for Order ID

XML curl "" JSON curl ""

Add new invoice

JSON (recommended) >






curl -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{ "api_token": "YOUR_TOKEN_FROM_APP_SETTINGS", "invoice": { "kind":"vat", "number": null, "sell_date": "2013-02-07", "issue_date": "2013-02-07", "payment_to": "2013-02-14", "seller_name": "Wystawca Sp. z o.o.", "seller_tax_no": "5252445767", "buyer_name": "Klient1 Sp. z o.o.", "buyer_tax_no": "5252445767", "positions":[ {"name":"Produkt A1", "tax":23, "total_price_gross":10.23, "quantity":1}, {"name":"Produkt A2", "tax":0, "total_price_gross":50, "quantity":3} ] }}' Get Code CURL








endpoint = '' uri = URI.parse(endpoint) json_params = { "api_token" => "YOUR_TOKEN_FROM_APP_SETTINGS", "invoice" => { "kind" =>"vat", "number" => nil, "sell_date" => "2013-02-07", "issue_date" => "2013-02-07", "payment_to" => "2013-02-14", "seller_name" => "Wystawca Sp. z o.o.", "seller_tax_no" => "5252445767", "buyer_name" => "Klient1 Sp. z o.o.", "buyer_tax_no" => "5252445767", "positions" =>[ {"name" =>"Produkt A1", "tax" =>23, "total_price_gross" =>10.23, "quantity" =>1}, {"name" =>"Produkt A2", "tax" =>0, "total_price_gross" =>50, "quantity" =>3} ] }} request = request.body = JSON.generate(json_params) request["Content-Type"] = "application/json" http =, uri.port) response = http.start {|h| h.request(request)} if response.code == '201' ret = JSON.parse(response.body) else ret = response.body end puts ret.to_json Download Ruby code

If you have a certain client (client_id) and a seller (department_id):
curl -u 'login:YOUR_PASSWORD -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"api_token": "YOUR_TOKEN_FROM_APP_SETTINGS", "invoice": { "kind":"vat", "number": null, "sell_date": "2013-02-07", "issue_date": "2013-02-07", "payment_to": "2013-02-14", "department_id": 1, "client_id": 2, "buyer_name": "Klient1 Sp. z o.o.", "buyer_tax_no": "5252445767", "positions":[ {"name":"Produkt A1", "tax":23, "total_price_gross":10.23, "quantity":1}, {"name":"Produkt A2", "tax":0, "total_price_gross":50, "quantity":3} ] }}' Get Code CURL

XML curl -u 'login:YOUR_PASSWORD -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d ' vat 2013-02-07 2013-02-07 2013-02-14 Wystawca Sp. z o.o. 5252445767 Klient1 Sp. z o.o. 5252445767 Produkt X1 23 20 1 Produkt X2 0 10 3 ' Get Code CURL


Deleting an invoice


XML curl -X DELETE "" JSON curl -X DELETE ""


Products / services


curl ""

Select product using their ID

curl ""


To download the payments form (in the form of JS), call the URL:{{token}}.js

where {{token}} is the token of the product






curl ""

Select client using their ID

curl ""

Get client by e-mail or password

it is useful to you have an active control panel of your clients, so they can login by e-mail and password. curl "" note: it is important for the url to have apostrophes 



XML curl "" JSON curl ""

Select payment using their ID

XML curl "" JSON curl ""

Adding new payment

JSON (recomended) curl -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{ "api_token": "YOUR_TOKEN_FROM_APP_SETTINGS", "payment": { "city": null, "client_id":null, "comment":null, "country":null, "currency":"PLN", "deleted":false, "department_id":null, "description":"abonament roczny", "email":"", "first_name":"Jan", "generate_invoice":true, "invoice_city":"Warszawa", "invoice_comment":"", "invoice_country":null, "invoice_id":null, "invoice_name":"Company name", "invoice_post_code":"00-112", "invoice_street":"street 52", "invoice_tax_no":"5252445767", "last_name":"Kowalski", "name":"Plantnosc za produkt1", "oid":"", "paid":true, "paid_date":null, "phone":null, "post_code":null, "price":"100.00", "product_id":1, "promocode":"", "provider":"transfer", "provider_response":null, "provider_status":null, "provider_title":null, "quantity":1, "street":null }}' Get Code CURL

More examples: