{"openapi":"3.1.0","info":{"title":"Invoice & Receipt Parser - PDF & Image to JSON","description":"Invoices and receipts (PDF, scan, photo or e-invoice XML) to accounting JSON: supplier, VAT IDs, lines, taxes, totals, with arithmetic checks.","version":"v1"},"servers":[{"url":"https://invoice-receipt-parser-pdf-image-to-json.p.rapidapi.com","description":"RapidAPI"}],"paths":{"/v1/invoices/parse":{"post":{"tags":["Invoice Parsing"],"summary":"Parse an invoice or receipt from its URL","description":"Parse an invoice or receipt from its URL into JSON: parties with VAT\nIDs, number, dates, line items, taxes, totals, IBAN, plus arithmetic\nchecks. PDF, photo, or e-invoice XML (Factur-X, ZUGFeRD, UBL, read without\nAI). 1 credit per page read by the AI; 1 for an e-invoice's XML.","operationId":"parseInvoiceFromUrl","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"},"examples":{"Parse Invoice from URL":{"summary":"Parse Invoice from URL","value":{"url":"https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/AzureInterior.pdf","pages":"1-2"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"},"examples":{"Parse Invoice from URL":{"summary":"Parse Invoice from URL (real response)","value":{"document_type":"invoice","language":"nl","number":"VF1005193039","issue_date":"2022-09-08","due_date":"2022-09-22","purchase_order":"SCONL000000444","currency":"EUR","supplier":{"name":"e-Luscious Nederland B.V. iov Saeco.com","vat_id":"NL8152.54.295.B01","tax_ids":[{"type":"Kvk","value":"04080176"}],"address":"Badweg 48, 8401 BL, Gorredijk","country":"NL"},"customer":{"name":"Strategic Corp","tax_ids":[],"country":"NL"},"lines":[{"description":"Onderhoudsset CA6707/10","code":"E103184","quantity":1.0,"unit":"PCS","unit_price":49.99,"tax_rate":21.0,"total":49.99},{"description":"SX Flyer SAECO Korting KVDNL","code":"E103560","quantity":1.0,"unit":"PCS","unit_price":0.0,"tax_rate":21.0,"total":0.0}],"amounts_include_tax":true,"totals":{"subtotal":41.31,"taxes":[{"rate":21.0,"base":41.31,"amount":8.68,"label":"21 %"}],"tax_total":8.68,"total":49.99},"payment":{"method":"card","iban":"NL58RABO0198723202","bic":"RABONL2U"},"expense_category":"shopping","source":"https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/saeco.pdf","mime_type":"application/pdf","method":"ai","page_count":1,"pages_read":1,"validation":{"consistent":true,"checks":[{"name":"line_math","status":"ok","detail":"2 line(s) checked."},{"name":"lines_sum","status":"ok","expected":49.99,"found":49.99,"difference":0.0,"detail":"Sum of the line amounts against the subtotal or total."},{"name":"tax_rates","status":"ok","detail":"1 tax rate(s) checked."},{"name":"tax_sum","status":"ok","expected":8.68,"found":8.68,"difference":0.0,"detail":"Sum of the taxes by rate against the tax total."},{"name":"total","status":"ok","expected":49.99,"found":49.99,"difference":0.0,"detail":"Subtotal + tax (+ charges - discount + tip) against the total."},{"name":"amount_due","status":"skipped","detail":"Total, amount paid or amount due missing."},{"name":"iban","status":"ok","detail":"IBAN checksum valid."}]}}}}}}},"400":{"description":"Invalid input, or the target could not be processed (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing proxy secret (call through RapidAPI with your key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Invalid proxy secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Daily limit of your plan reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The AI provider failed (`ai_error`) or capacity is temporarily exhausted (`capacity_exhausted`); retry. Not billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-rapidapi-endpoint":"Parse Invoice from URL"}},"/v1/invoices/parse/upload":{"post":{"tags":["Invoice Parsing"],"summary":"Parse an uploaded invoice or receipt","description":"Same as /parse, for a file sent as multipart/form-data (field `file`).","operationId":"parseUploadedInvoice","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_Parse_Uploaded_Invoice"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"},"examples":{"Parse Uploaded Invoice":{"summary":"Parse Uploaded Invoice","value":{"document_type":"invoice","language":"en","number":"INV/2023/03/0008","issue_date":"2023-03-20","due_date":"2023-04-04","currency":"USD","supplier":{"name":"Azure Interior","vat_id":"FR40303265045","tax_ids":[{"type":"SIRET","value":"73282932000074"}],"country":"US"},"customer":{"tax_ids":[{"type":"SIRET","value":"73282932000074"}]},"lines":[{"description":"Office Chair","quantity":1,"unit":"h","unit_price":70.0,"tax_rate":15.0,"total":70.0}],"totals":{"subtotal":262.9,"taxes":[{"rate":15.0,"amount":16.94,"label":"VAT 15%"}],"tax_total":16.94,"total":279.84},"payment":{"terms":"15 Days"},"expense_category":"office_supplies","mime_type":"application/pdf","method":"e-invoice","e_invoice":{"format":"CII","profile":"urn:cen.eu:en16931:2017"},"validation":{"consistent":true,"checks":[{"name":"total","status":"ok"}]}}}}}}},"400":{"description":"Invalid input, or the target could not be processed (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing proxy secret (call through RapidAPI with your key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Invalid proxy secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Daily limit of your plan reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The AI provider failed (`ai_error`) or capacity is temporarily exhausted (`capacity_exhausted`); retry. Not billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-rapidapi-endpoint":"Parse Uploaded Invoice"}}},"components":{"schemas":{"Body_Parse_Uploaded_Invoice":{"properties":{"file":{"type":"string","title":"File","description":"PDF, image or e-invoice XML, up to 20 MB.","format":"binary"},"pages":{"type":"string","maxLength":200,"title":"Pages","description":"PDF pages to read, e.g. '1-2'. All pages when empty (30 at most). 1 credit per page read."},"password":{"type":"string","maxLength":200,"title":"Password","description":"Password of an encrypted PDF."}},"type":"object","required":["file"],"title":"Body_Parse Uploaded Invoice"},"EInvoice":{"properties":{"format":{"type":"string","enum":["CII","UBL"],"title":"Format","description":"CII (Factur-X, ZUGFeRD, XRechnung CII) or UBL (Peppol, XRechnung UBL)."},"profile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile","description":"Specification URN.","examples":["urn:cen.eu:en16931:2017"]},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File","description":"Name of the XML embedded in the PDF."}},"type":"object","required":["format"],"title":"EInvoice"},"ErrorBody":{"properties":{"status":{"type":"integer","title":"Status","examples":[400]},"code":{"type":"string","title":"Code","examples":["invalid_url"]},"message":{"type":"string","title":"Message","examples":["A website URL is required."]}},"type":"object","required":["status","code","message"],"title":"ErrorBody"},"ErrorEnvelope":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["error"],"title":"ErrorEnvelope"},"InvoiceCheck":{"properties":{"name":{"type":"string","title":"Name","description":"line_math, lines_sum, tax_rates, tax_sum, total, amount_due or iban.","examples":["total"]},"status":{"type":"string","enum":["ok","mismatch","skipped"],"title":"Status","examples":["ok"]},"expected":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expected","description":"What the other figures give."},"found":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Found","description":"What the document says."},"difference":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Difference"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["name","status"],"title":"InvoiceCheck"},"InvoiceCustomer":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Customer company. Null for a private individual."},"vat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Id"},"tax_ids":{"items":{"$ref":"#/components/schemas/InvoiceTaxId"},"type":"array","title":"Tax Ids"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2."}},"type":"object","title":"InvoiceCustomer"},"InvoiceLine":{"properties":{"description":{"type":"string","title":"Description","examples":["Office Chair"]},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"SKU or item code."},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity","examples":[1]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","examples":["h"]},"unit_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unit Price","examples":[70.0]},"discount_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Percent","description":"Line discount, %."},"discount_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Amount","description":"Line discount amount."},"tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Rate","description":"Percent.","examples":[15.0]},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total","description":"Line amount as printed (see amounts_include_tax).","examples":[70.0]}},"type":"object","required":["description"],"title":"InvoiceLine"},"InvoicePayment":{"properties":{"terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms","examples":["15 Days"]},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method","description":"card, cash, bank_transfer, direct_debit, cheque..."},"iban":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iban","description":"Supplier's IBAN, no spaces."},"bic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bic"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference","description":"Payment reference."}},"type":"object","title":"InvoicePayment"},"InvoiceRequest":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url","description":"Direct link to an invoice or receipt: PDF (digital or scanned), photo or scan (JPEG, PNG, WEBP, HEIC, GIF, BMP, TIFF), or an e-invoice XML (Factur-X / ZUGFeRD CII, UBL, XRechnung), up to 20 MB.","examples":["https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/AzureInterior.pdf"]},"pages":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Pages","description":"PDF pages to read, e.g. '1-2'. All pages when empty (30 at most). 1 credit per page read.","examples":["1-2"]},"password":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Password","description":"Password of an encrypted PDF."}},"type":"object","required":["url"],"title":"InvoiceRequest"},"InvoiceResponse":{"properties":{"document_type":{"type":"string","enum":["invoice","receipt","credit_note","proforma","quote","purchase_order","utility_bill","other"],"title":"Document Type","examples":["invoice"]},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"ISO 639-1.","examples":["en"]},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","description":"Invoice or receipt number.","examples":["INV/2023/03/0008"]},"issue_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Date","description":"ISO 8601 date.","examples":["2023-03-20"]},"issue_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Time","description":"HH:MM, receipts."},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date","examples":["2023-04-04"]},"delivery_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Date","description":"Delivery or service date."},"purchase_order":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purchase Order","description":"PO or order number."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"ISO 4217.","examples":["USD"]},"supplier":{"$ref":"#/components/schemas/InvoiceSupplier"},"customer":{"$ref":"#/components/schemas/InvoiceCustomer"},"lines":{"items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array","title":"Lines"},"amounts_include_tax":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Amounts Include Tax","description":"Whether line amounts include tax (typical of receipts)."},"totals":{"$ref":"#/components/schemas/InvoiceTotals"},"payment":{"$ref":"#/components/schemas/InvoicePayment"},"expense_category":{"anyOf":[{"type":"string","enum":["meals","groceries","fuel","travel","lodging","office_supplies","software","telecom","utilities","shopping","professional_services","healthcare","entertainment","shipping","other"]},{"type":"null"}],"title":"Expense Category","examples":["office_supplies"]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"File name or final URL."},"mime_type":{"type":"string","title":"Mime Type","examples":["application/pdf"]},"method":{"type":"string","enum":["ai","e-invoice","e-invoice+ai"],"title":"Method","description":"'ai': read by the AI. 'e-invoice': the structured XML (embedded Factur-X / ZUGFeRD / UBL, or an XML file), exact, no AI. 'e-invoice+ai': XML values, line items read by the AI (XML without lines).","examples":["e-invoice"]},"e_invoice":{"anyOf":[{"$ref":"#/components/schemas/EInvoice"},{"type":"null"}]},"page_count":{"type":"integer","title":"Page Count","description":"Pages in the document (1 for an image)."},"pages_read":{"type":"integer","title":"Pages Read","description":"Pages read by the AI (credits)."},"validation":{"$ref":"#/components/schemas/InvoiceValidation"}},"type":"object","required":["document_type","mime_type","method","page_count","pages_read","validation"],"title":"InvoiceResponse"},"InvoiceSupplier":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","examples":["Azure Interior"]},"vat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vat Id","description":"VAT / GST number.","examples":["FR40303265045"]},"tax_ids":{"items":{"$ref":"#/components/schemas/InvoiceTaxId"},"type":"array","title":"Tax Ids","description":"Other company and tax identifiers."},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","description":"Business address, one line."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2.","examples":["US"]}},"type":"object","title":"InvoiceSupplier"},"InvoiceTax":{"properties":{"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate","description":"Percent.","examples":[15.0]},"base":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Base","description":"Taxable amount."},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","examples":[16.94]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","examples":["VAT 15%"]}},"type":"object","title":"InvoiceTax"},"InvoiceTaxId":{"properties":{"type":{"type":"string","title":"Type","description":"As printed or by scheme: VAT, SIRET, SIREN, EIN, GSTIN, ABN, Steuernummer...","examples":["SIRET"]},"value":{"type":"string","title":"Value","examples":["73282932000074"]}},"type":"object","required":["type","value"],"title":"InvoiceTaxId"},"InvoiceTotals":{"properties":{"subtotal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Subtotal","description":"Total before tax (net).","examples":[262.9]},"discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount","description":"Document-level discount, as a positive amount."},"charges":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charges","description":"Shipping, handling, service charge and other fees."},"taxes":{"items":{"$ref":"#/components/schemas/InvoiceTax"},"type":"array","title":"Taxes","description":"Tax by rate."},"tax_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Total","examples":[16.94]},"tip":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tip"},"rounding":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rounding","description":"Cash rounding."},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total","description":"Grand total, tax included.","examples":[279.84]},"amount_paid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Paid","description":"Already paid (deposit, prepayment, paid at the till)."},"amount_due":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Due","description":"Left to pay."}},"type":"object","title":"InvoiceTotals"},"InvoiceValidation":{"properties":{"consistent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consistent","description":"True when every check that could run passed; null when nothing could be checked.","examples":[true]},"checks":{"items":{"$ref":"#/components/schemas/InvoiceCheck"},"type":"array","title":"Checks"}},"type":"object","required":["consistent","checks"],"title":"InvoiceValidation"}},"securitySchemes":{"RapidAPIKey":{"type":"apiKey","in":"header","name":"X-RapidAPI-Key"},"RapidAPIHost":{"type":"apiKey","in":"header","name":"X-RapidAPI-Host"}}},"tags":[{"name":"Invoice Parsing","description":"Invoices and receipts to accounting JSON, with checks."}],"security":[{"RapidAPIKey":[],"RapidAPIHost":[]}]}