Skip to content

customerDocument

Represents a sales document addressed to a customer: invoices, orders, and receipts.


Schema

Header Fields

Field Type Required Read-only Description
id integer Internal document ID
document_set string (1–15) Yes Document set / series code (e.g., FT, ORD)
seq_number string (1–15) Yes Sequential document number (e.g., FT2024/1001)
date string (date) Yes Document date (YYYY-MM-DD)
due_date string (date) Payment due date
reference string (max 15) Internal reference
your_ref string (max 15) Customer's reference number
related_document string (max 20) Related document number (e.g., original order for an invoice)
salesperson string Salesperson code
warehouse string Source warehouse code
destination_warehouse string Destination warehouse code
status string (max 6) Document status
created string (date) Record creation date
updated string (date) Record last updated date
notes_comments string Free-text notes

Financial Fields

Field Type Required Description
currency string Yes Currency code (e.g., EUR, USD)
total_amount number (double) Yes Total document amount (including taxes)
net_amount number (double) Net amount before taxes
discount number (float, 0–100) Global discount percentage
discount_amount number (double) Discount amount in currency
vat number (double) VAT amount
eco_tax number (float, 0–100) Eco-tax rate percentage
eco_tax_amount number (double) Eco-tax amount
stamp_duty number (float, 0–100) Stamp duty rate
stamp_duty_amount number (double) Stamp duty amount
irs_tax number (float, 0–100) IRS withholding tax rate
irs_retention_amount number (double) IRS withholding tax amount
rounding number (double) Rounding adjustment
amount_tendered number (double) Amount tendered (cash payments)
amount_paid number (double) Amount paid
payment_type string Payment method
payment_ref string (max 24) Payment reference

Transport / Shipping Fields

Field Type Description
delivery_date string (date-time) Scheduled delivery date/time
plate_number string (max 20) Vehicle plate number for transport
arrival_date string (max 20) Arrival date
number_of_packages string (max 20) Number of packages
gross_weight integer Gross weight
Field Type Description
customer thirdParty Customer details
items array of documentLine Document line items

Example

{
  "document_set": "FT",
  "seq_number": "FT2024/1001",
  "date": "2024-11-15",
  "currency": "EUR",
  "total_amount": 1230.00,
  "net_amount": 1000.00,
  "vat": 230.00,
  "payment_type": "Transferência",
  "customer": {
    "name": "Acme Corp",
    "vat_id": "PT123456789",
    "billing_address": {
      "postal_address": "Rua da Liberdade 1",
      "city": "Lisboa",
      "zip_code": "1250-001",
      "country": "PT"
    }
  },
  "items": [
    {
      "description": "Consulting Services",
      "qty": 2,
      "unit_price": 500.00,
      "vat": 23.0
    }
  ]
}

Used By