{"uid":"cap_lM4epkTzUNgV36AMZQoSA","slug":"invoice-audit-api-70e4857e","name":"Invoice Audit API","description":"Audits an invoice for math and matching errors: wrong line totals, subtotal/total mismatches, duplicate lines, prices or quantities over a purchase order, PO number mismatches, and duplicate invoice numbers. Send structured JSON; returns findings with severity and expected vs. observed values.","url":"https://www.getbags.app/api/agent/link/pl-c5a332aa-4390-4b95-8524-ccf5fad6429c?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"invoice":{"type":"object","description":"Required. Fields: supplier (string), invoice_number (string), items (array of 1-500: description, quantity, unit_price, optional sku and amount; numbers as decimal strings), optional currency (3 letters, default USD), subtotal, tax, shipping, discount, total, purchase_order_number."},"customerName":{"type":"string","description":"Optional buyer name"},"customerEmail":{"type":"string","description":"Optional buyer email for the receipt/customer record"},"purchase_order":{"type":"object","description":"Optional. Compare against a PO: number, items (same shape as invoice items), total."},"historical_invoices":{"type":"array","description":"Optional. Up to 100 objects with supplier and invoice_number, used to detect duplicate invoices."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.25","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_89U-7iCOgPfspu64Ebddv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Audits a structured invoice for math errors, line total mismatches, duplicate lines, PO discrepancies, and duplicate invoice numbers, returning findings with severity and expected vs. observed values.","exampleAgentPrompt":"Audit this invoice from Acme Supplies (invoice #INV-2024-0091) with 3 line items — 10 units of Widget A at $5.00 each, 5 units of Widget B at $12.00 each, 2 units of Widget C at $8.00 each — subtotal $126.00, tax $12.60, total $138.60; compare it against PO #PO-7742 with a total of $130.00 and check our historical invoices for duplicates.","exampleUseCases":[{"title":"AP team invoice validation before payment","prompt":"Before we approve this vendor invoice for payment, can you audit it? Supplier is GlobalTech Parts, invoice number INV-8821, 4 line items: 20 units of Bolt Set at $3.50 each, 10 units of Gasket Pack at $7.00 each, 5 units of O-Ring Kit at $4.00 each, 1 unit of Shipping Kit at $15.00 each — subtotal $160.00, tax $16.00, total $175.00. Flag any math errors or mismatches."},{"title":"PO compliance check for procurement","prompt":"Check whether this invoice from Riverside Logistics matches our purchase order. Invoice #RL-20240415, items: 50 units of Pallet Wrap at $2.00 each and 10 units of Strapping Band at $5.00 each, subtotal $150.00, total $150.00. Our PO #PO-3310 authorized 50 units at $1.80 each and 10 units at $4.50 each for a total of $135.00. Tell me where the numbers don't match."},{"title":"Duplicate invoice detection for finance audit","prompt":"We've been getting invoices from the same supplier and I want to make sure we're not paying any duplicates. Can you audit this new invoice from Sunrise Materials, invoice number SM-00512, and check it against our historical invoices: SM-00488, SM-00499, SM-00512? Flag if this number has already been submitted."}],"resultDescription":"Returns a list of audit findings, each with a severity level (e.g. error, warning), a description of the issue, and expected vs. observed values — covering math errors in line totals, subtotal/total mismatches, duplicate line items, prices or quantities exceeding the PO, PO number mismatches, and duplicate invoice numbers.","failureModes":["Missing required invoice object returns validation error","Invoice items array empty or exceeds 500 items limit","Non-decimal-string numbers in quantity or unit_price fields cause parsing errors","Purchase order number mismatch flagged as finding rather than error","Historical invoices array exceeds 100 objects limit","Invalid currency code (not 3 letters) causes rejection","Network or payment failure returns HTTP 402 or timeout"],"whenToPreferThis":"Use this endpoint when you need automated, structured invoice auditing before approving payment — especially when you want to catch math errors, validate against a purchase order, or detect duplicate invoice submissions. It is well-suited for accounts payable automation pipelines, procurement compliance workflows, and finance audit bots that process structured invoice JSON. Prefer this over manual review or generic LLM prompting when you need consistent severity-tagged findings with explicit expected vs. observed values.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-01T12:50:04.692Z","isFirstParty":false,"canonicalSlug":"invoice-audit-api-70e4857e"}