toc-online

Create invoice in TOC Online

Create an invoice directly from JSON payload via TOC Online API.

No TOC_DocVenda or Vendas tables needed — everything in one request. Automatically creates a Faturas entry with the S3 PDF path.

Required fields:

  • nif_cliente (str): Customer NIF
  • document_type (str): FT, FR, FS, NC, or ND
  • document_series_prefix (str): e.g. "2024", "2025"
  • lines (array): [{description, quantity, unit_price, ...}]

Optional fields:

  • date, due_date, payment_mechanism, operation_country
  • tax_exemption_reason_id, bank_account_id, cash_account_id
  • download_pdf (bool, default true)
post/api/toc/invoices

Headers

x-api-tokenstring nullable

Request body

object required

Response

Successful Response

object required

Changes