{"uid":"cap_ZuZfqtWJmXOguPlLre0rc","slug":"brainiac-return-shipping-cost-calculator-1fa5d733","name":"BRAINIAC Return Shipping Cost 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-shipping-cost-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":{"costs":[{"basis":"flat","stated":0,"orderId":"O-1","currency":"USD","returnId":"R-1","calculated":4.5,"refundGranted":false,"interpretation":"stated","statedSupplied":false,"calculatedSupplied":true},{"basis":"","stated":0,"orderId":"O-2","currency":"","returnId":"R-2","calculated":0,"refundGranted":false,"interpretation":"stated","statedSupplied":false,"calculatedSupplied":false}],"status":"calculated","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."],"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_f9bf93OIv9HaYrVzLGZlc","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 return shipping costs for e-commerce orders using supplied carrier rates and business rules, without contacting any carrier or initiating returns","exampleAgentPrompt":"Calculate the return shipping cost for order O-1 going back to the US, weight 2.5kg, using a flat rate of $4.50 USD with carrier FedEx and a 30-day return window — tell me the calculated cost and whether a refund should be granted.","exampleUseCases":[{"title":"Automate return cost for e-commerce orders","prompt":"I have a list of customer return requests — order O-100 weighing 1.2kg going to GB with a flat carrier rate of £3.80 GBP via Royal Mail, and order O-101 weighing 0.5kg going to US with a flat rate of $4.50 USD via USPS. Calculate the return shipping cost for each one."},{"title":"Apply business rules to return shipping fees","prompt":"Calculate the return shipping cost for order O-55, US destination, 3kg, carrier UPS, flat rate $6.00 USD, with a business rule that return windows are capped at 30 days. Tell me the basis and whether a refund is granted."},{"title":"Batch return cost calculation from CSV data","prompt":"I have a CSV file with 20 orders and their return details — weights, carrier rates, countries, and postcodes — can you calculate the return shipping cost for each one and give me back the calculated cost per order?"}],"resultDescription":"A JSON object with an array of cost records per return, each including orderId, returnId, calculated cost, stated cost, basis, currency, refundGranted flag, and interpretation. Also includes top-level status, checkedAt timestamp, findings array, and a limitations list explaining what data was and was not used in the calculation. Flags like eventsInvented, returnInitiated, and carrierContacted confirm no external actions were taken.","failureModes":["Missing required rate data results in zero calculated cost and calculatedSupplied: false","Unsupported postcode format for countries outside AU, CA, DE, ES, FR, GB, IT, NL, US may not be validated","Exceeding maxItems limits (40 rates, 80 orders/events) silently truncates input","Input CSV or JSON exceeding 200,000 characters is rejected","No carrier is contacted so live rate lookups are not possible — cost is only as accurate as supplied rates"],"whenToPreferThis":"Use this endpoint when you need a deterministic, rules-based return shipping cost calculation using data you already have (carrier rates, order weights, countries) without triggering any real-world side effects like carrier API calls or return label generation. It is ideal for batch processing, audit trails, or pre-calculating return costs in an agent workflow before committing to a refund or return authorization. Prefer it over live carrier APIs when you want a reproducible, offline calculation with explicit business rules applied.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T12:37:04.132Z","isFirstParty":false,"canonicalSlug":"brainiac-return-shipping-cost-calculator-1fa5d733"}