Invoice

The Invoice object represents both outgoing (issued by the company) and incoming (received from suppliers) invoices. Invoices can be synced with e-invoice provider systems and support multiple currencies, payment tracking, and credit notes.

Attributes

AttributeTypeIn ListIn DetailDescription
idUUIDUnique identifier
numberstringInvoice number (e.g., "INV-2024-001")
statusDocumentStatusCurrent status (draft, issued, validated, paid, etc.)
directionInvoiceDirectionDirection: incoming or outgoing
currencystring3-letter currency code (e.g., "RON", "EUR")
languagestringDocument language for PDF generation: ro, en, de, fr (default: ro)
issueDatedateDate the invoice was issued (YYYY-MM-DD)
dueDatedatePayment due date (YYYY-MM-DD)
subtotaldecimalSubtotal before VAT
vatTotaldecimalTotal VAT amount
totaldecimalTotal amount including VAT
clientNamestringVirtual field: name of the client
amountPaiddecimalTotal amount paid to date
balancedecimalVirtual field: remaining balance (total - amountPaid)
supplierobjectSupplier relation with id, name, cif (for incoming invoices)
clientClientFull Client object
documentSeriesstringDocument series prefix
discountdecimalTotal discount amount
notestextPublic notes visible to client
paymentTermstextPayment terms description
invoiceTypeCodeInvoiceTypeCodeType code for e-invoice submission (standard, reverse_charge, etc.)
deliveryLocationstringDelivery address
projectReferencestringProject or reference number
exchangeRatedecimalExchange rate used (for foreign currencies)
anafUploadIdstringANAF upload ID after submission (Romania only)
anafUploadDatedatetimeDate/time uploaded to ANAF (Romania only)
anafStatestringCurrent state in ANAF system (Romania only)
anafDownloadIdstringANAF download ID for incoming invoices (Romania only)
anafXmlUrlstringURL to the ANAF XML file (Romania only)
pdfPathstringPath to generated PDF file
isIncomingbooleanTrue if incoming invoice
isCreditNotebooleanTrue if this is a credit note
collectbooleanCollection flag
parentDocumentobjectReference to parent invoice (for credit notes)
orderNumberstringPurchase order number
contractNumberstringContract reference number
issuerNamestringName of the person issuing the invoice
issuerIdstringID/CNP of the issuer
mentionstextAdditional mentions on invoice
internalNotetextInternal notes (not visible to client)
salesAgentstringSales agent name
deputyNamestringDeputy/representative name
deputyIdentityCardstringDeputy ID card number
deputyAutostringDeputy vehicle registration
penaltyEnabledbooleanWhether late payment penalties are enabled
penaltyPercentPerDaydecimalDaily penalty percentage
penaltyGraceDaysintegerGrace period before penalties apply
ublExtensionsobjectUBL extension fields (invoicePeriod, delivery, allowanceCharges, prepaidAmount, additionalDocumentReferences)
linesarrayArray of InvoiceLine objects
eventsarrayArray of DocumentEvent objects (audit trail)
attachmentsarrayArray of file attachments
paymentsarrayArray of Payment objects
createdAtdatetimeTimestamp when created
updatedAtdatetimeTimestamp of last update
deletedAtdatetimeSoft delete timestamp (null if not deleted)

Example

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "number": "INV-2024-001",
  "status": "validated",
  "direction": "outgoing",
  "currency": "RON",
  "issueDate": "2024-02-15",
  "dueDate": "2024-03-15",
  "subtotal": 1000.00,
  "vatTotal": 190.00,
  "total": 1190.00,
  "clientName": "Acme Corporation SRL",
  "amountPaid": 500.00,
  "balance": 690.00,
  "client": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "type": "company",
    "name": "Acme Corporation SRL",
    "cui": "12345678",
    "vatCode": "RO12345678",
    "isVatPayer": true,
    "address": "Strada Exemplu, nr. 10",
    "city": "Bucharest",
    "email": "[email protected]"
  },
  "documentSeries": "INV",
  "discount": 0.00,
  "notes": "Payment by bank transfer within 30 days",
  "paymentTerms": "30 days",
  "invoiceTypeCode": "standard",
  "deliveryLocation": "Strada Exemplu, nr. 10, Bucharest",
  "exchangeRate": 1.0000,
  "anafUploadId": "4567890123",
  "anafUploadDate": "2024-02-15T10:30:00+02:00",
  "anafState": "validated",
  "pdfPath": "/storage/invoices/2024/02/INV-2024-001.pdf",
  "isIncoming": false,
  "isCreditNote": false,
  "lines": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "position": 1,
      "description": "Web Development Services",
      "quantity": 40.0,
      "unitOfMeasure": "hour",
      "unitPrice": 25.00,
      "vatRate": 19.00,
      "vatAmount": 190.00,
      "lineTotal": 1190.00,
      "discount": 0.00
    }
  ],
  "payments": [
    {
      "id": "d4e5f6a7-b8c9-0123-def1-234567890123",
      "amount": 500.00,
      "currency": "RON",
      "paymentDate": "2024-02-20",
      "paymentMethod": "bank_transfer",
      "reference": "Transfer #12345"
    }
  ],
  "createdAt": "2024-02-15T09:00:00+02:00",
  "updatedAt": "2024-02-20T14:30:00+02:00",
  "deletedAt": null
}