{"uid":"cap_wMqv1R-EIodN-ORySQ9ro","slug":"replate-intelligence-api-advanced-receipt-intelligence-0fe85e1e","name":"Replate Intelligence API – Advanced Receipt Intelligence","description":"Paid receipt, personal, and aggregate commerce intelligence for autonomous agents.","url":"https://replate-backend61.vercel.app/api/intelligence/advanced?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["receiptId","receiptHash","userAddress"],"properties":{"receiptId":{"type":"string"},"receiptHash":{"type":"string"},"userAddress":{"type":"string"}}},"responseSchema":{"type":"object","required":["success","receiptId","report"],"properties":{"report":{"type":"object","required":["receiptId","healthScore","nutritionScore","basketDiversity","processedFoodRatio","fruitVegRatio","proteinRatio","insights","recommendations","insightConfidence","ruleVersion","verification"],"properties":{"insights":{"type":"array","items":{"type":"object","required":["type","message","evidence"],"properties":{"type":{"enum":["positive","recommendation","warning"],"type":"string"},"message":{"type":"string"},"evidence":{"type":"array","items":{"type":"string"}}}}},"receiptId":{"type":"string","pattern":"^[0-9]+$","description":"A verified receipt ID owned by the x402 payer."},"healthScore":{"type":"number","maximum":100,"minimum":0},"ruleVersion":{"type":"string"},"proteinRatio":{"type":"number"},"verification":{"type":"object","required":["sourceVersion","hashAlgorithm","canonicalization","featureVersion","receiptHash","lineItemDigest","scores","lineItems","sourceCommitment"],"properties":{"scores":{"type":"object","required":["healthScore","nutritionScore"],"properties":{"healthScore":{"type":"number","maximum":100,"minimum":0},"nutritionScore":{"type":"number","maximum":100,"minimum":0}}},"lineItems":{"type":"array","items":{"type":"object","required":["id","itemName","canonicalProductId","canonicalKey","displayName","category","paidPrice","unitPrice","priceUnit","quantity","weightGrams","spendingCategory","normalizationConfidence"],"properties":{"id":{"type":"string"},"category":{"type":"string"},"itemName":{"type":"string"},"quantity":{"type":"number"},"paidPrice":{"type":["number","null"]},"priceUnit":{"type":"string"},"unitPrice":{"type":["number","null"]},"displayName":{"type":["string","null"]},"weightGrams":{"type":"number"},"canonicalKey":{"type":["string","null"]},"spendingCategory":{"type":"string"},"canonicalProductId":{"type":["string","null"]},"normalizationConfidence":{"type":"number","maximum":1,"minimum":0}}}},"receiptHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"hashAlgorithm":{"type":"string"},"sourceVersion":{"type":"string"},"featureVersion":{"type":"string"},"lineItemDigest":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"canonicalization":{"type":"string"},"sourceCommitment":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}}},"fruitVegRatio":{"type":"number"},"nutritionScore":{"type":"number","maximum":100,"minimum":0},"basketDiversity":{"type":"number"},"recommendations":{"type":"array","items":{"type":"object","required":["type","message","evidence"],"properties":{"type":{"enum":["positive","recommendation","warning"],"type":"string"},"message":{"type":"string"},"evidence":{"type":"array","items":{"type":"string"}}}}},"insightConfidence":{"type":"number","maximum":1,"minimum":0},"processedFoodRatio":{"type":"number"}}},"success":{"type":"boolean","const":true},"receiptId":{"type":"string","pattern":"^[0-9]+$","description":"A verified receipt ID owned by the x402 payer."}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","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.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TcrGFUSb6Pr1VDHpw8Ltu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes a receipt by ID or hash to produce an advanced intelligence report for users or autonomous agents.","exampleAgentPrompt":"Run an advanced intelligence report on receipt ID 42 with hash 0xabc123...def456 for my wallet address 0xDeAdBeEf...1234 and tell me what it finds.","exampleUseCases":[{"title":"Autonomous agent expense auditing","prompt":"Check receipt ID 7 with hash 0x1a2b3c4d...e5f6 for my wallet 0xAbCd...5678 and give me a full intelligence report so I can audit this expense automatically."},{"title":"On-chain purchase verification","prompt":"I need to verify what's in receipt hash 0xdeadbeef...cafe01 — can you pull the advanced intelligence report for wallet 0x9999...0000 and receipt ID 15?"},{"title":"Agent-driven receipt data enrichment","prompt":"For my agent pipeline, analyze receipt ID 3 using hash 0x0123...abcd and wallet 0xFeed...BeeF and return the full intelligence report so we can categorize the purchase."}],"resultDescription":"Returns a JSON object containing a `success` boolean, the `receiptId` echoed back, and a `report` object with advanced intelligence details derived from the submitted receipt — likely including itemized data, spending categories, merchant details, or anomaly flags depending on the receipt content.","failureModes":["Invalid or malformed receiptHash (not matching 0x + 64 hex chars) returns a validation error","Invalid userAddress format (not a valid 40-char hex Ethereum address) causes rejection","Unknown or non-existent receiptId returns an empty or failed report","Insufficient USDC payment (x402 payment not completed) blocks the response","Network or backend timeout on vercel deployment may return a 5xx error"],"whenToPreferThis":"Choose this endpoint when you need advanced, structured intelligence extracted from a specific receipt identified by its ID or on-chain hash, especially in autonomous agent workflows where wallet-level attribution is required. Prefer this over generic OCR or receipt-scanning tools when the receipt is already indexed in the Replate system and you need a rich, machine-readable report rather than raw text extraction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T18:42:15.430Z","isFirstParty":false,"canonicalSlug":"replate-intelligence-api-advanced-receipt-intelligence-0fe85e1e"}