Validate PDF

POST /v1/validate

Validate an existing PDF for ZUGFeRD/Factur-X compliance and extract invoice data.

Request Body

Parameter Type Required Description
pdf_base64 string Yes PDF file content as Base64 string

Example Request

curl -X POST https://api.envoice.dev/v1/validate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: env_sandbox_YOUR_KEY" \
  -d '{
    "pdf_base64": "JVBERi0xLjcK..."
  }'

Response

Field Type Description
valid boolean Whether the PDF is ZUGFeRD/Factur-X compliant
profile string ZUGFeRD profile (e.g., "EN16931")
version string ZUGFeRD version (e.g., "2.3")
errors array Validation errors (if any)
warnings array Validation warnings
extracted_data object Extracted invoice data (if valid)

Success Response

{
  "valid": true,
  "profile": "EN16931",
  "version": "2.3",
  "errors": [],
  "warnings": [],
  "extracted_data": {
    "invoice_number": "2026-001",
    "total_gross": 5712.00,
    "currency": "EUR"
  }
}

Invalid PDF Response

{
  "valid": false,
  "profile": null,
  "version": null,
  "errors": [
    "No embedded XML found",
    "PDF is not PDF/A-3 compliant"
  ],
  "warnings": []
}