SmartBill MCP by usefulapi

v1.28.1
io.usefulapi/smartbill Checked 2 days ago Published 1 day ago

Read SmartBill series, taxes, stock, clients and products; draft and issue invoices and estimates.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

smartbill_list_series List document series

List the document series configured in SmartBill Cloud with their next number. Invoice and proforma tools need a series name from here. type: f = invoice series, p = proforma, c = receipt (chitanta); omit for all. GET /series.

ParameterTypeDescription
typestringf = invoices, p = proformas, c = receipts; omit for all.

smartbill_list_taxes List VAT rates (V1)

List the VAT rates configured in the account (name and percentage). Use the name as tax_name and the percentage as tax_percentage on document lines. Works without a V3 token. GET /tax.

smartbill_get_stock Get stock levels

Stock quantities per warehouse as of a date (needs the SmartBill stock module). Optional filters: warehouse_name (case-sensitive), product_name, product_code. No filters = all products in all warehouses. Paged by product rows: limit (default 25, max 100) and offset (default 0); the reply gives total, returned and next_offset (pass it as offset, null on the last page). GET /stocks.

ParameterTypeDescription
date *stringDate yyyy-mm-dd the stock is read at.
limitintegerProduct rows per page, 1-100 (default 25). A row is one product in one warehouse.
offsetintegerProduct rows to skip (default 0). Use next_offset from the previous reply.
product_codestring
product_namestring
warehouse_namestringWarehouse name, case-sensitive.

smartbill_get_invoice_payment_status Get invoice payment status

Whether an invoice is paid and how much remains: invoiceTotalAmount, paidAmount, unpaidAmount and the paid flag. GET /invoice/paymentstatus.

ParameterTypeDescription
number *stringDocument number as text, e.g. "0025" (keep leading zeros).
series_name *stringDocument series name exactly as configured in SmartBill Cloud (smartbill_list_series lists them).

smartbill_get_estimate_invoices Get invoices of a proforma

Whether a proforma was invoiced and the invoices (series, number) made from it. A draft invoice shows with an empty number. GET /estimate/invoices.

ParameterTypeDescription
number *stringProforma number as text.
series_name *stringProforma series name.

smartbill_list_clients List or search clients

List clients from the SmartBill client list, optionally filtered by name (partial, case-insensitive), internal code (exact) or CIF (exact). Needs the API V3 token. Cursor paged: pass the reply's next_args as the next call's arguments. GET /v3/companies/{cif}/clients.

ParameterTypeDescription
afterstringCursor: continue after this id (use next_args from the previous reply). Not together with before.
beforestringCursor: go back before this id (use previous_args). Not together with after.
codestringExact internal client code (case-sensitive).
limitintegerResults per page, 1-100 (default 20).
namestringPart of the client name.
vat_codestringExact client CIF.

smartbill_get_client Get a client

One client by V3 id (cus_...): name, CIF, address, bank, contact, VAT-payer flag and delivery addresses. Needs the API V3 token. GET /v3/companies/{cif}/clients/{id}.

ParameterTypeDescription
id *stringThe client id (cus_...), from the list tool.

smartbill_list_suppliers List or search suppliers

List suppliers, optionally filtered by name (partial), internal code (exact) or CIF (exact). Needs the API V3 token. Cursor paged: pass the reply's next_args as the next call's arguments. GET /v3/companies/{cif}/suppliers.

ParameterTypeDescription
afterstringCursor: continue after this id (use next_args from the previous reply). Not together with before.
beforestringCursor: go back before this id (use previous_args). Not together with after.
codestringExact internal supplier code (case-sensitive).
limitintegerResults per page, 1-100 (default 20).
namestringPart of the supplier name.
vat_codestringExact supplier CIF.

smartbill_get_supplier Get a supplier

One supplier by V3 id (sup_...). Needs the API V3 token. GET /v3/companies/{cif}/suppliers/{id}.

ParameterTypeDescription
id *stringThe supplier id (sup_...), from the list tool.

smartbill_list_products List or search products and services

List the product and service catalog (price, unit, VAT rate, currency), optionally filtered by name (whole-word match) or internal code (exact). Needs the API V3 token. Cursor paged: pass the reply's next_args as the next call's arguments. GET /v3/companies/{cif}/products.

ParameterTypeDescription
afterstringCursor: continue after this id (use next_args from the previous reply). Not together with before.
beforestringCursor: go back before this id (use previous_args). Not together with after.
codestringExact product code (case-sensitive).
limitintegerResults per page, 1-100 (default 20).
namestringA word of the product name.

smartbill_get_product Get a product or service

One product or service by V3 id (prod_...). Needs the API V3 token. GET /v3/companies/{cif}/products/{id}.

ParameterTypeDescription
id *stringThe product id (prod_...), from the list tool.

smartbill_list_warehouses List warehouses

List warehouses (name, type en gros / en detail, keeper, address). Needs the API V3 token. Cursor paged: pass the reply's next_args as the next call's arguments. GET /v3/companies/{cif}/warehouses.

ParameterTypeDescription
afterstringCursor: continue after this id (use next_args from the previous reply). Not together with before.
beforestringCursor: go back before this id (use previous_args). Not together with after.
limitintegerResults per page, 1-100 (default 20).
namestringPart of the warehouse name.

smartbill_list_vat_rates List VAT rates (V3)

List VAT rates with ids, name, percentage and reverse-charge flag. Filter by name (partial) or percentage (exact). Needs the API V3 token (smartbill_list_taxes does the same without it). Cursor paged: pass the reply's next_args as the next call's arguments. GET /v3/companies/{cif}/vat-rates.

ParameterTypeDescription
afterstringCursor: continue after this id (use next_args from the previous reply). Not together with before.
beforestringCursor: go back before this id (use previous_args). Not together with after.
limitintegerResults per page, 1-100 (default 20).
namestringPart of the VAT rate name.
percentagenumberExact percentage.

smartbill_create_invoice Create an invoice

Create an invoice for a client with product/service lines. By default it is saved as a DRAFT (no number) for review in SmartBill Cloud. With draft=false the invoice is ISSUED: it takes the next number of the series, cannot be deleted or edited through this server, can only be cancelled or reversed (storno), and, depending on the account's e-Factura setup, may be transmitted to ANAF. Confirm every field with the user before draft=false. Returns series, number, documentId, documentUrl (needs login) and documentViewUrl (public PDF link). POST /invoice/v2.

ParameterTypeDescription
client *objectThe client the document is issued to.
products *array1-200 lines.
series_name *stringDocument series name exactly as configured in SmartBill Cloud (smartbill_list_series lists them).
currencystringDocument currency (default RON).
draftbooleanDefault TRUE: the document is saved as a draft without a number, to be finalized in SmartBill Cloud. Pass false ONLY when the user explicitly wants it ISSUED now: that takes the next number of the ser…
due_datestringDue date yyyy-mm-dd.
exchange_ratenumberExchange rate to RON (default: SmartBill's rate for the date).
issue_datestringIssue date yyyy-mm-dd (default today).
languagestringDocument language (default RO).
mentionsstringMentions shown on the document.
observationsstringObservations shown on the document.

smartbill_create_invoice_from_estimate Create an invoice from a proforma

Create an invoice from an existing proforma (client and lines are copied from it). Default is a DRAFT; with draft=false the invoice is ISSUED with the next number of the series and may be transmitted to e-Factura / ANAF. Stock is not discharged. POST /invoice/v2 (useEstimateDetails).

ParameterTypeDescription
estimate_number *stringNumber of the source proforma as text.
estimate_series *stringSeries of the source proforma.
series_name *stringInvoice series to issue on.
draftbooleanDefault TRUE: the document is saved as a draft without a number, to be finalized in SmartBill Cloud. Pass false ONLY when the user explicitly wants it ISSUED now: that takes the next number of the ser…
issue_datestringIssue date yyyy-mm-dd (default today).

smartbill_create_estimate Create a proforma

Create a proforma (estimate) for a client with product/service lines. Default is a DRAFT (no number); with draft=false it takes the next number of the proforma series. A proforma is not a fiscal invoice. Returns series, number, documentId and links. POST /estimate/v2.

ParameterTypeDescription
client *objectThe client the document is issued to.
products *array1-200 lines.
series_name *stringDocument series name exactly as configured in SmartBill Cloud (smartbill_list_series lists them).
currencystringDocument currency (default RON).
draftbooleanDefault TRUE: the document is saved as a draft without a number, to be finalized in SmartBill Cloud. Pass false ONLY when the user explicitly wants it ISSUED now: that takes the next number of the ser…
due_datestringDue date yyyy-mm-dd.
exchange_ratenumberExchange rate to RON (default: SmartBill's rate for the date).
issue_datestringIssue date yyyy-mm-dd (default today).
languagestringDocument language (default RO).
mentionsstringMentions shown on the document.
observationsstringObservations shown on the document.

smartbill_reverse_invoice Reverse an invoice (storno)

ISSUE a storno (credit) invoice that reverses an issued invoice. It takes the next number, an invoice can be reversed only once, and the storno cannot be undone; it may be transmitted to e-Factura / ANAF. Confirm the exact series and number with the user first. POST /invoice/reverse.

ParameterTypeDescription
number *stringNumber of the invoice to reverse, as text.
series_name *stringSeries of the invoice to reverse.
issue_datestringDate of the storno invoice yyyy-mm-dd (default today; not before the original's date).

smartbill_cancel_invoice Cancel an invoice

Cancel an existing invoice (it stays in the books as cancelled; smartbill_restore_invoice undoes it). Changes the document's fiscal status, so confirm with the user. PUT /invoice/cancel.

ParameterTypeDescription
number *stringDocument number as text, e.g. "0025" (keep leading zeros).
series_name *stringDocument series name exactly as configured in SmartBill Cloud (smartbill_list_series lists them).

smartbill_restore_invoice Restore a cancelled invoice

Restore an invoice that was cancelled, making it active again. PUT /invoice/restore.

ParameterTypeDescription
number *stringDocument number as text, e.g. "0025" (keep leading zeros).
series_name *stringDocument series name exactly as configured in SmartBill Cloud (smartbill_list_series lists them).

smartbill_cancel_estimate Cancel a proforma

Cancel an existing proforma (smartbill_restore_estimate undoes it). PUT /estimate/cancel.

ParameterTypeDescription
number *stringProforma number as text.
series_name *stringProforma series name.

smartbill_restore_estimate Restore a cancelled proforma

Restore a proforma that was cancelled. PUT /estimate/restore.

ParameterTypeDescription
number *stringProforma number as text.
series_name *stringProforma series name.

smartbill_record_invoice_payment Record a payment against invoices

Record a collection (incasare) against one or more issued invoices; client and amount are taken from the invoices. With value (single invoice only) a partial payment is recorded. type Chitanta issues a numbered RECEIPT on receipt_series (cannot be undone from this server); the other types (Card, Ordin plata, ...) record the payment without a document. It changes the invoice's paid status in the books: confirm with the user. Fiscal receipts (Bon) are not supported. POST /payment.

ParameterTypeDescription
invoices *array1-20 invoices the payment is for.
type *stringPayment type. Chitanta = a numbered receipt (needs receipt_series); the others create no document.
is_cashbooleanMark the collection as cash (typically for Chitanta).
issue_datestringPayment date yyyy-mm-dd (default today).
receipt_seriesstringReceipt series; required for type Chitanta (smartbill_list_series with type c).
textstringDescription of the payment.
valuenumberPartial amount, for a single invoice only; omit to collect the invoice's full amount.

smartbill_send_document Email an invoice or proforma

Send an issued invoice or proforma by email from SmartBill. This EMAILS A THIRD PARTY and cannot be recalled. Without `to` it goes to the client's email on the document; without subject/body_text the account's email template is used. Confirm the recipient with the user first. POST /document/send.

ParameterTypeDescription
number *stringDocument number as text, e.g. "0025" (keep leading zeros).
series_name *stringDocument series name exactly as configured in SmartBill Cloud (smartbill_list_series lists them).
type *stringfactura = invoice, proforma = proforma.
bccstringBCC addresses, comma separated.
body_textstringEmail body, plain text (default: the account template).
ccstringCC addresses, comma separated.
subjectstringEmail subject, plain text (default: the account template).
tostringRecipient (default: the client's email on the document).