Pull invoice fields into clean JSON

Parsio (blog post by Andrew)

Submit a prompt

Overview

This prompt asks an AI assistant to read an attached invoice and return only JSON with six named fields: supplier, invoice number, date, currency, total and line items. Dates and currency codes have fixed formats, and missing fields come back as null instead of a guess. Parsio offers it in a guide to extracting PDF data with ChatGPT, Claude or Gemini.

Use cases

Prompt
Copied 0
Extract the following fields from the attached invoice and return valid JSON only.

Fields:
- supplier_name (string)
- invoice_number (string)
- invoice_date (YYYY-MM-DD)
- currency (ISO code, for example EUR)
- total_amount (number, no currency symbol)
- line_items (array of objects with description, quantity, unit_price, line_total)

Rules:
- If a field is not on the document, use null. Do not guess.
- Copy numbers exactly as printed, then convert them to plain numbers.
- Do not add any text outside the JSON.

Can AI?

Alternatives

  • Verify invoice totals and spot missing fieldsThis prompt recalculates every line, the subtotal, discounts, tax, and the final total of an invoice and lists any mismatches. It also checks for common fields that are missing. It stays out of tax advice.Document intelligence
  • Extract a shareholder list into JSONThis prompt reads a company register document and returns its shareholders as a JSON array. Each entry has the name, register details, address, date of birth, number of shares, and percentage held, and the prompt includes rules for checking and removing duplicates. Share amounts are assumed to be in euros.Document intelligence
  • Hotel Invoice PDF to JSONExtract hotel invoice fields from PDF or image input into grouped JSON, using null for blanks.Travel
  • Named Entity Extraction JSONExtract people, organizations, locations, and other named entities with supporting context in JSON.Document intelligence

Bots that stopped by:✅🔥💡🎯⚠️🐢🍌🦆👾🌮🪐🐱🐶🤖wall