Dzięki API system fakturownia można łatwo zintegrować z innymi aplikacjami. W przykładach podajemy wywołania za pomocą narzędzia CURL, które można łatwo zastąpić wywołaniem dowolnego języka programowania.
Jeśli do Waszej integracji potrzebne będą dodatkowe funkcje wywoływane przez API to prosimy o kontakt - postaramy się szybko je dodać.
Wszystkie przykłady działają z JSON lub XML (wystarczy zmienić rozszerzenie xml na json). Wszystkie wywołania API działają z SSL, warto więc w wersji produkcyjnej zamienić HTTP na HTTPS.
UWAGA: pełna dokumentacja znajduje się na GitHub: https://github.com/fakturownia/api
pobranie faktur z aktualnego miesiąca:
JSON
Zobacz | pobierz kod CURL
https://bee-commerce.fakturownia.pl/invoices.json?period=this_month&page=1&per_page=25&api_token=ka3TdF9h4PrzRLfsTf0c
XML
Zobacz | pobierz kod CURL
https://bee-commerce.fakturownia.pl/invoices.xml?period=this_month&page=1&per_page=25&api_token=ka3TdF9h4PrzRLfsTf0c
można przekazywać takie same parametry jakie są przekazywane w aplikacji (na stronie listy faktur), np. "income=no" dla wydatków
JSON
Zobacz | pobierz kod CURL
https://bee-commerce.fakturownia.pl/invoices/100.json?api_token=ka3TdF9h4PrzRLfsTf0c
XML
Zobacz | pobierz kod CURL
https://bee-commerce.fakturownia.pl/invoices/100.xml?api_token=ka3TdF9h4PrzRLfsTf0c
PDF
Zobacz | pobierz kod CURL
https://bee-commerce.fakturownia.pl/invoices/100.pdf?api_token=ka3TdF9h4PrzRLfsTf0c
JSON curl -X POST "https://bee-commerce.fakturownia.pl/invoices/100/send_by_email.json?api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl -X POST "https://bee-commerce.fakturownia.pl/invoices/100/send_by_email.xml?api_token=ka3TdF9h4PrzRLfsTf0c"
JSON curl "https://bee-commerce.fakturownia.pl/invoices.json?oid=nr_zam&api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/invoices.xml?oid=nr_zam&api_token=ka3TdF9h4PrzRLfsTf0c"
JSON curl "https://bee-commerce.fakturownia.pl/invoices.json?invoice_id=id&api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/invoices.xml?invoice_id=id&api_token=ka3TdF9h4PrzRLfsTf0c"
JSON curl "https://bee-commerce.fakturownia.pl/invoices.json?from_invoice_id=id&api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/invoices.xml?from_invoice_id=id&api_token=ka3TdF9h4PrzRLfsTf0c"
curl https://bee-commerce.fakturownia.pl/invoices.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"invoice": {
"kind":"vat",
"number": null,
"sell_date": "2026-02-05",
"issue_date": "2026-02-05",
"payment_to": "2026-02-12",
"seller_name": "Seller SA",
"seller_tax_no": "6272616681",
"buyer_name": "Client1 SA",
"buyer_tax_no": "6272616681",
"positions":[
{"name":"Produkt A1", "tax":23, "total_price_gross":10.23, "quantity":1},
{"name":"Produkt A2", "tax":0, "total_price_gross":50, "quantity":2}
]
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/invoices.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"invoice": {
"kind":"vat",
"number": null,
"sell_date": "2026-02-05",
"issue_date": "2026-02-05",
"payment_to": "2026-02-12",
"buyer_name": "Client1 SA",
"buyer_tax_no": "6272616681",
"positions":[
{"name":"Produkt A1", "tax":23, "total_price_gross":10.23, "quantity":1},
{"name":"Produkt A2", "tax":0, "total_price_gross":50, "quantity":2}
]
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/invoices.xml \
-H "Authorization: Bearer ka3TdF9h4PrzRLfsTf0c" \
-H 'Accept: application/xml' \
-H 'Content-Type: application/xml' \
-d '<invoice>
<kind>vat</kind>
<sell_date>2026-02-05</sell_date>
<issue_date>2026-02-05</issue_date>
<payment_to>2026-02-12</payment_to>
<seller_name>Seller SA</seller_name>
<seller_tax_no>6272616681</seller_tax_no>
<buyer_name>Client1 SA</buyer_name>
<buyer_tax_no>6272616681</buyer_tax_no>
<positions>
<position>
<name>Produkt X1</name>
<tax>23</tax>
<total_price_gross>20</total_price_gross>
<quantity>1</quantity>
</position>
<position>
<name>Produkt X2</name>
<tax>0</tax>
<total_price_gross>10</total_price_gross>
<quantity>3</quantity>
</position>
</positions>
</invoice>'
pobierz kod CURL
endpoint = 'https://bee-commerce.fakturownia.pl/invoices.json'
uri = URI.parse(endpoint)
json_params = {
"api_token" => "ka3TdF9h4PrzRLfsTf0c",
"invoice" => {
"kind" =>"vat",
"number" => nil,
"sell_date" => "2026-02-05",
"issue_date" => "2026-02-05",
"payment_to" => "2026-02-12",
"buyer_name" => "Client1 SA",
"buyer_tax_no" => "6272616681",
"positions" =>[
{"name" =>"Produkt A1", "tax" =>23, "total_price_gross" =>10.23, "quantity" =>1},
{"name" =>"Produkt A2", "tax" =>0, "total_price_gross" =>50, "quantity" =>2}
]
}}
request = Net::HTTP::Post.new(uri.path)
request.body = JSON.generate(json_params)
request["Content-Type"] = "application/json"
http = Net::HTTP.new(uri.host, 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
json_params = {
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"invoice": {
"kind":"vat",
"number": null,
"sell_date": "2026-02-05",
"issue_date": "2026-02-05",
"payment_to": "2026-02-12",
"buyer_name": "Client1 SA",
"buyer_tax_no": "6272616681",
"positions":[
{"name":"Produkt A1", "tax":23, "total_price_gross":10.23, "quantity":1},
{"name":"Produkt A2", "tax":0, "total_price_gross":50, "quantity":2}
]
}}
//alert(JSON.stringify(json_params))
endpoint = 'https://bee-commerce.fakturownia.pl/invoices.json'
$.ajax({
type: "POST",
url: endpoint,
data: json_params,
dataType: 'json',
success: function(data) { alert('invoice created! ' + data['number'])},
});
Utwórz nową fakturę przez Javascriptowe API
curl https://bee-commerce.fakturownia.pl/invoices.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"invoice": {
"kind":"vat",
"number": null,
"sell_date": "2026-02-05",
"issue_date": "2026-02-05",
"payment_to": "2026-02-12",
"seller_name": "Seller SA",
"seller_tax_no": "6272616681",
"buyer_name": "Client1 SA",
"buyer_tax_no": "6272616681",
"show_discount": true,
"discount_kind": "percent_unit",
"positions":[
{"name":"Produkt A1", "tax":23, "total_price_gross":10.23, "quantity":1, "discount_percent": 50},
{"name":"Produkt A2", "tax":0, "total_price_gross":50, "quantity":2, "discount_percent": 10}
]
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/invoices.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"invoice": {
"kind":"vat",
"number": null,
"sell_date": "2026-02-05",
"issue_date": "2026-02-05",
"payment_to": "2026-02-12",
"seller_name": "Seller SA",
"seller_tax_no": "6272616681",
"buyer_name": "Client1 SA",
"buyer_tax_no": "6272616681",
"show_discount": true,
"discount_kind": "amount",
"positions":[
{"name":"Produkt A1", "tax":23, "total_price_gross":10.23, "quantity":1, "discount": 5},
{"name":"Produkt A2", "tax":0, "total_price_gross":50, "quantity":2, "discount": 25}
]
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/invoices.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"api_token": "ka3TdF9h4PrzRLfsTf0c",
"invoice": {
"payment_to_kind": 5,
"department_id": 1803702,
"client_id": 229593646,
"positions":[
{"product_id": 8719085951154, "quantity":2}
]
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/invoices/444.json \
-X PUT \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"api_token": "ka3TdF9h4PrzRLfsTf0c",
"invoice": {
"buyer_name": "New buyer name SA"
}}'
pobierz kod CURL
JSON curl -X DELETE "https://bee-commerce.fakturownia.pl/invoices/100.json?api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl -X DELETE "https://bee-commerce.fakturownia.pl/invoices/100.xml?api_token=ka3TdF9h4PrzRLfsTf0c"
curl "https://bee-commerce.fakturownia.pl/warehouse_documents.json?page=1&per_page=25&api_token=ka3TdF9h4PrzRLfsTf0c" można przekazywać takie same parametry jakie są przekazywane w aplikacji (na stronie listy faktur), np. "income=no" dla wydatków
JSON curl "https://bee-commerce.fakturownia.pl/warehouse_documents/65595302.json?api_token=ka3TdF9h4PrzRLfsTf0c"
curl https://bee-commerce.fakturownia.pl/warehouse_documents.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"warehouse_document": {
"kind":"pz",
"number": null,
"warehouse_id": "135677",
"issue_date": "2026-02-05",
"department_name": "Department1 SA",
"client_name": "Client1 SA",
"warehouse_actions":[
{"product_name":"Produkt A1", "purchase_tax":23, "purchase_price_net":10.23, "quantity":1},
{"product_name":"Produkt A2", "purchase_tax":0, "purchase_price_net":50, "quantity":2}
]
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/warehouse_documents.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"warehouse_document": {
"kind":"wz",
"number": null,
"warehouse_id": "135677",
"issue_date": "2026-02-05",
"department_name": "Department1 SA",
"client_name": "Client1 SA",
"warehouse_actions":[
{"product_id":"8719085951154", "tax":23, "price_net":10.23, "quantity":1},
{"product_id":"8719085951154", "tax":0, "price_net":50, "quantity":2}
]
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/warehouse_documents.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"warehouse_document": {
"kind":"pz",
"number": null,
"warehouse_id": "135677",
"issue_date": "2026-02-05",
"department_id": "1803702",
"client_id": "229593646",
"warehouse_actions":[
{"product_id":"8719085951154", "purchase_tax":23, "price_net":10.23, "quantity":1},
{"product_id":"8719085951154", "purchase_tax":0, "price_net":50, "quantity":2}
]
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/warehouse_documents/65595302.json \
-X PUT \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"api_token": "ka3TdF9h4PrzRLfsTf0c",
"warehouse_document": {
"client_name": "New client name SA"
}}'
pobierz kod CURL
JSON curl -X DELETE "https://bee-commerce.fakturownia.pl/warehouse_documents/100.json?api_token=ka3TdF9h4PrzRLfsTf0c"
JSON curl "https://bee-commerce.fakturownia.pl/products.json?page=1&per_page=25&api_token=ka3TdF9h4PrzRLfsTf0c&page=1"
XML curl "https://bee-commerce.fakturownia.pl/products.xml?page=1&per_page=25&api_token=ka3TdF9h4PrzRLfsTf0c&page=1"
curl "https://bee-commerce.fakturownia.pl/products/100.xml?api_token=ka3TdF9h4PrzRLfsTf0c"
curl https://bee-commerce.fakturownia.pl/products.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"api_token": "ka3TdF9h4PrzRLfsTf0c",
"product": {
"name": "PoroductAA",
"code": "A001",
"price_net": "100",
"tax": "23"
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/products/8719085951154.json \
-X PUT \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"api_token": "ka3TdF9h4PrzRLfsTf0c",
"product": {
"name": "PoroductAA2",
"code": "A0012",
"price_gross": "102"
}}'
pobierz kod CURLAby pobrać formatkę płatności (w postaci JS) należy wywołać URL:
https://app.fakturownia.pl/a/bee-commerce/p/{{token}}.js
JSON curl "https://bee-commerce.fakturownia.pl/clients.json?page=1&per_page=25&api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/clients.xml?page=1&per_page=25&api_token=ka3TdF9h4PrzRLfsTf0c"
curl "https://bee-commerce.fakturownia.pl/clients/100.xml?api_token=ka3TdF9h4PrzRLfsTf0c"
JSON curl "https://bee-commerce.fakturownia.pl/clients.json?external_id=100&api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/clients.xml?external_id=100&api_token=ka3TdF9h4PrzRLfsTf0c"
curl https://bee-commerce.fakturownia.pl/clients.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"api_token": "ka3TdF9h4PrzRLfsTf0c",
"client": {
"name": "Client1",
"tax_no": "6272616681",
"bank" : "bank1",
"bank_account" : "bank_account1",
"city" : "city1",
"country" : "",
"email" : "example@email.com",
"person" : "person1",
"post_code" : "post-code1",
"phone" : "phone1",
"street" : "street1"
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/clients/229593646.json \
-X PUT \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"api_token": "ka3TdF9h4PrzRLfsTf0c",
"client": {
"name": "Klient2",
"tax_no": "62726166812",
"bank" : "bank2",
"bank_account" : "bank_account2",
"city" : "city2",
"country" : "PL",
"email" : "example2@email.com",
"person" : "person2",
"post_code" : "post-code2",
"phone" : "phone2",
"street" : "street2"
}}'
pobierz kod CURL
JSON curl "https://bee-commerce.fakturownia.pl/banking/payments.json?page=1&per_page=25&api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/banking/payments.xml?page=1&per_page=25&api_token=ka3TdF9h4PrzRLfsTf0c"
JSON curl "https://bee-commerce.fakturownia.pl/banking/payment/100.json?api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/banking/payments/100.xml?api_token=ka3TdF9h4PrzRLfsTf0c"
curl https://bee-commerce.fakturownia.pl/banking/payments.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"banking_payment": {
"name":"Payment 001",
"price": 100.05,
"invoice_id": null,
"paid":true,
"kind": "api"
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/banking/payments.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"banking_payment": {
"city": null,
"client_id":null,
"comment":null,
"country":null,
"currency":"PLN",
"deleted":false,
"department_id":null,
"description":"abonament roczny",
"email":"email@email.pl",
"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":"6272616681",
"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,
"kind": "api"
}}'
pobierz kod CURLcurl https://bee-commerce.fakturownia.pl/categories.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"category": {
"name": "my_category",
"description": null
}
}'
pobierz kod CURL
XML curl "https://bee-commerce.fakturownia.pl/categories.xml?api_token=ka3TdF9h4PrzRLfsTf0c"
JSON curl "https://bee-commerce.fakturownia.pl/categories.json?api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/categories/100.xml?api_token=ka3TdF9h4PrzRLfsTf0c"
JSON curl "https://bee-commerce.fakturownia.pl/categories/100.json?api_token=ka3TdF9h4PrzRLfsTf0c"
curl https://bee-commerce.fakturownia.pl/warehouses.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"warehouse": {
"name": "my_warehouse",
"kind": null,
"description": null
}
}'
pobierz kod CURL
JSON curl "https://bee-commerce.fakturownia.pl/warehouses.json?api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/warehouses.xml?api_token=ka3TdF9h4PrzRLfsTf0c"
JSON curl "https://bee-commerce.fakturownia.pl/warehouses/100.json?api_token=ka3TdF9h4PrzRLfsTf0c"
XML curl "https://bee-commerce.fakturownia.pl/warehouses/100.xml?api_token=ka3TdF9h4PrzRLfsTf0c"
JSON method: POST url: https://app.fakturownia.pl/users.json
{
"user": {
"email": "email77469@fakturowytmail.pl",
"password": "your_secret_password"
},
"integration_token": "email-us-for-this-token"
}
pobierz kod CURL | pobierz kod Ruby | pobierz kod JavaScript | pobierz kod PHP | pobierz kod JSON
JSON method: POST url: https://app.fakturownia.pl/login.json
{
"login": "email77469@fakturowytmail.pl",
"password": "your_secret_password",
"integration_token": "email-us-for-this-token"
}
pobierz kod CURL | pobierz kod Ruby | pobierz kod JavaScript | pobierz kod PHP | pobierz kod JSON
JSON method: POST url: https://app.fakturownia.pl/account.json
{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"account": {
"prefix": "ftprefix"
},
"integration_token": "email-us-for-this-token"
}
pobierz kod CURL | pobierz kod Ruby | pobierz kod JavaScript | pobierz kod PHP | pobierz kod JSONcurl https://app.fakturownia.pl/account.json \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"api_token": "ka3TdF9h4PrzRLfsTf0c",
"account": {
"prefix": "prefix1"
},
"user": {
"login": "login1",
"email": "email1@email.pl",
"password": "password1",
"from_partner": "PARTNER_CODE"
},
"company": {
"name": "Company1",
"tax_no": "5252445700",
"post_code": "00-112",
"city": "Warsaw",
"street": "Street 1/10",
"person": "Jan Nowak",
"bank": "Bank1",
"bank_account": "111222333444555666111"
},
"integration_token": "email-us-for-this-token"
}'
pobierz kod CURL
Zobacz | pobierz kod CURL
https://bee-commerce.fakturownia.pl/account.json?api_token=ka3TdF9h4PrzRLfsTf0c&integration_token=email-us-for-this-token
curl -X PUT https://bee-commerce.fakturownia.pl/departments/1803702.json \
-F 'api_token=ka3TdF9h4PrzRLfsTf0c' \
-F 'department[logo]=@/file_path/logo.png'
pobierz kod CURL