Catalog/ecom-roas-evaluate

Calculators

ROAS / ACoS evaluation API

Evaluate a campaign: ROAS (revenue / adSpend), ACoS, and — with gross margin — gross profit and net profit after ad spend, plus target comparison and a rating. Deterministic. Answers 'what is my ROAS and ACoS','am I profitable after ad spend','does this hit my target ROAS'.

Price$0.01per request
MethodPOST
Route/v1/calc/ecom-roas-evaluate
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
ecomroasacosadsmarketingprofitppccalc
API URLhttps://x402.hexl.dev/v1/calc/ecom-roas-evaluate
Integration docs
Example request
{
  "revenue": 10000,
  "adSpend": 2500,
  "grossMargin": 0.5,
  "targetRoas": 3
}
Example response
{
  "formula": "ROAS = revenue / adSpend; ACoS = adSpend / revenue",
  "revenue": 10000,
  "adSpend": 2500,
  "roas": 4,
  "acosPercent": 25,
  "grossProfit": 5000,
  "netProfitAfterAdSpend": 2500,
  "breakevenRoas": 2,
  "profitable": true,
  "targetRoas": 3,
  "meetsTarget": true,
  "rating": "strong"
}
Input schema
{
  "type": "object",
  "required": [
    "revenue",
    "adSpend"
  ],
  "properties": {
    "revenue": {
      "type": "number",
      "examples": [
        10000
      ]
    },
    "adSpend": {
      "type": "number",
      "examples": [
        2500
      ]
    },
    "grossMargin": {
      "type": "number",
      "description": "Decimal 0-1 for profit calc",
      "examples": [
        0.5
      ]
    },
    "targetRoas": {
      "type": "number",
      "examples": [
        3
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}