{"uid":"cap_Zi3xK02WRqhfI1ZsEYWtd","slug":"tradepilotusa-invoice-text-extraction-d895ea7b","name":"TradepilotUSA Invoice Text Extraction","description":"Extract invoice fields from supplied text, preserve currency and identifiers, and mark missing values; no OCR or accounting posting. Uses buyer-supplied information only; no external research or outbound actions. Returns a draft for human review.","url":"https://www.tradepilotusa.com/api/agent-commerce/v1/services/invoice_text_extraction/execute?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"brief":{"type":"string","maxLength":12000,"minLength":10},"audience":{"type":"string","maxLength":500},"source_text":{"type":"string","maxLength":32000,"minLength":20}}},"responseSchema":{"type":"json","example":{"task":"invoice_text_extraction","summary":"Extracted key invoice fields from the provided fictional invoice text, preserving currency and identifiers, and clearly marking the missing payment status field.","artifact":"Illustrative excerpt from a synthetic provider check:\n### Extracted Invoice Fields\n\n| Field             | Value                     |\n|-------------------|---------------------------|\n| Invoice Number    | INV-1001                  |\n| Seller            | Example Supply Company    |\n| Buyer             | Example Door Company      |\n| Invoice Date      | 2026-09-01                |\n| Item Description  | entry door hardware       |\n| Quantity          | 2                         |\n| Unit Price        | USD 50                    |\n| Subtotal          ","provenance":{"source":"buyer_supplied","generated_at":"2026-09-22T14:42:47.668Z","external_research_performed":false},"request_id":"example_invoice_text_extraction","assumptions":["The invoice number 'INV-1001' uniquely identifies the invoice.","The unit price and subtotal are consistent and correctly calculated."],"evidence_gaps":["Payment status is not specified in the source text.","No invoice address or contact details for seller or buyer are provided."],"requires_human_review":true}},"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_XGRXIzrtzAerdRj_c9Xvq","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":"Extracts structured key fields (invoice number, seller, buyer, dates, line items, totals) from raw invoice text and returns them in a structured table with evidence gaps and review flags.","exampleAgentPrompt":"I have some raw invoice text and I need you to extract all the key fields from it — things like the invoice number, seller, buyer, dates, line items, and totals. Here's the text: 'Invoice #INV-2045 from Acme Hardware Co. to Summit Doors LLC, dated 2026-10-15. 3x steel hinges at $12.00 each, subtotal $36.00.'","exampleUseCases":[{"title":"Accounts payable data entry automation","prompt":"I have a pile of invoice text copied from PDFs and I need to extract the invoice number, seller, buyer, date, line items, quantities, and unit prices from each one — here's the first: 'Invoice INV-3021 from Pacific Supply Corp to Riverstone Builders, Oct 20 2026, 10 units of weatherproof sealant at $8.50 each, total $85.00.'"},{"title":"Flagging incomplete invoices for review","prompt":"Can you extract all the key fields from this invoice text and tell me what information is missing or unclear? The text is: 'INV-0087 — shipped to Green Valley Contractors, 5 boxes of deck screws, $45 per box.' I want to know what fields like payment status or seller info are absent."},{"title":"Populating order management system from email invoices","prompt":"I received this invoice by email and need to pull out the structured data to enter into our system — invoice number, buyer, seller, date, items, quantities, and prices. Here's the text: 'Thank you for your order! Invoice #78342 from BuildRight Distributors to Metro Contractors Inc., issued 2026-11-01. 4 units of bolt sets at $22.00 each, subtotal $88.00, payment terms net-30.'"}],"resultDescription":"Returns a structured JSON object containing a markdown table of extracted invoice fields (invoice number, seller, buyer, date, items, quantities, prices, subtotal), plus a summary, list of assumptions made, identified evidence gaps (missing fields), a flag indicating whether human review is required, provenance metadata, and a unique request ID.","failureModes":["Source text too short (below 20 characters) returns validation error","Source text too long (above 32,000 characters) returns payload too large error","Highly ambiguous or corrupted invoice text may result in many evidence_gaps and requires_human_review=true","Missing required source_text field returns schema validation error","Non-invoice text submitted may produce empty or nonsensical field extractions"],"whenToPreferThis":"Choose this endpoint when you have raw, unstructured invoice text (copied from PDFs, emails, or documents) and need to extract structured fields like invoice number, seller, buyer, dates, line items, and totals. It is especially useful when you also want explicit flags for missing or ambiguous fields and audit-ready provenance metadata. Prefer this over generic OCR or document parsers when the text is already in string form and you need invoice-domain-specific field identification with gap analysis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T00:42:44.343Z","isFirstParty":false,"canonicalSlug":"tradepilotusa-invoice-text-extraction-d895ea7b"}