{"version":"x402-discovery-v1","x402Version":2,"resource":{"url":"https://friction-product-commerce-production.id4-score.workers.dev/v1/x402/document-classify-rename-plan","description":"D-007 Document Classify and Rename Plan. Plan generation only; no file mutation.","mimeType":"application/json","method":"POST"},"accepts":[{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"10000","payTo":"0x6ef84644cc2aBCF66e806538016705fa77C1397B","maxTimeoutSeconds":60,"extra":{"name":"USD Coin","version":"2","assetTransferMethod":"eip3009"}}],"commercialHeaderContract":{"requiredOn":"PAID_RETRY_BEFORE_PAYMENT_VERIFICATION_OR_EXECUTION","requiredForUnpaidChallenge":false,"headers":{"Idempotency-Key":{"required":true,"format":"UUIDv4","length":36,"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","prefix":"NONE","generation":"crypto.randomUUID()","reuse":"Same logical purchase only; preserve across recovery; never reuse for another body."},"Receipt-Recovery-Key":{"required":true,"format":"CANONICAL_UNPADDED_BASE64URL_OF_32_RANDOM_BYTES","length":43,"pattern":"^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$","prefix":"NONE","generation":"Node: randomBytes(32).toString('base64url')","note":"Not hex, UUID, arbitrary 43-character text, or padded base64. Final character must encode zero padding bits. Keep private; preserve for recovery."},"Request-Digest":{"required":false,"requiredOnRecoveryGet":true,"format":"LOWERCASE_SHA256_HEX","length":64,"pattern":"^[0-9a-f]{64}$","note":"Omit on initial POST unless computed exactly. Preserve returned Request-Digest; required with recovery key on GET /v1/receipts/by-idempotency/{Idempotency-Key}."}},"automaticRetryAuthorized":false},"resources":[{"resource":"https://friction-product-commerce-production.id4-score.workers.dev/v1/x402/document-classify-rename-plan","method":"POST","productId":"D-007","productVersion":"1.0.0","x402Version":2,"serviceName":"friction-product-commerce-d007","description":"D-007 Document Classify and Rename Plan. Plan generation only; no file mutation.","accepts":[{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"10000","payTo":"0x6ef84644cc2aBCF66e806538016705fa77C1397B","maxTimeoutSeconds":60,"extra":{"name":"USD Coin","version":"2","assetTransferMethod":"eip3009"}}],"extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"originalFilename":"invoice-2026-09.txt","extension":".txt","size":1024,"textExcerpt":"Invoice for order","metadata":{}}},"output":{"type":"json","example":{"classification":"invoice","classificationConfidence":0.95,"duplicateCandidate":false,"duplicateConfidence":0,"duplicateStatus":"UNKNOWN","proposedFilename":"invoice-2026-09.txt","proposedFolder":"Invoices","reasons":["Synthetic discovery example"],"validation":{"status":"PLAN","issues":[],"dryRunOnly":true,"fileOperationPerformed":false}}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"additionalProperties":false,"maxProperties":7,"properties":{"createdAt":{"maxLength":24,"minLength":20,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$","type":"string"},"extension":{"maxLength":16,"minLength":1,"type":"string"},"folderContext":{"additionalProperties":false,"properties":{"knownDocuments":{"items":{"additionalProperties":false,"properties":{"contentHash":{"pattern":"^[a-fA-F0-9]{64}$","type":"string"},"filename":{"maxLength":500,"minLength":1,"type":"string"},"id":{"maxLength":128,"minLength":1,"type":"string"},"size":{"maximum":10000000000,"minimum":0,"type":"integer"}},"required":["id","filename","size"],"type":"object"},"maxItems":1000,"type":"array"}},"required":["knownDocuments"],"type":"object"},"metadata":{"additionalProperties":false,"maxProperties":4,"properties":{"author":{"maxLength":500,"type":"string"},"contentHash":{"pattern":"^[a-fA-F0-9]{64}$","type":"string"},"sourceType":{"maxLength":100,"type":"string"},"title":{"maxLength":1000,"type":"string"}},"type":"object"},"originalFilename":{"maxLength":500,"minLength":1,"type":"string"},"size":{"maximum":10000000000,"minimum":0,"type":"integer"},"textExcerpt":{"maxLength":50000,"type":"string"}},"required":["originalFilename","extension","size","textExcerpt","metadata"],"type":"object"}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","additionalProperties":false,"properties":{"classification":{"enum":["invoice","receipt","contract","legal_document","spreadsheet","image","report","correspondence","unknown"],"type":"string"},"classificationConfidence":{"maximum":1,"minimum":0,"type":"number"},"duplicateCandidate":{"type":"boolean"},"duplicateConfidence":{"maximum":1,"minimum":0,"type":"number"},"duplicateStatus":{"enum":["MATCH","NO_MATCH","UNKNOWN"],"type":"string"},"proposedFilename":{"maxLength":180,"type":["string","null"]},"proposedFolder":{"enum":["Invoices","Receipts","Contracts","Legal Documents","Spreadsheets","Images","Reports","Correspondence",null],"type":["string","null"]},"reasons":{"items":{"type":"string"},"maxItems":100,"type":"array"},"validation":{"additionalProperties":false,"properties":{"dryRunOnly":{"const":true},"fileOperationPerformed":{"const":false},"issues":{"items":{"type":"string"},"maxItems":100,"type":"array"},"status":{"enum":["PLAN","REVIEW"],"type":"string"}},"required":["status","issues","dryRunOnly","fileOperationPerformed"],"type":"object"}},"required":["classification","proposedFilename","proposedFolder","duplicateCandidate","duplicateStatus","duplicateConfidence","classificationConfidence","reasons","validation"]}},"required":["type"]}},"required":["input"]}}},"testnetOnly":false,"sideEffects":false,"externalCalls":0,"metadataOnly":true,"name":"D-007 Document Classify and Rename Plan","priceUsd":0.01,"requiredHeaders":{"Idempotency-Key":"UUIDv4","Receipt-Recovery-Key":"CANONICAL_BASE64URL_32_BYTES_43_CHARACTERS"},"commercialHeaderContract":{"requiredOn":"PAID_RETRY_BEFORE_PAYMENT_VERIFICATION_OR_EXECUTION","requiredForUnpaidChallenge":false,"headers":{"Idempotency-Key":{"required":true,"format":"UUIDv4","length":36,"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","prefix":"NONE","generation":"crypto.randomUUID()","reuse":"Same logical purchase only; preserve across recovery; never reuse for another body."},"Receipt-Recovery-Key":{"required":true,"format":"CANONICAL_UNPADDED_BASE64URL_OF_32_RANDOM_BYTES","length":43,"pattern":"^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$","prefix":"NONE","generation":"Node: randomBytes(32).toString('base64url')","note":"Not hex, UUID, arbitrary 43-character text, or padded base64. Final character must encode zero padding bits. Keep private; preserve for recovery."},"Request-Digest":{"required":false,"requiredOnRecoveryGet":true,"format":"LOWERCASE_SHA256_HEX","length":64,"pattern":"^[0-9a-f]{64}$","note":"Omit on initial POST unless computed exactly. Preserve returned Request-Digest; required with recovery key on GET /v1/receipts/by-idempotency/{Idempotency-Key}."}},"automaticRetryAuthorized":false}}],"production":{"enabled":true},"publicDemo":false}