# BRAINIAC Returns Delivery — Return Window Calculator

> BRAINIAC Returns Delivery — Return Window Calculator is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-12).

Calculates whether a return request falls within or outside a configured return window, given order delivery data, return events, and policy rules.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/returns-delivery/return-window-calculate?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-returns-delivery-return-window-calculator-91a4b90f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OB6uyXx8hZrgXt6NgwyCn

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 brainiac-returns-delivery-return-window-calculator-91a4b90f -d '<json body>'
```

Example prompt: Check whether these two customer returns are inside or outside our 14-day return window: order O-1 was delivered on November 1 2026, return R-1 was requested on November 20, and return R-2 was requested on November 15. Use a 14-day window counted from the delivery date.

## When to prefer this

Use this endpoint when you need a deterministic, policy-driven calculation of return window eligibility based on delivery dates and business rules, without needing to contact a carrier or initiate a real return. It is ideal for pre-screening return requests in bulk, applying custom window rules, and generating an audit trail of inside/outside determinations. Prefer it over carrier APIs when you only need eligibility logic, not live tracking or refund processing.

## Known failure modes

- Missing required delivery date causes inability to anchor the window — returns an error or empty result
- Window days not supplied and no default configured — daysSupplied flag will be false and calculation may be incomplete
- Return request dates in unrecognized format cause parsing failures
- Orders array exceeds maxItems:80 limit — request rejected
- Carrier event codes not in the recognized set are ignored without raising an error
- No refund is ever automatically granted — refundGranted always false per service limitations

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a JSON object with the calculated window (start date, end date, number of days, basis), and for each return request whether its state is 'inside' or 'outside' the window, the refundGranted flag, checkedAt timestamp, and a list of findings and limitations describing what was and was not evaluated (e.g. no carrier was contacted, no refund was automatically initiated).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "maxLength": 200000
  },
  "file": {
   "type": "object",
   "required": [
    "mediaType",
    "fileBase64"
   ],
   "properties": {
    "filename": {
     "type": "string",
     "maxLength": 180,
     "minLength": 1
    },
    "mediaType": {
     "enum": [
      "text/plain",
      "text/csv",
      "application/json"
     ],
     "type": "string"
    },
    "fileBase64": {
     "type": "string",
     "maxLength": 12000000,
     "minLength": 1
    }
   },
   "additionalProperties": false
  },
  "json": {
   "type": "string",
   "maxLength": 200000
  },
  "text": {
   "type": "string",
   "maxLength": 200000
  },
  "rates": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "basis": {
      "type": "string",
      "maxLength": 40
     },
     "amount": {
      "type": "number",
      "maximum": 1000000000,
      "minimum": 0
     },
     "carrier": {
      "type": "string",
      "maxLength": 80
     },
     "country": {
      "type": "string",
      "maxLength": 80
     },
     "currency": {
      "type": "string",
      "maxLength": 12
     }
    },
    "additionalProperties": false
   },
   "maxItems": 40
  },
  "rules": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "name",
     "value"
    ],
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 40,
      "minLength": 1
     },
     "value": {
      "type": "string",
      "maxLength": 40
     }
    },
    "additionalProperties": false
   },
   "maxItems": 8
  },
  "events": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "at": {
      "type": "string",
      "maxLength": 40
     },
     "id": {
      "type": "string",
      "maxLength": 80
     },
     "code": {
      "type": "string",
      "maxLength": 80
     },
     "detail": {
      "type": "string",
      "maxLength": 500
     },
     "orderId": {
      "type": "string",
      "maxLength": 80
     }
    },
    "additionalProperties": false
   },
   "maxItems": 80
  },
  "orders": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 80
     },
     "status": {
      "type": "string",
      "maxLength": 80
     },
     "weight": {
      "type": "number",
      "maximum": 1000000,
      "minimum": 0
     },
     "carrier": {
      "type": "string",
      "maxLength": 80
  
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "days": 14,
  "from": "delivered",
  "status": "calculated",
  "returns": [
   {
    "id": "R-1",
    "end": "2026-11-15",
    "start": "2026-11-01",
    "state": "outside",
    "orderId": "O-1",
    "requested": "2026-11-20",
    "refundGranted": false
   },
   {
    "id": "R-2",
    "end": "2026-11-15",
    "start": "2026-11-01",
    "state": "inside",
    "orderId": "O-1",
    "requested": "2026-11-15",
    "refundGranted": false
   }
  ],
  "findings": [],
  "checkedAt": "2026-11-04T12:00:00.000Z",
  "limitations": [
   "Orders, addresses, events, returns, and rates are copied only from labeled fields supplied by the caller.",
   "No carrier tracking event is added. A code is classified only when it is failed, delivery_failed, not_delivered, undeliverable, refused, damaged, delayed, late, held, hold, address, address_issue, bad_address, returned, returned_to_sender, rts, or exception.",
   "An address check is structural. Postcode shape is checked only for AU, CA, DE, ES, FR, GB, IT, NL, and US. Delivery is not confirmed.",
   "A return cost uses only a supplied rate, and a window uses only a supplied day count. No refund is granted.",
   "No carrier account is contacted and no return is initiated."
  ],
  "daysSupplied": true,
  "refundGranted": false,
  "eventsInvented": false,
  "returnInitiated": false,
  "carrierContacted": false,
  "deliverabilityConfirmed": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-returns-delivery-return-window-calculator-91a4b90f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
