Product Performance

Product performance records give you a per-product breakdown of how each winning product is doing on a given day. Revenue, units sold, ad spend, and ROAS are all tracked here, letting you quickly spot which products are printing money and which ones need to be cut. This data ties directly into your product-level P&L.

The product performance model

Each record represents one day of performance data for a single product in a specific store.

Properties

  • Name
    id
    Type
    integer
    Description

    Unique identifier for the record.

  • Name
    date
    Type
    string
    Description

    The date this record covers, in YYYY-MM-DD format.

  • Name
    store
    Type
    string
    Description

    The store identifier (e.g., your Shopify store name).

  • Name
    product_id
    Type
    integer
    Description

    The ID of the product this record is associated with. Must reference an existing product.

  • Name
    revenue
    Type
    number
    Description

    Total revenue generated by this product on this day.

  • Name
    units_sold
    Type
    integer
    Description

    Number of units sold.

  • Name
    ad_spend
    Type
    number
    Description

    Ad spend attributed to this product.

  • Name
    roas
    Type
    number
    Description

    Return on ad spend — calculated as revenue / ad_spend.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the record was created.


GET/financials/product-performance

List product performance

This endpoint returns product performance records. Filter by date range, store, or product to drill into specific data.

Optional attributes

  • Name
    start
    Type
    string
    Description

    Start date in YYYY-MM-DD format.

  • Name
    end
    Type
    string
    Description

    End date in YYYY-MM-DD format.

  • Name
    store
    Type
    string
    Description

    Filter by store identifier.

  • Name
    product_id
    Type
    integer
    Description

    Filter by product ID to see performance for a specific product.

  • Name
    limit
    Type
    integer
    Description

    Limit the number of records returned.

  • Name
    offset
    Type
    integer
    Description

    Offset for pagination.

Request

GET
/financials/product-performance
curl -G https://api.dealdome.eu/financials/product-performance \
  -H "Authorization: Bearer {token}" \
  -d start=2026-04-01 \
  -d end=2026-04-13 \
  -d product_id=1

Response

{
  "data": [
    {
      "id": 312,
      "date": "2026-04-13",
      "store": "my-store",
      "product_id": 1,
      "revenue": 845.60,
      "units_sold": 34,
      "ad_spend": 210.00,
      "roas": 4.03,
      "created_at": "2026-04-13T23:59:00Z"
    },
    {
      "id": 311,
      "date": "2026-04-12",
      "store": "my-store",
      "product_id": 1,
      "revenue": 620.40,
      "units_sold": 25,
      "ad_spend": 180.00,
      "roas": 3.45,
      "created_at": "2026-04-12T23:59:00Z"
    }
  ]
}

POST/financials/product-performance

Create or update product performance

This endpoint creates a new product performance record or updates an existing one. The upsert is keyed on date + store + product_id — if a record already exists for that combination, it gets updated with the new values.

Required attributes

  • Name
    date
    Type
    string
    Description

    The date in YYYY-MM-DD format.

  • Name
    store
    Type
    string
    Description

    The store identifier.

  • Name
    product_id
    Type
    integer
    Description

    The ID of the product.

  • Name
    revenue
    Type
    number
    Description

    Total revenue for this product on this day.

  • Name
    units_sold
    Type
    integer
    Description

    Number of units sold.

Optional attributes

  • Name
    ad_spend
    Type
    number
    Description

    Ad spend attributed to this product. Defaults to 0.

  • Name
    roas
    Type
    number
    Description

    Return on ad spend — calculated automatically from revenue / ad_spend if omitted.

Request

POST
/financials/product-performance
curl https://api.dealdome.eu/financials/product-performance \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "date": "2026-04-13",
    "store": "my-store",
    "product_id": 1,
    "revenue": 845.60,
    "units_sold": 34,
    "ad_spend": 210.00
  }'

Response

{
  "id": 312,
  "date": "2026-04-13",
  "store": "my-store",
  "product_id": 1,
  "revenue": 845.60,
  "units_sold": 34,
  "ad_spend": 210.00,
  "roas": 4.03,
  "created_at": "2026-04-13T23:59:00Z"
}

Was this page helpful?