{"uid":"cap_OB6uyXx8hZrgXt6NgwyCn","slug":"brainiac-returns-delivery-return-window-calculator-91a4b90f","name":"BRAINIAC Returns Delivery — Return Window Calculator","description":"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.","url":"https://www.brainiac.software/api/v1/returns-delivery/return-window-calculate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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},"country":{"type":"string","maxLength":80},"ordered":{"type":"string","maxLength":40},"postcode":{"type":"string","maxLength":20},"promised":{"type":"string","maxLength":40},"addressId":{"type":"string","maxLength":80},"delivered":{"type":"string","maxLength":40},"windowDays":{"type":"number","maximum":3650,"minimum":0}},"additionalProperties":false},"maxItems":80},"window":{"type":"object","properties":{"days":{"type":"number","maximum":3650,"minimum":0},"from":{"type":"string","maxLength":40}},"additionalProperties":false},"returns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"cost":{"type":"number","maximum":1000000000,"minimum":0},"reason":{"type":"string","maxLength":160},"weight":{"type":"number","maximum":1000000,"minimum":0},"carrier":{"type":"string","maxLength":80},"country":{"type":"string","maxLength":80},"orderId":{"type":"string","maxLength":80},"currency":{"type":"string","maxLength":12},"requested":{"type":"string","maxLength":40}},"additionalProperties":false},"maxItems":80},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":80},"line1":{"type":"string","maxLength":160},"line2":{"type":"string","maxLength":160},"region":{"type":"string","maxLength":80},"country":{"type":"string","maxLength":80},"postcode":{"type":"string","maxLength":20}},"additionalProperties":false},"maxItems":80}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","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.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lczBVwyOZYYpsW1Zndl-7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates whether a return request falls within or outside a configured return window, given order delivery data, return events, and policy rules.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Post-holiday returns eligibility audit","prompt":"I have a list of orders delivered in late December and return requests that came in through January — can you check which ones were submitted inside our standard 30-day return window and which were too late?"},{"title":"E-commerce return policy enforcement","prompt":"For order O-5 delivered on March 10, the customer requested a return on March 28. Our policy allows 21 days from delivery — is this return inside or outside the allowed window?"},{"title":"Batch return window check for marketplace seller","prompt":"I'm uploading a CSV of 50 orders with their delivery dates, return request dates, and our 14-day return policy. Can you tell me which returns are eligible and which have expired?"}],"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T12:36:53.176Z","isFirstParty":false,"canonicalSlug":"brainiac-returns-delivery-return-window-calculator-91a4b90f"}