{"uid":"cap_h7o48y4-zWwTafZfLgsQ_","slug":"e-commerce-return-eligibility-audit-f4ec95b9","name":"E-Commerce Return Eligibility Audit","description":"Public static preview plus paid token controls, risk consensus, AI security, webhook reliability, developer security, schedule risk, decision analysis, API release compatibility, accounts-payable reconciliation, e-commerce return eligibility, SaaS subscription-proration, sales-commission reconciliation, parcel-charge reconciliation, SLA service-credit reconciliation, advertising spend-and-fee audit, contract-renewal audit, workforce timecard reconciliation, hotel booking-commission reconciliation, and warehouse cycle-count adjustment reconciliation products for autonomous agents.","url":"https://rooke-token-risk-pilot.rookepoole.workers.dev/v1/x402/return-eligibility-audit?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"order":{"type":"object","required":["orderId","currency","originalShippingMinor","lines"],"properties":{"lines":{"type":"array","items":{"type":"object","required":["orderLineId","productId","tags","quantityPurchased","quantityPreviouslyReturned","unitPaidMinor","fulfilled","finalSale"],"properties":{"tags":{"type":"array","items":{"type":"string","maxLength":120,"minLength":1},"default":[],"maxItems":100},"finalSale":{"type":"boolean"},"fulfilled":{"type":"boolean"},"productId":{"type":"string","maxLength":120,"minLength":1},"orderLineId":{"type":"string","maxLength":120,"minLength":1},"unitPaidMinor":{"type":"integer","maximum":1000000000,"minimum":0},"quantityPurchased":{"type":"integer","maximum":1000000,"exclusiveMinimum":0},"quantityPreviouslyReturned":{"type":"integer","default":0,"maximum":1000000,"minimum":0}},"additionalProperties":false},"maxItems":200,"minItems":1},"orderId":{"type":"string","maxLength":120,"minLength":1},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"deliveryDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"fulfillmentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"originalShippingMinor":{"type":"integer","maximum":1000000000000000,"minimum":0}},"additionalProperties":false},"policy":{"type":"object","required":["policyId","policyVersion","currency","returnWindowDays","windowStartsFrom","allowedConditions","allowedResolutions","restockingFeeBps","returnShipping","refundOriginalShippingOnFullReturn","excludedProductIds","excludedTags"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"policyId":{"type":"string","maxLength":120,"minLength":1},"excludedTags":{"type":"array","items":{"type":"string","maxLength":120,"minLength":1},"default":[],"maxItems":500},"policyVersion":{"type":"string","maxLength":120,"minLength":1},"returnShipping":{"anyOf":[{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","const":"FREE"}},"additionalProperties":false},{"type":"object","required":["mode","feeMinor"],"properties":{"mode":{"type":"string","const":"FLAT_FEE"},"feeMinor":{"type":"integer","maximum":1000000000000000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","const":"CUSTOMER_ARRANGED"}},"additionalProperties":false}]},"restockingFeeBps":{"type":"integer","maximum":10000,"minimum":0},"returnWindowDays":{"type":"integer","maximum":3650,"minimum":0},"windowStartsFrom":{"enum":["DELIVERY","FULFILLMENT"],"type":"string"},"allowedConditions":{"type":"array","items":{"enum":["NEW_UNOPENED","OPENED_UNUSED","USED","DAMAGED_IN_TRANSIT","DEFECTIVE"],"type":"string"},"maxItems":5,"minItems":1},"allowedResolutions":{"type":"array","items":{"enum":["REFUND","STORE_CREDIT","EXCHANGE"],"type":"string"},"maxItems":3,"minItems":1},"excludedProductIds":{"type":"array","items":{"type":"string","maxLength":120,"minLength":1},"default":[],"maxItems":500},"refundOriginalShippingOnFullReturn":{"type":"boolean"}},"additionalProperties":false},"request":{"type":"object","required":["returnRequestId","requestedAt","resolution","lines"],"properties":{"lines":{"type":"array","items":{"type":"object","required":["orderLineId","quantity","condition"],"properties":{"quantity":{"type":"integer","maximum":1000000,"exclusiveMinimum":0},"condition":{"enum":["NEW_UNOPENED","OPENED_UNUSED","USED","DAMAGED_IN_TRANSIT","DEFECTIVE"],"type":"string"},"orderLineId":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false},"maxItems":200,"minItems":1},"resolution":{"enum":["REFUND","STORE_CREDIT","EXCHANGE"],"type":"string"},"requestedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"returnRequestId":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"policy":{"policyId":"POLICY-US","policyVersion":"2026-08-01"},"window":{"startDate":"2026-07-05","startsFrom":"DELIVERY","requestedAt":"2026-07-20","inclusiveDeadline":"2026-08-04"},"orderId":"ORDER-42","summary":{"fullOrderReturn":true,"eligibleLineCount":1,"requestedLineCount":1,"ineligibleLineCount":0,"manualReviewLineCount":0},"verdict":"ELIGIBLE","currency":"USD","reportHash":"sha256-hex","lineResults":[],"evidenceGaps":["CALLER_SUPPLIED_POLICY_AND_ORDER_FACTS_NOT_AUTHENTICATED"],"claimBoundary":{"refundExecuted":false,"returnAuthorized":false},"schemaVersion":"RETURN_ELIGIBILITY_AUDIT_V1","refundEstimate":{"restockingFeeMinor":500,"estimatedRefundMinor":4800,"grossMerchandiseRefundMinor":5000,"originalShippingRefundMinor":800,"returnShippingDeductionMinor":500},"returnRequestId":"RETURN-9","requestCommitment":"sha256-hex","recommendedDisposition":"ELIGIBLE_FOR_MERCHANT_RETURN_WORKFLOW"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"5","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":"$5/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"5","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"5","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yrsvzR2LWUarF5UfCdLZY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"5","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Evaluates whether order line items are eligible for return under a merchant's return policy, computing refund estimates and verdicts for each line.","exampleAgentPrompt":"Can you check if order ORDER-42 is eligible for a full return? It was delivered on 2026-07-05, has one line item — product PROD-001, quantity 1, paid $50.00 USD, not final sale, fulfilled — and our policy POLICY-US v2026-08-01 allows a 30-day return window from delivery date with free return shipping and a 10% restocking fee.","exampleUseCases":[{"title":"Customer return request triage","prompt":"A customer wants to return 2 of the 3 units they bought of product SKU-889 from order ORD-2024-9921, which was delivered on June 10. Our policy allows 30-day returns from delivery, 5% restocking fee, and excludes final-sale items — can you tell me if they're eligible and what refund they'd get?"},{"title":"Automated refund estimate at checkout","prompt":"Before we issue a refund for order ORD-55123, can you run a return eligibility audit? The order has two lines — a $120 jacket (not final sale, fulfilled June 1, delivered June 3) and a $30 belt tagged 'final-sale' — our policy window is 60 days from fulfillment with free return shipping and no restocking fee."},{"title":"Bulk return audit for fraud detection","prompt":"We have a suspicious return claim on order ORD-77890: the customer says they returned 4 units but our records show only 2 were previously returned out of 5 purchased. Product is not final sale, delivered 2026-05-01, policy window is 45 days from delivery. Can you audit the eligibility and flag any evidence gaps?"}],"resultDescription":"Returns a structured JSON audit report including: overall eligibility verdict (ELIGIBLE, INELIGIBLE, MANUAL_REVIEW), per-line results, computed return window (start date, deadline, requested date), refund estimate broken down into gross merchandise refund, restocking fee, shipping refund/deduction, and net estimated refund (all in minor currency units), evidence gaps (e.g. unauthenticated caller-supplied facts), claim boundary flags (returnAuthorized, refundExecuted), recommended disposition, a SHA-256 report hash, and a unique return request ID.","failureModes":["Invalid or missing required order fields (orderId, currency, lines) returns 400 validation error","Policy currency mismatch with order currency causes rejection","Return window dates in wrong format (non-YYYY-MM-DD) fail schema validation","quantityPreviouslyReturned exceeding quantityPurchased may produce INELIGIBLE verdict rather than error","Payment failure via x402 protocol blocks access to paid tier response","Truncated or malformed line items array (minItems:1 not met) returns 400","Final-sale items always return INELIGIBLE regardless of window","Evidence gap flagged when caller-supplied policy and order facts cannot be authenticated"],"whenToPreferThis":"Use this endpoint when you need a deterministic, policy-driven eligibility decision for e-commerce returns — especially when you need a structured refund estimate, restocking fee computation, and per-line verdicts in a single call. Prefer this over manual rule checks when the return policy has multiple dimensions (window start logic, excluded tags, excluded products, restocking fees, return shipping modes). Best suited for autonomous agents processing return requests in real time or for audit trails requiring a signed report hash.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:38:25.319Z","isFirstParty":false,"canonicalSlug":"e-commerce-return-eligibility-audit-f4ec95b9"}