inv.bg MCP by usefulapi
v1.20.1Read inv.bg invoices, clients, items, payments and banking; create clients, items, invoices.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
invbg_get_account Get account
The company (id, name, subdomain) and the user the API token belongs to. GET /account.
invbg_get_firm Get company
The issuing company's details: name, Bulstat, VAT registration and VAT number, address, MOL, contact email, custom properties. GET /firm.
invbg_list_invoices List invoices
List documents (tax invoices, proformas, debit and credit notes) with filters: type, number, issue-date range, amount ranges, payment status, client, draft/annulled, sent status, currency. Each row has number, client, totals, balance_paid, balance_due and dates. GET /invoices.
| Parameter | Type | Description |
|---|---|---|
amount_due_gt | number | Only documents with an outstanding balance of at least this amount. |
amount_due_lt | number | Only documents with an outstanding balance of at most this amount. |
amount_gt | number | Only documents with a total of at least this amount. |
amount_lt | number | Only documents with a total of at most this amount. |
client_id | integer | Only documents issued to this client (invbg_list_clients). |
client_name | string | Client name filter; % matches any run of characters, _ one character. |
currency | string | Only documents in this currency. |
date_from | string | Only documents dated on or after this date, yyyy-mm-dd. |
date_to | string | Only documents dated on or before this date, yyyy-mm-dd. |
is_annulled | boolean | true = only annulled documents, false = none. |
is_draft | boolean | true = only drafts, false = no drafts. |
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
number | string | Document number (as printed, e.g. 0000000024). |
order | string | Sort direction (default desc). |
order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
per_page | integer | Results per page, 1-100 (default 25). |
search | string | Free-text search over the results. |
send_status | array | Email status(es) to include. |
status | array | Payment statuses to include. Use ["unpaid", "partially-paid"] to find open receivables. |
type | array | Document types: dan = tax invoice, prof = proforma, deb = debit note, cred = credit note. |
invbg_get_invoice Get invoice
One document by id: number, type, issuer and recipient, line items, VAT, totals, balance_paid and balance_due, dates, bank accounts, sent/confirmation status. Optionally with its comments. GET /invoices/{id}.
| Parameter | Type | Description |
|---|---|---|
invoice_id * | integer | inv.bg document id (the id field of invbg_list_invoices, not the printed number). |
include_comments | boolean | Also return the document's comments. |
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
invbg_list_invoice_types List document types
All document types of this company (tax invoice, proforma, debit/credit note and any custom types) with their codes. GET /invoices/types.
invbg_get_next_invoice_number Get next invoice number
The next free document number of the default number set for a document type. Read-only: it does not reserve the number. GET /invoices/free-number.
| Parameter | Type | Description |
|---|---|---|
type | string | Document type (default: tax invoice). |
invbg_list_number_sets List number sets
The company's invoice number sets (separate numbering series) with ids; pass an id as number_set to invbg_create_invoice. GET /invoices/number-sets.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
per_page | integer | Results per page, 1-100 (default 25). |
invbg_list_payment_methods List payment methods
The payment method codes a document accepts (cash, bank, card, ...) with their names. GET /invoices/payment-methods.
| Parameter | Type | Description |
|---|---|---|
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
invbg_list_vat_exemption_reasons List VAT exemption reasons
The legal reasons for issuing a document without VAT (use one as vat_exemption_reason in invbg_create_invoice). GET /invoices/without-vat-reasons.
| Parameter | Type | Description |
|---|---|---|
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
invbg_list_clients List clients
List or search clients (customers): name, Bulstat, VAT number, address, MOL, whether it is a person. GET /clients.
| Parameter | Type | Description |
|---|---|---|
bulstat | string | Filter by EIK/Bulstat. |
code | string | Filter by the client code. |
is_person | boolean | true = individuals only, false = companies only. |
is_reg_vat | boolean | true = VAT-registered clients only. |
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
name | string | Filter by client name. |
order | string | Sort direction (default desc). |
order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
per_page | integer | Results per page, 1-100 (default 25). |
search | string | Free-text search over the results. |
vat_number | string | Filter by VAT number. |
invbg_get_client Get client
One client by id with all stored details (names in both languages, Bulstat, VAT, address, MOL, code, custom properties). GET /clients/{id}.
| Parameter | Type | Description |
|---|---|---|
client_id * | integer | inv.bg client id (invbg_list_clients). |
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
invbg_list_client_contacts List client contacts
Contact people of a client (or of all clients) with their names and roles. GET /client-contacts.
| Parameter | Type | Description |
|---|---|---|
client_id | integer | Only the contacts of this client. |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
per_page | integer | Results per page, 1-100 (default 25). |
search | string | Free-text search over the results. |
invbg_list_items List items
The product/service catalogue: name, price, currency, unit, tags. GET /items.
| Parameter | Type | Description |
|---|---|---|
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
order | string | Sort direction (default desc). |
order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
per_page | integer | Results per page, 1-100 (default 25). |
search | string | Free-text search over the results. |
tag_name | string | Only items with this tag. |
invbg_get_item Get item
One catalogue item by id. GET /items/{id}.
| Parameter | Type | Description |
|---|---|---|
item_id * | integer | inv.bg item id (invbg_list_items). |
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
invbg_list_item_units List units of measure
Units of measure accepted as quantity_unit on items and invoice lines. GET /items/units.
| Parameter | Type | Description |
|---|---|---|
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
invbg_list_payments List payments
Recorded payments (income and expense) with amount, method, date, counterparty, how much is allocated to invoices (amount_used) and what is left (amount_left). GET /payments.
| Parameter | Type | Description |
|---|---|---|
amount_gt | number | Amount of at least this value. |
amount_lt | number | Amount of at most this value. |
contragent | string | Counterparty name; % matches any run of characters. |
contragent_id | integer | Counterparty (client) id. |
is_expense | boolean | true = expenses only, false = income only. |
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
order | string | Sort direction (default desc). |
order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
paid_from | string | Paid on or after this date. |
paid_to | string | Paid on or before this date. |
payment_processor | array | How the payment was received. |
per_page | integer | Results per page, 1-100 (default 25). |
search | string | Free-text search over the results. |
invbg_get_payment Get payment
One payment by id with its allocations to invoices (invoice_payments). GET /payments/{id}.
| Parameter | Type | Description |
|---|---|---|
payment_id * | integer | inv.bg payment id (invbg_list_payments). |
invbg_list_bank_accounts List bank accounts
The company's bank accounts (alias, bank, IBAN, BIC, currency). GET /bank/accounts.
| Parameter | Type | Description |
|---|---|---|
language | string | Language of names in the reply: bg (default) or en, where the record has both. |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
per_page | integer | Results per page, 1-100 (default 25). |
invbg_list_bank_transactions List bank transactions
Imported bank transactions with amount, date, counterparty, and whether they are linked to a document. Useful for reconciliation (linked=false = unmatched). GET /bank/transactions.
| Parameter | Type | Description |
|---|---|---|
amount_gt | number | Amount of at least this value. |
amount_lt | number | Amount of at most this value. |
bank_account_id | array | Only these bank accounts (invbg_list_bank_accounts). |
date_from | string | On or after this date, yyyy-mm-dd. |
date_to | string | On or before this date, yyyy-mm-dd. |
linked | boolean | true = only transactions linked to documents, false = only unlinked ones. |
order | string | Sort direction (default desc). |
order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
per_page | integer | Results per page, 1-100 (default 25). |
search | string | Free-text search over the results. |
type | string | deb = debit (money out), cred = credit (money in). |
invbg_list_cashboxes List cashboxes
The company's cash registers (cashboxes) with names and balances. GET /cashboxes.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
per_page | integer | Results per page, 1-100 (default 25). |
search | string | Free-text search over the results. |
invbg_get_exchange_rate Get exchange rate
The exchange rate of a currency to BGN on a date (default: today), as inv.bg uses it for documents. GET /currency/rates/{currency}.
| Parameter | Type | Description |
|---|---|---|
currency * | string | Currency, ISO 4217 code such as BGN or EUR. |
date | string | Rate date, yyyy-mm-dd (default today). |
invbg_create_client Create client
WRITE: add a company client (name, Bulstat, VAT, address, MOL). Check invbg_list_clients first to avoid a duplicate. For an individual (EGN) issue the document with invbg_create_invoice and is_to_person instead. POST /clients.
| Parameter | Type | Description |
|---|---|---|
bulstat * | string | EIK/Bulstat of the company. |
name * | string | Company name. |
address | string | |
code | string | Your own unique client code. |
country | string | Country name or code as inv.bg stores it, e.g. BG. |
delivery_address | string | |
is_reg_vat | boolean | Whether the company is VAT-registered (default false). |
mol | string | Accountable person (MOL). |
town | string | |
vat_number | string | VAT number; required when is_reg_vat is true. |
invbg_update_client Update client
WRITE: change fields of an existing client (only the fields you pass are changed). PATCH /clients/{id}.
| Parameter | Type | Description |
|---|---|---|
client_id * | integer | inv.bg client id. |
address | string | |
bulstat | string | |
code | string | |
country | string | |
delivery_address | string | |
is_reg_vat | boolean | |
mol | string | |
name | string | |
town | string | |
vat_number | string |
invbg_create_item Create item
WRITE: add a product or service to the catalogue (name, price, unit). POST /items.
| Parameter | Type | Description |
|---|---|---|
name * | string | Item name. |
price * | number | Price per unit. |
quantity_unit * | string | Unit of measure (invbg_list_item_units). |
currency | string | Price currency (default BGN). |
name_en | string | Item name in English. |
tags | array | Tags to attach. |
invbg_create_invoice Create invoice
WRITE: create a document (tax invoice by default; proforma, debit/credit note via type). It is saved as a DRAFT unless draft is false: an issued document takes the next legal number and cannot be undone through this tool. Address it to an existing client_id, or give to_name + to_address (+ to_mol and to_bulstat for a company, to_egn for a person) and inv.bg matches or creates the client from those details (an existing client matched by Bulstat or VAT number is UPDATED with the address, MOL and other details you pass). VAT: set vat_percent on the document, or on every item. POST /invoices.
| Parameter | Type | Description |
|---|---|---|
items * | array | Line items. |
client_id | integer | Existing client id (invbg_list_clients). Then the to_* fields are ignored. |
currency | string | Document currency (default BGN). |
currency_rate | number | Exchange rate to BGN (BGN/XXX). Required when currency is not BGN: take it from invbg_get_exchange_rate. |
date_create | string | Issue date (default now). |
date_event | string | Tax event date (default: issue date). |
date_mature | string | Due date. |
draft | boolean | Save as a draft (default true). Pass false to issue the document and consume its number. |
is_to_person | boolean | true when the recipient is an individual (then to_egn is needed). |
items_with_vat | boolean | true if item prices already include VAT (default false). |
notes | string | Notes printed on the document. |
number_set | integer | Number set id to take the number from (invbg_list_number_sets); omit unless you use several series. |
payment_method | string | How the client pays. |
po_number | string | The buyer's purchase order number. |
reduction_percent | number | Discount on the whole document in percent. |
to_address | string | Recipient address (required when no client_id). |
to_bulstat | string | Recipient EIK/Bulstat (companies). |
to_country | string | Recipient country, ISO 3166-1 alpha-2. |
to_egn | string | Recipient EGN, 10 digits (individuals), as text so leading zeros survive. |
to_is_reg_vat | boolean | Whether the recipient company is VAT-registered. |
to_mol | string | Recipient accountable person (MOL); required for companies when no client_id. |
to_name | string | Recipient name (when no client_id). |
to_town | string | |
to_vat_number | string | Recipient VAT number (needed when to_is_reg_vat is true). |
type | string | dan = tax invoice (default), prof = proforma, deb = debit note, cred = credit note. |
vat_exemption_reason | string | Why no VAT is charged (when VAT is 0); see invbg_list_vat_exemption_reasons. |
vat_percent | number | VAT rate for the whole document in percent; ignored where items carry their own vat_percent. |
invbg_send_invoice_email Email invoice
WRITE: email a document to a recipient (as a download link or an attached file). The email goes out immediately and cannot be recalled. POST /invoices/{id}/emails.
| Parameter | Type | Description |
|---|---|---|
email * | string | Recipient email address. |
invoice_id * | integer | inv.bg document id. |
delivery | string | link = a download link (default), file = attached PDF. |
language | string | Language of the document (default: the document's own). |
message | string | Message text placed in the email. |
name | string | Recipient name used in the text. |
subject | string | Email subject (default: the document number). |
invbg_record_invoice_payment Record invoice payment
WRITE: record a payment received for a document and allocate it, which updates the document's balance_paid/balance_due and payment status. Two calls: POST /payments, then POST /payments/{id}/invoices. If the allocation fails the payment stays recorded: the error names its id (see invbg_get_payment).
| Parameter | Type | Description |
|---|---|---|
amount * | number | Amount received and allocated to this document. |
currency * | string | Currency of the payment (required by inv.bg), e.g. BGN or EUR. |
currency_rate * | number | Exchange rate to BGN (required by inv.bg): 1 for BGN; otherwise the rate from invbg_get_exchange_rate. |
invoice_id * | integer | inv.bg document id the payment is for. |
payment_processor * | string | How the money was received. |
contragent_id | integer | The paying client's id. |
note | string | Note stored on the payment. |
paid_at | string | When it was paid (default now). |