Return on Adspend (ROAS)

The /api/product/roas endpoint returns the return on adspend (roas) value for a single product over a given period. You must provide a valid product_id.

Query parameters

  • Name
    product_id
    Type
    string
    Description

    Unique identifier of the product (required).

  • Name
    period
    Type
    string
    Description

    Timeframe for the metric (e.g., 7d, 30d). View all supported periods →


GET/api/product/roas

Retrieve return on adspend (roas) for a product

Fetch a product-level metric by passing a product ID and time period.

Request

GET
/api/product/roas
curl -G http://localhost:3000/api/product/roas \
  -H "Authorization: Bearer {token}" \
  -d product_id=SKU-123 \
  -d period=30d
{
  "product_id": "SKU-123",
  "value": 123,
  "formatted_value": "123"
}

Use cases

  • Track product-specific KPIs
  • Support merchandising, pricing, and inventory decisions
  • Power product-level performance dashboards

Was this page helpful?