Skip to content

BillptCreateDocument

Creates a tax document in Bill.pt. Supports the following types: Fatura (FT), Orcamento (ORC), Fatura-Recibo (FR) and Nota de Credito (NC). Allows specifying contact, items, series, currency and observations.

FieldTypeRequiredDescription
credentials_idcredentialsYesBill.pt credential
typeselectYesType: FT (Invoice), FR (Invoice-Receipt), ORC (Quote), NC (Credit Note)
contact_idtextYesRecipient contact/customer ID
itemstextareaYesJSON array of document lines
datetextNoDate YYYY-MM-DD (default: today)
due_datetextNoDue date YYYY-MM-DD
series_idtextNoDocument series ID
currencytextNoISO currency (default: EUR)
observationstextareaNoDocument notes

This module requires a billpt type credential with the following fields:

  • API Token: Bill.pt API access token
[
{
"item_id": 1,
"quantity": 2,
"price": 10.00,
"discount": 0,
"tax_id": 1,
"description": "Descripcion opcional"
}
]
{
"success": true,
"document": { ... },
"document_id": 789,
"document_number": "FT 2025/1",
"type": "FT",
"total": 24.60,
"message": "Fatura creada exitosamente"
}

POST /documents - https://api.bill.pt

{
"type": "FT",
"contact_id": "123",
"items": "[{\"item_id\": 1, \"quantity\": 2, \"price\": 10.00, \"tax_id\": 1}]",
"date": "2025-01-15",
"due_date": "2025-02-15",
"observations": "Factura mensual de servicios"
}
  • The items field must be a JSON array serialized as text
  • Each item requires at least item_id, quantity and price
  • The tax_id can be obtained with the BillptGetTaxes module
  • The contact_id can be obtained with the BillptGetContacts module
  • The series_id can be obtained with the BillptGetSeries module
  • The default currency is EUR