{
  "description": "Pdf4me subscription invoice extractor (Ynoox GmbH / SaaS billing)",
  "fields": [
    {
      "fieldName": "documentTitle",
      "fieldType": "string",
      "fieldDescription": "Document type label at top of invoice. Label: 'INVOICE'"
    },
    {
      "fieldName": "invoiceNumber",
      "fieldType": "string",
      "fieldDescription": "Invoice number / invoice ID. Label: 'Invoice #'. Example: Pdf4me-202601-32324"
    },
    {
      "fieldName": "invoiceDate",
      "fieldType": "date",
      "fieldDescription": "Invoice issue date. Label: 'Invoice Date'"
    },
    {
      "fieldName": "invoiceDateString",
      "fieldType": "string",
      "fieldDescription": "Invoice issue date as printed on document. Label: 'Invoice Date'. Example: Jan 26, 2026"
    },
    {
      "fieldName": "invoiceAmount",
      "fieldType": "number",
      "fieldDescription": "Total invoice amount shown in header summary. Label: 'Invoice Amount'. Numeric value only, no currency symbol. Example: 0.00"
    },
    {
      "fieldName": "currency",
      "fieldType": "string",
      "fieldDescription": "Currency code for the invoice. Found in 'Invoice Amount' or 'Amount Due' labels. Example: USD"
    },
    {
      "fieldName": "paymentStatus",
      "fieldType": "string",
      "fieldDescription": "Payment status stamp or label on invoice. Example: PAID, UNPAID, DUE"
    },
    {
      "fieldName": "vendorName",
      "fieldType": "string",
      "fieldDescription": "Seller/vendor company name including legal suffix. Top-left header block. Example: Ynoox GmbH"
    },
    {
      "fieldName": "vendorStreet",
      "fieldType": "string",
      "fieldDescription": "Vendor street address line. Example: Riedstrasse 2B"
    },
    {
      "fieldName": "vendorCity",
      "fieldType": "string",
      "fieldDescription": "Vendor city from address block. Example: Hedingen"
    },
    {
      "fieldName": "vendorState",
      "fieldType": "string",
      "fieldDescription": "Vendor state/canton/province from address block. Example: Zürich"
    },
    {
      "fieldName": "vendorPostalCode",
      "fieldType": "string",
      "fieldDescription": "Vendor postal/ZIP code. Example: 8908"
    },
    {
      "fieldName": "vendorCountry",
      "fieldType": "string",
      "fieldDescription": "Vendor country from address block. Example: Switzerland"
    },
    {
      "fieldName": "vendorAddress",
      "fieldType": "string",
      "fieldDescription": "Complete vendor address (street, city, state, postal code, country). Use comma(,) to separate lines.",
      "fieldMethod": "generate"
    },
    {
      "fieldName": "vendorTaxRegNumber",
      "fieldType": "string",
      "fieldDescription": "Vendor tax registration / UID number. Label: 'Tax Reg #'. Swiss format e.g. CHE-360.751.198"
    },
    {
      "fieldName": "billTo",
      "fieldType": "string",
      "fieldDescription": "Customer/buyer name from BILLED TO block. Example: Chandra Arora"
    },
    {
      "fieldName": "billToCountry",
      "fieldType": "string",
      "fieldDescription": "Customer country from BILLED TO block when no full address is given. Example: Switzerland"
    },
    {
      "fieldName": "billToAddress",
      "fieldType": "string",
      "fieldDescription": "Complete billing address of customer if present; otherwise country or name from BILLED TO block.",
      "fieldMethod": "generate"
    },
    {
      "fieldName": "subscriptionId",
      "fieldType": "string",
      "fieldDescription": "Subscription identifier. Label: 'ID' under SUBSCRIPTION section. UUID format. Example: 2e46662a-32e0-4e79-ba06-b13fe2c113ac"
    },
    {
      "fieldName": "billingPeriodStart",
      "fieldType": "date",
      "fieldDescription": "Start date of billing period from SUBSCRIPTION section. Parsed from 'Billing Period' range."
    },
    {
      "fieldName": "billingPeriodEnd",
      "fieldType": "date",
      "fieldDescription": "End date of billing period from SUBSCRIPTION section. Parsed from 'Billing Period' range."
    },
    {
      "fieldName": "billingPeriodString",
      "fieldType": "string",
      "fieldDescription": "Full billing period as printed. Label: 'Billing Period'. Example: Jan 26 to Feb 26, 2026"
    },
    {
      "fieldName": "nextBillingDate",
      "fieldType": "date",
      "fieldDescription": "Next scheduled billing date. Label: 'Next Billing Date'"
    },
    {
      "fieldName": "nextBillingDateString",
      "fieldType": "string",
      "fieldDescription": "Next billing date as printed. Label: 'Next Billing Date'. Example: Feb 26, 2026"
    },
    {
      "fieldName": "subTotal",
      "fieldType": "number",
      "fieldDescription": "Sum before tax. Label: 'Sub Total'. Numeric value only, no currency symbol."
    },
    {
      "fieldName": "mwstRate",
      "fieldType": "number",
      "fieldDescription": "Swiss VAT (MWST) rate percentage without % symbol. Label: 'MWST @ X%'. Example: 8.1"
    },
    {
      "fieldName": "mwstAmount",
      "fieldType": "number",
      "fieldDescription": "Swiss VAT (MWST) tax amount. Label: 'MWST @ X%'. Numeric value only."
    },
    {
      "fieldName": "total",
      "fieldType": "number",
      "fieldDescription": "Grand total after tax. Label: 'Total'. Numeric value only."
    },
    {
      "fieldName": "amountDue",
      "fieldType": "number",
      "fieldDescription": "Final amount payable. Label: 'Amount Due (USD)' or 'Amount Due'. Numeric value only."
    },
    {
      "fieldName": "discountCode",
      "fieldType": "string",
      "fieldDescription": "Promo/coupon code from DISCOUNT section. Text before 'applied on line item'. Example: F_yn_100!"
    },
    {
      "fieldName": "discountDescription",
      "fieldType": "string",
      "fieldDescription": "Full discount note text from DISCOUNT section. Example: F_yn_100! applied on line item #1 - $35.00 (100%)."
    },
    {
      "fieldName": "discountAmount",
      "fieldType": "number",
      "fieldDescription": "Discount amount from DISCOUNT section or line item discount column. Numeric value only."
    },
    {
      "fieldName": "discountPercentage",
      "fieldType": "number",
      "fieldDescription": "Discount percentage from DISCOUNT section without % symbol. Example: 100"
    },
    {
      "fieldName": "lineItems",
      "fieldType": "table",
      "fieldDescription": "Product/service rows from the invoice table under columns DESCRIPTION, PRICE, DISCOUNT, AMOUNT (USD).",
      "fields": [
        {
          "fieldName": "description",
          "fieldType": "string",
          "fieldDescription": "Product or plan name. Example: Pdf4me Base 1000"
        },
        {
          "fieldName": "price",
          "fieldType": "number",
          "fieldDescription": "List/unit price before discount. Column: PRICE. Numeric value only."
        },
        {
          "fieldName": "discount",
          "fieldType": "number",
          "fieldDescription": "Discount applied to this line. Column: DISCOUNT. Numeric value only (ignore parentheses)."
        },
        {
          "fieldName": "amount",
          "fieldType": "number",
          "fieldDescription": "Final line amount after discount. Column: AMOUNT (USD). Numeric value only."
        }
      ]
    }
  ]
}