Catalog/ecom-returns-cost

Calculators

Returns cost calculator API

Compute the total cost of returns: refunds + (restocking + reverse shipping) per unit + COGS write-off on unresalable units, plus cost per return and a rating bucket. Deterministic reverse-logistics math. Answers 'what do returns cost me','cost per return with restocking and reverse shipping'.

Price$0.01per request
MethodPOST
Route/v1/calc/ecom-returns-cost
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
ecomreturnsrefundsreverse-logisticscostrestockingecommercecalc
API URLhttps://x402.hexl.dev/v1/calc/ecom-returns-cost
Integration docs
Example request
{
  "unitsSold": 1000,
  "returnRate": 0.2,
  "avgSalePrice": 50,
  "restockingCostPerUnit": 3,
  "reverseShippingPerUnit": 7,
  "resalableRate": 0.8,
  "unitCost": 20
}
Example response
{
  "formula": "returnedUnits = unitsSold × returnRate; cost = refunds + (restock + reverseShip)/unit + COGS write-off on unresalable",
  "unitsSold": 1000,
  "returnRate": 0.2,
  "returnedUnits": 200,
  "refundAmount": 10000,
  "processingCost": 2000,
  "writeOff": 800,
  "totalReturnsCost": 12800,
  "costPerReturn": 64,
  "rating": "elevated"
}
Input schema
{
  "type": "object",
  "required": [
    "unitsSold",
    "returnRate",
    "avgSalePrice"
  ],
  "properties": {
    "unitsSold": {
      "type": "number",
      "examples": [
        1000
      ]
    },
    "returnRate": {
      "type": "number",
      "description": "Decimal 0-1",
      "examples": [
        0.2
      ]
    },
    "avgSalePrice": {
      "type": "number",
      "examples": [
        50
      ]
    },
    "restockingCostPerUnit": {
      "type": "number",
      "examples": [
        3
      ]
    },
    "reverseShippingPerUnit": {
      "type": "number",
      "examples": [
        7
      ]
    },
    "resalableRate": {
      "type": "number",
      "description": "Decimal 0-1, default 1",
      "examples": [
        0.8
      ]
    },
    "unitCost": {
      "type": "number",
      "description": "COGS per unit for write-off calc",
      "examples": [
        20
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}