# E-Commerce Return Eligibility Audit

> E-Commerce Return Eligibility Audit is a paid API for AI agents from rooke-token-risk-pilot.rookepoole.workers.dev, paid per call via x402, $5/call, status unknown (last checked 2026-10-10).

Evaluates whether order line items are eligible for return under a merchant's return policy, computing refund estimates and verdicts for each line.

## Facts

- Endpoint: POST https://rooke-token-risk-pilot.rookepoole.workers.dev/v1/x402/return-eligibility-audit?utm_source=zero.xyz
- Price: $5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/e-commerce-return-eligibility-audit-f4ec95b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h7o48y4-zWwTafZfLgsQ_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability e-commerce-return-eligibility-audit-f4ec95b9 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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": {
     
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "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"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/e-commerce-return-eligibility-audit-f4ec95b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rooke-token-risk-pilot.rookepoole.workers.dev](https://www.zero.xyz/host/rooke-token-risk-pilot.rookepoole.workers.dev/llms.txt)
