{"uid":"cap_4_r8ElT_fC7H1Z6oBZ_eU","slug":"brainiac-commercial-invoice-validator-8dbe8b49","name":"BRAINIAC Commercial Invoice Validator","description":"Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.","url":"https://www.brainiac.software/api/v1/freight-customs/commercial-invoice-validate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"file":{"type":"object","required":["mediaType","fileBase64"],"properties":{"filename":{"type":"string","maxLength":180,"minLength":1},"mediaType":{"enum":["application/pdf","text/plain"],"type":"string"},"fileBase64":{"type":"string","maxLength":12000000,"minLength":1}},"additionalProperties":false},"text":{"type":"string","maxLength":200000,"minLength":1},"shipment":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","required":["description"],"properties":{"unit":{"type":"string","maxLength":20,"minLength":1},"amount":{"type":"number","maximum":1000000000000,"minimum":0},"hsCode":{"type":"string","maxLength":14,"minLength":4},"packages":{"type":"integer","maximum":1000000,"minimum":0},"quantity":{"type":"number","maximum":1000000000,"exclusiveMinimum":0},"volumeM3":{"type":"number","maximum":1000000,"minimum":0},"unitPrice":{"type":"number","maximum":1000000000000,"minimum":0},"description":{"type":"string","maxLength":300,"minLength":1},"netWeightKg":{"type":"number","maximum":1000000000,"minimum":0},"grossWeightKg":{"type":"number","maximum":1000000000,"minimum":0}},"additionalProperties":false},"maxItems":80},"vessel":{"type":"string","maxLength":120,"minLength":1},"voyage":{"type":"string","maxLength":40,"minLength":1},"parties":{"type":"array","items":{"type":"object","required":["role","name"],"properties":{"name":{"type":"string","maxLength":200,"minLength":1},"role":{"enum":["seller","exporter","buyer","importer","consignee","shipper","notify"],"type":"string"},"address":{"type":"string","maxLength":400,"minLength":1}},"additionalProperties":false},"maxItems":12},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","maxLength":80,"minLength":3},"reference":{"type":"string","maxLength":80,"minLength":1},"namedPlace":{"type":"string","maxLength":160,"minLength":1},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"totalAmount":{"type":"number","maximum":1000000000000,"minimum":0},"invoiceNumber":{"type":"string","maxLength":80,"minLength":1},"originCountry":{"type":"string","maxLength":80,"minLength":2},"portOfLoading":{"type":"string","maxLength":120,"minLength":1},"totalPackages":{"type":"integer","maximum":1000000,"minimum":0},"totalVolumeM3":{"type":"number","maximum":1000000,"minimum":0},"containerNumber":{"type":"string","maxLength":20,"minLength":1},"portOfDischarge":{"type":"string","maxLength":120,"minLength":1},"totalNetWeightKg":{"type":"number","maximum":1000000000,"minimum":0},"billOfLadingNumber":{"type":"string","maxLength":80,"minLength":1},"destinationCountry":{"type":"string","maxLength":80,"minLength":2},"totalGrossWeightKg":{"type":"number","maximum":1000000000,"minimum":0}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"lines":[{"unit":"pcs","amount":1200,"hsCode":"6109100010","packages":null,"quantity":100,"volumeM3":null,"unitPrice":12,"description":"Cotton t-shirts","netWeightKg":40,"grossWeightKg":46}],"status":"consistent","vessel":"","voyage":"","parties":[{"name":"Harbor Ink LLC","role":"seller","address":""},{"name":"Northwind Paper Ltd","role":"buyer","address":""}],"currency":"GBP","findings":[],"incoterm":"","checkedAt":"2026-11-02T19:00:00.000Z","reference":"","namedPlace":"","invoiceDate":"","limitations":["No customs declaration was submitted and no shipment was booked.","Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.","An HS code candidate is not a customs classification.","Only the documents and shipment fields in this request are compared."],"totalAmount":1200,"documentType":"commercial_invoice","incotermYear":"","invoiceNumber":"CI-1001","originCountry":"","portOfLoading":"","totalPackages":null,"totalVolumeM3":null,"shipmentBooked":false,"containerNumber":"","portOfDischarge":"","calculatedAmount":1200,"totalNetWeightKg":null,"billOfLadingNumber":"","destinationCountry":"","totalGrossWeightKg":null,"declarationSubmitted":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JvyIlG2CsFVu2yFMQCWmY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates and cross-checks a freight commercial invoice document against shipment data, flagging inconsistencies in parties, line items, HS codes, amounts, and trade terms.","exampleAgentPrompt":"Can you check this commercial invoice PDF for consistency — validate the line items, HS codes, parties, and total amount against the shipment data: seller is Harbor Ink LLC, buyer is Northwind Paper Ltd, 100 pcs of cotton t-shirts at £12 each under HS code 6109100010, GBP currency, incoterm CIF?","exampleUseCases":[{"title":"Pre-customs invoice audit","prompt":"Before we file customs for this shipment, can you validate the commercial invoice I'm uploading? The seller is Harbor Ink LLC, buyer is Northwind Paper Ltd, we're shipping 100 pcs of cotton t-shirts at £12 each — HS code 6109100010, GBP, CIF incoterm. Flag any inconsistencies in the totals or party details."},{"title":"Freight broker compliance check","prompt":"I need to verify that this commercial invoice text is internally consistent — check that the line item amounts add up to the stated total of £1,200, the incoterm is DDP named place Hamburg, and the seller and importer roles are correctly identified."},{"title":"Automated invoice QA before submission","prompt":"Run a consistency check on this commercial invoice PDF for a shipment of 50 industrial pumps at $2,400 each under HS code 8413910000, USD currency, seller is TechFlow GmbH and buyer is Pacific Parts Inc — tell me if there are any findings or errors I need to fix before submission."}],"resultDescription":"Returns a JSON object with the parsed invoice fields (line items, parties, currency, incoterm, dates, totals), a 'status' field (e.g. 'consistent' or indicating issues), a 'findings' array listing any detected discrepancies or errors, a 'calculatedAmount' vs 'totalAmount' comparison, flags for whether a customs declaration was submitted or shipment was booked, and a 'limitations' list clarifying what was and wasn't checked.","failureModes":["File too large or unsupported media type — returns validation error","Invoice document is unreadable or corrupt PDF — may return empty parsed fields","Truncated base64 input — schema minLength/maxLength violations","Missing required 'description' on line items — schema rejection","Ambiguous or non-standard invoice layout may reduce parsing accuracy","Currency code not matching ISO 3-letter pattern — schema rejection","More than 80 line items submitted — rejected by schema maxItems"],"whenToPreferThis":"Use this endpoint when you need to verify internal consistency of a commercial invoice and cross-check it against known shipment data before customs filing or carrier submission. It is purpose-built for freight trade document validation rather than general OCR or document parsing. Prefer it when you need structured findings, calculated vs stated totals, and trade-specific field extraction (HS codes, incoterms, parties by role) in a single call without setting up an account.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T00:36:39.256Z","isFirstParty":false,"canonicalSlug":"brainiac-commercial-invoice-validator-8dbe8b49"}