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.
输入参数type
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. GET /stocks.
输入参数date必填product_codeproduct_namewarehouse_name
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.
输入参数number必填series_name必填
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.
输入参数number必填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.
输入参数codenameafterlimitbeforevat_code
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}.
输入参数id必填
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.
输入参数codenameafterlimitbeforevat_code
smartbill_get_supplier
Get a supplier
One supplier by V3 id (sup_...). Needs the API V3 token. GET /v3/companies/{cif}/suppliers/{id}.
输入参数id必填
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.
输入参数codenameafterlimitbefore
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}.
输入参数id必填
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.
输入参数nameafterlimitbefore
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.
输入参数nameafterlimitbeforepercentage
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.
输入参数draftclient必填currencydue_datelanguagementionsproducts必填issue_dateseries_name必填observationsexchange_rate
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).
输入参数draftissue_dateseries_name必填estimate_number必填estimate_series必填
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.
输入参数draftclient必填currencydue_datelanguagementionsproducts必填issue_dateseries_name必填observationsexchange_rate
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.
输入参数number必填issue_dateseries_name必填
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.
输入参数number必填series_name必填
smartbill_restore_invoice
Restore a cancelled invoice
Restore an invoice that was cancelled, making it active again. PUT /invoice/restore.
输入参数number必填series_name必填
smartbill_cancel_estimate
Cancel a proforma
Cancel an existing proforma (smartbill_restore_estimate undoes it). PUT /estimate/cancel.
输入参数number必填series_name必填
smartbill_restore_estimate
Restore a cancelled proforma
Restore a proforma that was cancelled. PUT /estimate/restore.
输入参数number必填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.
输入参数texttype必填valueis_cashinvoices必填issue_datereceipt_series
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.
输入参数cctobcctype必填number必填subjectbody_textseries_name必填