{"openapi":"3.0.3","info":{"title":"Denpyo — Japan Invoice & Receipt Reader API","version":"1.0.0","description":"Turn Japanese invoices (請求書) and receipts (領収書) into clean structured JSON for accounting agents — vendor/merchant, dates, line items, and the 8%/10% consumption-tax breakdown — with the qualified-invoice registration number (インボイス登録番号, T + 13 digits) extracted AND verified against the National Tax Agency registry in the same call: active/cancelled status, registered name match, and corporate registry record. Built for AP automation, expense processing and pre-payment fraud checks. Pay per call with USDC via x402 (Base & Solana) — no API keys, no signup.","contact":{"email":"hp.vladic@gmail.com"}},"servers":[{"url":"https://denpyo-api.hp-vladic.workers.dev"}],"paths":{"/read/invoice":{"post":{"summary":"Japanese invoice → structured JSON + qualified-invoice verification ($0.04 per call, x402)","description":"OCR + field extraction for a Japanese invoice (請求書) via Azure Document Intelligence, normalized for accounting: vendor (name/address/phone), customer, invoice id, issue/due dates, line items with per-line tax rate, and the 8%/10% tax breakdown table. The qualified-invoice registration number (T + 13 digits) is extracted and checked against the National Tax Agency qualified-invoice-issuer registry: active/cancelled, registered name (with fuzzy name-match against the OCRed vendor), corporate number, and the corporate registry record (address, active/closed). First 2 pages analyzed. Send {\"url\": ...} or {\"base64\": ...}.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL of a PDF / JPEG / PNG / TIFF / HEIF document"},"base64":{"type":"string","description":"Base64-encoded document bytes (max ~8MB). data: URI prefix allowed"}},"description":"Provide exactly one of url / base64"},"example":{"url":"https://example.com/invoice.pdf"}}}},"responses":{"200":{"description":"Normalized invoice JSON with qualifiedInvoice verification block"},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment required (x402)"},"422":{"description":"Document could not be analyzed (not charged)"}}}},"/read/receipt":{"post":{"summary":"Japanese receipt → structured JSON + qualified-invoice verification ($0.03 per call, x402)","description":"OCR + field extraction for a Japanese receipt (領収書/レシート): merchant (name/address/phone), transaction date & time, items, total/subtotal and the 8%/10% consumption-tax breakdown — plus extraction and National Tax Agency verification of the qualified-invoice registration number, so an expense agent knows immediately whether the receipt supports input-tax credit (仕入税額控除). First page analyzed. Send {\"url\": ...} or {\"base64\": ...}.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL of a PDF / JPEG / PNG / TIFF / HEIF document"},"base64":{"type":"string","description":"Base64-encoded document bytes (max ~8MB). data: URI prefix allowed"}},"description":"Provide exactly one of url / base64"},"example":{"url":"https://example.com/invoice.pdf"}}}},"responses":{"200":{"description":"Normalized receipt JSON with qualifiedInvoice verification block"},"400":{"description":"Invalid input (not charged)"},"402":{"description":"Payment required (x402)"},"422":{"description":"Document could not be analyzed (not charged)"}}}},"/verify":{"get":{"summary":"Verify a Japan qualified-invoice registration number ($0.01 per call, x402)","description":"Registry-only check (no OCR): existence, active/cancelled status, registration date, registered name and corporate registry record for a qualified-invoice-issuer registration number (T + 13 digits). Pass &name= to also get a fuzzy match verdict between your name and the registered name. Same dataset as the /read endpoints.","parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string"},"description":"Registration number, e.g. T1180301018771 (T optional)"},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"Issuer name to fuzzy-match against the registered name"}],"responses":{"200":{"description":"Verification result (JSON)"},"402":{"description":"Payment required (x402)"}}}},"/sample":{"get":{"summary":"Free example of the exact JSON the paid endpoints return — try before you pay","description":"Returns a static, fully-worked example of a parsed invoice and receipt (including the qualifiedInvoice verification block) so agents and developers can see the output shape without spending USDC. No OCR is performed. Optional ?type=invoice|receipt.","security":[],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["invoice","receipt"]}}],"responses":{"200":{"description":"Sample output (JSON)"}}}},"/catalog":{"get":{"summary":"Machine-readable service catalog (free)","security":[],"responses":{"200":{"description":"Catalog (JSON)"}}}}}}