Read inv.bg invoices, clients, items, payments and banking; create clients, items, invoices.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
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.
Company name.
EIK/Bulstat of the company.
Accountable person (MOL).
Your own unique client code.
Country name or code as inv.bg stores it, e.g. BG.
Whether the company is VAT-registered (default false).
VAT number; required when is_reg_vat is true.
This tool isn't marked read-only, so it may change something on the server or in an account you connected.
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.
| Argument | Type | Description |
|---|---|---|
| mol | string | Accountable person (MOL). |
| code | string | Your own unique client code. |
| name* | string | Company name. |
| town | string | |
| address | string | |
| bulstat* | string | EIK/Bulstat of the company. |
| country | string | Country name or code as inv.bg stores it, e.g. BG. |
| is_reg_vat | boolean | Whether the company is VAT-registered (default false). |
| vat_number | string | VAT number; required when is_reg_vat is true. |
| delivery_address | string |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"name",
"bulstat"
],
"properties": {
"mol": {
"type": "string",
"maxLength": 150,
"minLength": 1,
"description": "Accountable person (MOL)."
},
"code": {
"type": "string",
"maxLength": 50,
"minLength": 1,
"description": "Your own unique client code."
},
"name": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "Company name."
},
"town": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"address": {
"type": "string",
"maxLength": 300,
"minLength": 1
},
"bulstat": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "EIK/Bulstat of the company."
},
"country": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Country name or code as inv.bg stores it, e.g. BG."
},
"is_reg_vat": {
"type": "boolean",
"description": "Whether the company is VAT-registered (default false)."
},
"vat_number": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "VAT number; required when is_reg_vat is true."
},
"delivery_address": {
"type": "string",
"maxLength": 300,
"minLength": 1
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| type | string | dan = tax invoice (default), prof = proforma, deb = debit note, cred = credit note. |
| draft | boolean | Save as a draft (default true). Pass false to issue the document and consume its number. |
| items* | array | Line items. |
| notes | string | Notes printed on the document. |
| to_egn | string | Recipient EGN, 10 digits (individuals), as text so leading zeros survive. |
| to_mol | string | Recipient accountable person (MOL); required for companies when no client_id. |
| to_name | string |
WRITE: add a product or service to the catalogue (name, price, unit). POST /items.
| Argument | Type | Description |
|---|---|---|
| name* | string | Item name. |
| tags | array | Tags to attach. |
| price* | number | Price per unit. |
| name_en | string | Item name in English. |
| currency | string | Price currency (default BGN). |
| quantity_unit* | string | Unit of measure (invbg_list_item_units). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"name",
"price",
"quantity_unit"
],
"properties": {
"name": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "Item name."
},
"tags": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"maxItems": 20,
"description": "Tags to attach."
},
"price": {
"type": "number",
"description": "Price per unit."
},
"name_en": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "Item name in English."
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Price currency (default BGN)."
},
"quantity_unit": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "Unit of measure (invbg_list_item_units)."
}
}
}The company (id, name, subdomain) and the user the API token belongs to. GET /account.
No arguments.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
}One client by id with all stored details (names in both languages, Bulstat, VAT, address, MOL, code, custom properties). GET /clients/{id}.
| Argument | Type | Description |
|---|---|---|
| language | string | Language of names in the reply: bg (default) or en, where the record has both. |
| client_id* | integer | inv.bg client id (invbg_list_clients). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"client_id"
],
"properties": {
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
},
"client_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "inv.bg client id (invbg_list_clients).",
"exclusiveMinimum": 0
}
}
}The exchange rate of a currency to BGN on a date (default: today), as inv.bg uses it for documents. GET /currency/rates/{currency}.
| Argument | Type | Description |
|---|---|---|
| date | string | Rate date, yyyy-mm-dd (default today). |
| currency* | string | Currency, ISO 4217 code such as BGN or EUR. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"currency"
],
"properties": {
"date": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "Rate date, yyyy-mm-dd (default today)."
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Currency, ISO 4217 code such as BGN or EUR."
}
}
}The issuing company's details: name, Bulstat, VAT registration and VAT number, address, MOL, contact email, custom properties. GET /firm.
No arguments.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
}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}.
| Argument | Type | Description |
|---|---|---|
| language | string | Language of names in the reply: bg (default) or en, where the record has both. |
| 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. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"invoice_id"
],
"properties": {
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
},
"invoice_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "inv.bg document id (the id field of invbg_list_invoices, not the printed number).",
"exclusiveMinimum": 0
},
"include_comments": {
"type": "boolean",
"description": "Also return the document's comments."
}
}
}One catalogue item by id. GET /items/{id}.
| Argument | 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. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"item_id"
],
"properties": {
"item_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "inv.bg item id (invbg_list_items).",
"exclusiveMinimum": 0
},
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| type | string | Document type (default: tax invoice). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"type": {
"enum": [
"dan",
"prof",
"deb",
"cred",
"custom"
],
"type": "string",
"description": "Document type (default: tax invoice)."
}
}
}One payment by id with its allocations to invoices (invoice_payments). GET /payments/{id}.
| Argument | Type | Description |
|---|---|---|
| payment_id* | integer | inv.bg payment id (invbg_list_payments). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"payment_id"
],
"properties": {
"payment_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "inv.bg payment id (invbg_list_payments).",
"exclusiveMinimum": 0
}
}
}The company's bank accounts (alias, bank, IBAN, BIC, currency). GET /bank/accounts.
| Argument | Type | Description |
|---|---|---|
| page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
| language | string | Language of names in the reply: bg (default) or en, where the record has both. |
| per_page | integer | Results per page, 1-100 (default 25). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"page": {
"type": "integer",
"maximum": 100000,
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"exclusiveMinimum": 0
},
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
},
"per_page": {
"type": "integer",
"maximum": 100,
"description": "Results per page, 1-100 (default 25).",
"exclusiveMinimum": 0
}
}
}Imported bank transactions with amount, date, counterparty, and whether they are linked to a document. Useful for reconciliation (linked=false = unmatched). GET /bank/transactions.
| Argument | Type | Description |
|---|---|---|
| page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
| type | string | deb = debit (money out), cred = credit (money in). |
| order | string | Sort direction (default desc). |
| linked | boolean | true = only transactions linked to documents, false = only unlinked ones. |
| search | string | Free-text search over the results. |
| date_to | string | On or before this date, yyyy-mm-dd. |
| order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
| per_page | integer | Results per page, 1-100 (default 25). |
| amount_gt | number |
The company's cash registers (cashboxes) with names and balances. GET /cashboxes.
| Argument | Type | Description |
|---|---|---|
| page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
| search | string | Free-text search over the results. |
| per_page | integer | Results per page, 1-100 (default 25). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"page": {
"type": "integer",
"maximum": 100000,
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"exclusiveMinimum": 0
},
"search": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Free-text search over the results."
},
"per_page": {
"type": "integer",
"maximum": 100,
"description": "Results per page, 1-100 (default 25).",
"exclusiveMinimum": 0
}
}
}Contact people of a client (or of all clients) with their names and roles. GET /client-contacts.
| Argument | Type | Description |
|---|---|---|
| page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
| search | string | Free-text search over the results. |
| per_page | integer | Results per page, 1-100 (default 25). |
| client_id | integer | Only the contacts of this client. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"page": {
"type": "integer",
"maximum": 100000,
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"exclusiveMinimum": 0
},
"search": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Free-text search over the results."
},
"per_page": {
"type": "integer",
"maximum": 100,
"description": "Results per page, 1-100 (default 25).",
"exclusiveMinimum": 0
},
"client_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only the contacts of this client.",
"exclusiveMinimum": 0
}
}
}List or search clients (customers): name, Bulstat, VAT number, address, MOL, whether it is a person. GET /clients.
| Argument | Type | Description |
|---|---|---|
| code | string | Filter by the client code. |
| name | string | Filter by client name. |
| page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
| order | string | Sort direction (default desc). |
| search | string | Free-text search over the results. |
| bulstat | string | Filter by EIK/Bulstat. |
| language | string | Language of names in the reply: bg (default) or en, where the record has both. |
| order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
| per_page | integer | Results per page, 1-100 (default 25). |
| is_person |
All document types of this company (tax invoice, proforma, debit/credit note and any custom types) with their codes. GET /invoices/types.
No arguments.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
}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.
| Argument | Type | Description |
|---|---|---|
| page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
| type | array | Document types: dan = tax invoice, prof = proforma, deb = debit note, cred = credit note. |
| order | string | Sort direction (default desc). |
| number | string | Document number (as printed, e.g. 0000000024). |
| search | string | Free-text search over the results. |
| status | array | Payment statuses to include. Use ["unpaid", "partially-paid"] to find open receivables. |
| date_to | string | Only documents dated on or before this date, yyyy-mm-dd. |
| currency | string | Only documents in this currency. |
Units of measure accepted as quantity_unit on items and invoice lines. GET /items/units.
| Argument | Type | Description |
|---|---|---|
| language | string | Language of names in the reply: bg (default) or en, where the record has both. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
}
}
}The product/service catalogue: name, price, currency, unit, tags. GET /items.
| Argument | Type | Description |
|---|---|---|
| page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
| order | string | Sort direction (default desc). |
| search | string | Free-text search over the results. |
| language | string | Language of names in the reply: bg (default) or en, where the record has both. |
| order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
| per_page | integer | Results per page, 1-100 (default 25). |
| tag_name | string | Only items with this tag. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"page": {
"type": "integer",
"maximum": 100000,
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"exclusiveMinimum": 0
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort direction (default desc)."
},
"search": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Free-text search over the results."
},
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
},
"order_by": {
"type": "string",
"pattern": "^[A-Za-z0-9_.]+$",
"maxLength": 50,
"minLength": 1,
"description": "Field to sort by (for example id, date or name; see the vendor reference)."
},
"per_page": {
"type": "integer",
"maximum": 100,
"description": "Results per page, 1-100 (default 25).",
"exclusiveMinimum": 0
},
"tag_name": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "Only items with this tag."
}
}
}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.
| Argument | 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). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"page": {
"type": "integer",
"maximum": 100000,
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"exclusiveMinimum": 0
},
"per_page": {
"type": "integer",
"maximum": 100,
"description": "Results per page, 1-100 (default 25).",
"exclusiveMinimum": 0
}
}
}The payment method codes a document accepts (cash, bank, card, ...) with their names. GET /invoices/payment-methods.
| Argument | Type | Description |
|---|---|---|
| language | string | Language of names in the reply: bg (default) or en, where the record has both. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
}
}
}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.
| Argument | Type | Description |
|---|---|---|
| page | integer | Page number, from 1 (default 1). Pass the previous reply's next_page. |
| order | string | Sort direction (default desc). |
| search | string | Free-text search over the results. |
| paid_to | string | Paid on or before this date. |
| language | string | Language of names in the reply: bg (default) or en, where the record has both. |
| order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
| per_page | integer | Results per page, 1-100 (default 25). |
| amount_gt | number | Amount of at least this value. |
| amount_lt | number | Amount of at most this value. |
The legal reasons for issuing a document without VAT (use one as vat_exemption_reason in invbg_create_invoice). GET /invoices/without-vat-reasons.
| Argument | Type | Description |
|---|---|---|
| language | string | Language of names in the reply: bg (default) or en, where the record has both. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
}
}
}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).
| Argument | Type | Description |
|---|---|---|
| note | string | Note stored on the payment. |
| amount* | number | Amount received and allocated to this document. |
| paid_at | string | When it was paid (default now). |
| currency* | string | Currency of the payment (required by inv.bg), e.g. BGN or EUR. |
| invoice_id* | integer | inv.bg document id the payment is for. |
| contragent_id | integer | The paying client's id. |
| currency_rate* | number | Exchange rate to BGN (required by inv.bg): 1 for BGN; otherwise the rate from invbg_get_exchange_rate. |
| payment_processor* | string | How the money was received. |
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.
| Argument | Type | Description |
|---|---|---|
| name | string | Recipient name used in the text. |
| email* | string | Recipient email address. |
| message | string | Message text placed in the email. |
| subject | string | Email subject (default: the document number). |
| delivery | string | link = a download link (default), file = attached PDF. |
| language | string | Language of the document (default: the document's own). |
| invoice_id* | integer | inv.bg document id. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"invoice_id",
"email"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Recipient name used in the text."
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 254,
"description": "Recipient email address."
},
"message": {
"type": "string",
"maxLength": 5000,
"minLength": 1,
"description": "Message text placed in the email."
},
"subject": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "Email subject (default: the document number)."
},
"delivery": {
"enum": [
"link",
"file"
],
"type": "string",
"description": "link = a download link (default), file = attached PDF."
},
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of the document (default: the document's own)."
},
"invoice_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "inv.bg document id.",
"exclusiveMinimum": 0
}
}
}WRITE: change fields of an existing client (only the fields you pass are changed). PATCH /clients/{id}.
| Argument | Type | Description |
|---|---|---|
| mol | string | |
| code | string | |
| name | string | |
| town | string | |
| address | string | |
| bulstat | string | |
| country | string | |
| client_id* | integer | inv.bg client id. |
| is_reg_vat | boolean | |
| vat_number | string | |
| delivery_address | string |
| Recipient name (when no client_id). |
| to_town | string |
| currency | string | Document currency (default BGN). |
| client_id | integer | Existing client id (invbg_list_clients). Then the to_* fields are ignored. |
| po_number | string | The buyer's purchase order number. |
| date_event | string | Tax event date (default: issue date). |
| number_set | integer | Number set id to take the number from (invbg_list_number_sets); omit unless you use several series. |
| 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. |
| date_create | string | Issue date (default now). |
| date_mature | string | Due date. |
| vat_percent | number | VAT rate for the whole document in percent; ignored where items carry their own vat_percent. |
| is_to_person | boolean | true when the recipient is an individual (then to_egn is needed). |
| currency_rate | number | Exchange rate to BGN (BGN/XXX). Required when currency is not BGN: take it from invbg_get_exchange_rate. |
| to_is_reg_vat | boolean | Whether the recipient company is VAT-registered. |
| to_vat_number | string | Recipient VAT number (needed when to_is_reg_vat is true). |
| items_with_vat | boolean | true if item prices already include VAT (default false). |
| payment_method | string | How the client pays. |
| reduction_percent | number | Discount on the whole document in percent. |
| vat_exemption_reason | string | Why no VAT is charged (when VAT is 0); see invbg_list_vat_exemption_reasons. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"items"
],
"properties": {
"type": {
"enum": [
"dan",
"prof",
"deb",
"cred"
],
"type": "string",
"description": "dan = tax invoice (default), prof = proforma, deb = debit note, cred = credit note."
},
"draft": {
"type": "boolean",
"description": "Save as a draft (default true). Pass false to issue the document and consume its number."
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"price",
"quantity",
"quantity_unit"
],
"properties": {
"name": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "Item name as printed on the invoice."
},
"price": {
"type": "number",
"description": "Price per unit (without VAT unless items_with_vat is true)."
},
"quantity": {
"type": "number",
"description": "Quantity.",
"exclusiveMinimum": 0
},
"vat_percent": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "VAT rate for this item in percent (20 is the standard Bulgarian rate). Needed on every item unless the invoice sets vat_percent."
},
"quantity_unit": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "Unit of measure, e.g. pcs, hours (see invbg_list_item_units)."
},
"reduction_percent": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Discount on this item in percent."
}
}
},
"maxItems": 200,
"minItems": 1,
"description": "Line items."
},
"notes": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "Notes printed on the document."
},
"to_egn": {
"type": "string",
"pattern": "^\\d{10}$",
"description": "Recipient EGN, 10 digits (individuals), as text so leading zeros survive."
},
"to_mol": {
"type": "string",
"maxLength": 150,
"minLength": 1,
"description": "Recipient accountable person (MOL); required for companies when no client_id."
},
"to_name": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "Recipient name (when no client_id)."
},
"to_town": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Document currency (default BGN)."
},
"client_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Existing client id (invbg_list_clients). Then the to_* fields are ignored.",
"exclusiveMinimum": 0
},
"po_number": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "The buyer's purchase order number."
},
"date_event": {
"type": "string",
"description": "Tax event date (default: issue date)."
},
"number_set": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Number set id to take the number from (invbg_list_number_sets); omit unless you use several series.",
"exclusiveMinimum": 0
},
"to_address": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "Recipient address (required when no client_id)."
},
"to_bulstat": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "Recipient EIK/Bulstat (companies)."
},
"to_country": {
"type": "string",
"pattern": "^[A-Za-z]{2}$",
"description": "Recipient country, ISO 3166-1 alpha-2."
},
"date_create": {
"type": "string",
"description": "Issue date (default now)."
},
"date_mature": {
"type": "string",
"description": "Due date."
},
"vat_percent": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "VAT rate for the whole document in percent; ignored where items carry their own vat_percent."
},
"is_to_person": {
"type": "boolean",
"description": "true when the recipient is an individual (then to_egn is needed)."
},
"currency_rate": {
"type": "number",
"description": "Exchange rate to BGN (BGN/XXX). Required when currency is not BGN: take it from invbg_get_exchange_rate.",
"exclusiveMinimum": 0
},
"to_is_reg_vat": {
"type": "boolean",
"description": "Whether the recipient company is VAT-registered."
},
"to_vat_number": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "Recipient VAT number (needed when to_is_reg_vat is true)."
},
"items_with_vat": {
"type": "boolean",
"description": "true if item prices already include VAT (default false)."
},
"payment_method": {
"enum": [
"cash",
"bank",
"ondlv",
"card",
"order",
"cheque",
"barter",
"moneytransfer",
"epay",
"paypal",
"stripe",
"revolut",
"easypay",
"other"
],
"type": "string",
"description": "How the client pays."
},
"reduction_percent": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Discount on the whole document in percent."
},
"vat_exemption_reason": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "Why no VAT is charged (when VAT is 0); see invbg_list_vat_exemption_reasons."
}
}
}| Amount of at least this value. |
| amount_lt | number | Amount of at most this value. |
| date_from | string | On or after this date, yyyy-mm-dd. |
| bank_account_id | array | Only these bank accounts (invbg_list_bank_accounts). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"page": {
"type": "integer",
"maximum": 100000,
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"exclusiveMinimum": 0
},
"type": {
"enum": [
"deb",
"cred"
],
"type": "string",
"description": "deb = debit (money out), cred = credit (money in)."
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort direction (default desc)."
},
"linked": {
"type": "boolean",
"description": "true = only transactions linked to documents, false = only unlinked ones."
},
"search": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Free-text search over the results."
},
"date_to": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "On or before this date, yyyy-mm-dd."
},
"order_by": {
"type": "string",
"pattern": "^[A-Za-z0-9_.]+$",
"maxLength": 50,
"minLength": 1,
"description": "Field to sort by (for example id, date or name; see the vendor reference)."
},
"per_page": {
"type": "integer",
"maximum": 100,
"description": "Results per page, 1-100 (default 25).",
"exclusiveMinimum": 0
},
"amount_gt": {
"type": "number",
"description": "Amount of at least this value."
},
"amount_lt": {
"type": "number",
"description": "Amount of at most this value."
},
"date_from": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "On or after this date, yyyy-mm-dd."
},
"bank_account_id": {
"type": "array",
"items": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"maxItems": 50,
"description": "Only these bank accounts (invbg_list_bank_accounts)."
}
}
}| boolean |
| true = individuals only, false = companies only. |
| is_reg_vat | boolean | true = VAT-registered clients only. |
| vat_number | string | Filter by VAT number. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"code": {
"type": "string",
"maxLength": 50,
"minLength": 1,
"description": "Filter by the client code."
},
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Filter by client name."
},
"page": {
"type": "integer",
"maximum": 100000,
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"exclusiveMinimum": 0
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort direction (default desc)."
},
"search": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Free-text search over the results."
},
"bulstat": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "Filter by EIK/Bulstat."
},
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
},
"order_by": {
"type": "string",
"pattern": "^[A-Za-z0-9_.]+$",
"maxLength": 50,
"minLength": 1,
"description": "Field to sort by (for example id, date or name; see the vendor reference)."
},
"per_page": {
"type": "integer",
"maximum": 100,
"description": "Results per page, 1-100 (default 25).",
"exclusiveMinimum": 0
},
"is_person": {
"type": "boolean",
"description": "true = individuals only, false = companies only."
},
"is_reg_vat": {
"type": "boolean",
"description": "true = VAT-registered clients only."
},
"vat_number": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "Filter by VAT number."
}
}
}| 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. |
| order_by | string | Field to sort by (for example id, date or name; see the vendor reference). |
| per_page | integer | Results per page, 1-100 (default 25). |
| 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). |
| date_from | string | Only documents dated on or after this date, yyyy-mm-dd. |
| client_name | string | Client name filter; % matches any run of characters, _ one character. |
| is_annulled | boolean | true = only annulled documents, false = none. |
| send_status | array | Email status(es) to include. |
| 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. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"page": {
"type": "integer",
"maximum": 100000,
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"exclusiveMinimum": 0
},
"type": {
"type": "array",
"items": {
"enum": [
"dan",
"prof",
"deb",
"cred",
"protocol",
"custom"
],
"type": "string"
},
"maxItems": 6,
"description": "Document types: dan = tax invoice, prof = proforma, deb = debit note, cred = credit note."
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort direction (default desc)."
},
"number": {
"type": "string",
"maxLength": 50,
"minLength": 1,
"description": "Document number (as printed, e.g. 0000000024)."
},
"search": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Free-text search over the results."
},
"status": {
"type": "array",
"items": {
"enum": [
"paid",
"unpaid",
"partially-paid"
],
"type": "string"
},
"maxItems": 3,
"description": "Payment statuses to include. Use [\"unpaid\", \"partially-paid\"] to find open receivables."
},
"date_to": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "Only documents dated on or before this date, yyyy-mm-dd."
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Only documents in this currency."
},
"is_draft": {
"type": "boolean",
"description": "true = only drafts, false = no drafts."
},
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
},
"order_by": {
"type": "string",
"pattern": "^[A-Za-z0-9_.]+$",
"maxLength": 50,
"minLength": 1,
"description": "Field to sort by (for example id, date or name; see the vendor reference)."
},
"per_page": {
"type": "integer",
"maximum": 100,
"description": "Results per page, 1-100 (default 25).",
"exclusiveMinimum": 0
},
"amount_gt": {
"type": "number",
"description": "Only documents with a total of at least this amount."
},
"amount_lt": {
"type": "number",
"description": "Only documents with a total of at most this amount."
},
"client_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Only documents issued to this client (invbg_list_clients).",
"exclusiveMinimum": 0
},
"date_from": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "Only documents dated on or after this date, yyyy-mm-dd."
},
"client_name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Client name filter; % matches any run of characters, _ one character."
},
"is_annulled": {
"type": "boolean",
"description": "true = only annulled documents, false = none."
},
"send_status": {
"type": "array",
"items": {
"enum": [
"unsent",
"sent",
"resent"
],
"type": "string"
},
"maxItems": 3,
"description": "Email status(es) to include."
},
"amount_due_gt": {
"type": "number",
"description": "Only documents with an outstanding balance of at least this amount."
},
"amount_due_lt": {
"type": "number",
"description": "Only documents with an outstanding balance of at most this amount."
}
}
}| paid_from | string | Paid on or after this date. |
| contragent | string | Counterparty name; % matches any run of characters. |
| is_expense | boolean | true = expenses only, false = income only. |
| contragent_id | integer | Counterparty (client) id. |
| payment_processor | array | How the payment was received. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"page": {
"type": "integer",
"maximum": 100000,
"description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
"exclusiveMinimum": 0
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort direction (default desc)."
},
"search": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Free-text search over the results."
},
"paid_to": {
"type": "string",
"description": "Paid on or before this date."
},
"language": {
"enum": [
"bg",
"en"
],
"type": "string",
"description": "Language of names in the reply: bg (default) or en, where the record has both."
},
"order_by": {
"type": "string",
"pattern": "^[A-Za-z0-9_.]+$",
"maxLength": 50,
"minLength": 1,
"description": "Field to sort by (for example id, date or name; see the vendor reference)."
},
"per_page": {
"type": "integer",
"maximum": 100,
"description": "Results per page, 1-100 (default 25).",
"exclusiveMinimum": 0
},
"amount_gt": {
"type": "number",
"description": "Amount of at least this value."
},
"amount_lt": {
"type": "number",
"description": "Amount of at most this value."
},
"paid_from": {
"type": "string",
"description": "Paid on or after this date."
},
"contragent": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Counterparty name; % matches any run of characters."
},
"is_expense": {
"type": "boolean",
"description": "true = expenses only, false = income only."
},
"contragent_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "Counterparty (client) id.",
"exclusiveMinimum": 0
},
"payment_processor": {
"type": "array",
"items": {
"enum": [
"bank",
"cash",
"epay",
"paypal",
"stripe",
"revolut"
],
"type": "string"
},
"maxItems": 6,
"description": "How the payment was received."
}
}
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"invoice_id",
"amount",
"payment_processor",
"currency",
"currency_rate"
],
"properties": {
"note": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "Note stored on the payment."
},
"amount": {
"type": "number",
"description": "Amount received and allocated to this document.",
"exclusiveMinimum": 0
},
"paid_at": {
"type": "string",
"description": "When it was paid (default now)."
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Currency of the payment (required by inv.bg), e.g. BGN or EUR."
},
"invoice_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "inv.bg document id the payment is for.",
"exclusiveMinimum": 0
},
"contragent_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "The paying client's id.",
"exclusiveMinimum": 0
},
"currency_rate": {
"type": "number",
"description": "Exchange rate to BGN (required by inv.bg): 1 for BGN; otherwise the rate from invbg_get_exchange_rate.",
"exclusiveMinimum": 0
},
"payment_processor": {
"enum": [
"bank",
"cash",
"epay",
"paypal",
"stripe",
"revolut"
],
"type": "string",
"description": "How the money was received."
}
}
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"client_id"
],
"properties": {
"mol": {
"type": "string",
"maxLength": 150,
"minLength": 1
},
"code": {
"type": "string",
"maxLength": 50,
"minLength": 1
},
"name": {
"type": "string",
"maxLength": 300,
"minLength": 1
},
"town": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"address": {
"type": "string",
"maxLength": 300,
"minLength": 1
},
"bulstat": {
"type": "string",
"maxLength": 30,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"client_id": {
"type": "integer",
"maximum": 9007199254740991,
"description": "inv.bg client id.",
"exclusiveMinimum": 0
},
"is_reg_vat": {
"type": "boolean"
},
"vat_number": {
"type": "string",
"maxLength": 30,
"minLength": 1
},
"delivery_address": {
"type": "string",
"maxLength": 300,
"minLength": 1
}
}
}