Skip to content
Constaia
invoice

Invoice

Number, dates, seller and buyer tax IDs, line items, VAT and a total that adds up.

Category
Payments and finance
Country
International
Fields it extracts
11 fields
Cost
1 credit
Invoice
Invalid
SpecimenTry it in the demo

Constaia extracts the whole invoice and checks the tax IDs and that the net amount, VAT and total add up. For invoices with an unusual layout, you can define the fields you want to extract yourself.

What it checks

  • NIF/NIE check letter. The check character is recomputed (mod 23).
  • Totals. Net amount, taxes and total add up.
  • Expected values. Amount, reference or IBAN match the ones you provide.

Fields it extracts

  • Numbernumber
  • Issue dateissue_date
  • Seller (name, tax ID, address)seller
  • Buyerbuyer
  • Line itemslines
  • Tax basetax_base
  • VATvat
  • Withholdingwithholding
  • Equivalence surchargeequivalence_surcharge
  • Totaltotal
  • Currencycurrency

Where it is used

Sample request

curl https://api.constaia.com/v1/analyze \
  -H "Authorization: Bearer $CONSTAIA_API_KEY" \
  -F "file=@document.pdf" \
  -F 'options={
    "expect": "invoice",
    "checks": {
      "require_fields": [
        "number",
        "total"
      ]
    },
    "storage": "none"
  }'

Sample response

Fictitious data. Shortened response.

200 OK · application/json
{
  "id": "an_01J9Z3K8QW4T6Y2B7N5M1R0PXC",
  "object": "analysis",
  "status": "completed",
  "livemode": false,
  "document": {
    "type": "invoice",
    "label": "Invoice",
    "confidence": 0.97
  },
  "verdict": {
    "expected": [
      "invoice"
    ],
    "match": true,
    "status": "valid",
    "reasons": [
      {
        "code": "type_match",
        "severity": "info",
        "message": "The document is: Invoice."
      }
    ]
  },
  "fields": {
    "number": {
      "value": "F-2026-0412",
      "confidence": 0.99,
      "validated": true
    },
    "issue_date": {
      "value": "2026-09-15",
      "confidence": 0.98,
      "validated": null
    },
    "tax_base": {
      "value": 100,
      "confidence": 0.97,
      "validated": null
    },
    "total": {
      "value": 121,
      "confidence": 0.96,
      "validated": null
    },
    "currency": {
      "value": "EUR",
      "confidence": 0.99,
      "validated": null
    }
  },
  "checks": [
    {
      "code": "tax_id_check_digit",
      "passed": true,
      "message": "The tax ID is correct."
    },
    {
      "code": "totals_balance",
      "passed": true,
      "message": "Base, VAT and total add up."
    }
  ],
  "warnings": [],
  "storage": {
    "mode": "none",
    "file_deleted_at": "2026-09-29T10:00:02Z",
    "expires_at": null
  },
  "usage": {
    "credits": 1,
    "pages": 1
  }
}

FAQ

Does Constaia prove that the document is authentic?

No. It checks the type, the consistency of the data and your rules, and flags signals such as a possible edit or a photo of a screen. That does not prove authenticity.

Is a copy of the document kept?

Only if it needs review: it is then kept encrypted until someone decides and for 24 hours after that (configurable). Otherwise it is deleted as soon as the analysis ends. You can choose never to keep it.

Other documents

And for the record…

Create your free account and validate your first document in five minutes. No card required.