Документация на API

API методи

REST API for companies, partners, items and invoices. Authenticate with a cabinet token.

Изпращайте Authorization: Bearer TOKEN при всяка заявка.

Базов URL: https://bill.integrono.com/api/v1

GET /me Current desk

Returns the authenticated user and tenant.

{
  "user": { "id": 1, "name": "Igor", "email": "[email protected]" },
  "tenant": { "id": 1, "currency": "EUR" }
}
GET /companies List companies

Firms you invoice from.

POST /companies Create company

Add a sender company. Set is_default to use it on new invoices.

{
  "name": "Studio North",
  "legal_name": "Studio North s.r.o.",
  "email": "[email protected]",
  "phone": "+420000000",
  "address": "Prague",
  "tax_id": "CZ123",
  "is_default": true
}
GET /companies/{id} Get company

One company by id.

PUT /companies/{id} Update company

Same fields as create.

DELETE /companies/{id} Delete company

Blocked if the company has invoices or it is the last one.

GET /partners List partners

People and firms you invoice.

POST /partners Create partner

Need at least a name. Email is required if you want to send the invoice from the API.

{
  "name": "Alex",
  "company": "North Client",
  "email": "[email protected]",
  "phone": "+380501112233",
  "address": "Kyiv",
  "tax_id": "",
  "notes": ""
}
GET /partners/{id} Get partner

One partner by id.

PUT /partners/{id} Update partner

Same fields as create.

DELETE /partners/{id} Delete partner

Blocked if the partner has invoices.

GET /items List items

Catalog lines you reuse on invoices.

POST /items Create item

Repeating line for the catalog.

{
  "name": "Design sprint",
  "description": "4 days",
  "unit_price": 1240,
  "tax_rate": 0
}
GET /items/{id} Get item

One catalog item by id.

PUT /items/{id} Update item

Same fields as create.

DELETE /items/{id} Delete item

Removes the catalog row. Existing invoice lines stay as text.

GET /domains List domains

Custom hosts for invoice payment links. After DNS is live, pay_url uses that host.

POST /domains Add domain

Save a hostname. Point a CNAME to bill.integrono.com or link.integrono.com, then verify.

{
  "host": "pay.studio.com"
}
POST /domains/{id}/verify Verify domain

Checks CNAME, A record, TXT _bill-verify, or http://host/.well-known/bill-domain.

POST /domains/{id}/use Use domain for invoices

New and existing pay_url values use https://host/i/{token}.

DELETE /domains/{id} Remove domain

Stops branded links. Invoices fall back to bill.integrono.com.

GET /invoices List invoices

Optional query: status=draft|issued|paid|overdue|cancelled.

POST /invoices Create invoice

Create a draft, or issue and send in one call. issue=true writes a number and pay_url. send=true emails the partner.

{
  "company_id": 1,
  "partner_id": 2,
  "currency": "EUR",
  "due_date": "2026-09-01",
  "notes": "Sprint 4",
  "allow_stripe": true,
  "allow_paypal": true,
  "issue": true,
  "send": true,
  "lines": [
    {
      "item_id": 3,
      "description": "Design sprint",
      "quantity": 1,
      "unit_price": 1240,
      "tax_rate": 0
    }
  ]
}
{
  "id": 10,
  "number": "BILL-2026-0001",
  "status": "issued",
  "pay_url": "https://bill.integrono.com/i/...",
  "total": 1240
}
GET /invoices/{id} Get invoice

Full invoice with lines, partner, company and pay_url when issued.

PUT /invoices/{id} Update invoice

Allowed for draft, issued and overdue invoices. Send issue=true to issue a draft.

POST /invoices/{id}/issue Issue invoice

Assigns a number and opens the public payment link.

POST /invoices/{id}/send Send invoice

Emails the payment link to the partner. The partner must have an email. Issued invoices only.

POST /invoices/{id}/cancel Cancel invoice

Stops payment. Paid invoices stay paid.

GET /invoices/{id}/pdf Download PDF

Returns the invoice PDF file.

Register