> ## Documentation Index
> Fetch the complete documentation index at: https://developers.criteo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting statistics

export const EndpointBadge = ({method = "GET", children}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-[#2AB673]"
    },
    POST: {
      bg: "mint-bg-[#3064E3]"
    },
    PUT: {
      bg: "mint-bg-[#C28C30]"
    },
    PATCH: {
      bg: "mint-bg-[#DA622B]"
    },
    DELETE: {
      bg: "mint-bg-[#CB3A32]"
    },
    API: {
      bg: "mint-bg-black"
    }
  };
  const key = method.toUpperCase();
  const styles = METHOD_STYLES[key] ?? METHOD_STYLES.API;
  return <div className="relative mt-7">
      <span className={`absolute -top-2 -left-2 z-10 ${styles.bg} text-white px-2.5 py-0.5 rounded-full text-xs font-bold tracking-wide`}>
        {key}
      </span>
      {children}
    </div>;
};

The statistical endpoints allows you to review the performance of your campaigns and pass on seller specific statistics to your sellers.

## Metrics

The metrics reported by the endpoints are:

|    | Metric Group                 | Description                                  |
| :- | :--------------------------- | :------------------------------------------- |
| A  | `impressions`                | Number of times product is shown in a banner |
| B  | `clicks`                     | Number of clicks on product                  |
| C  | `cost`                       | Amount spent for clicks on products          |
| D  | `saleUnits`                  | Number of products sold attributed to clicks |
| E  | `revenue`                    | Revenue generated by sales                   |
| F  | `CR` = Conversion Rate       | salesUnits / clicks                          |
| G  | `CPO` = Cost Per Order       | cost / salesUnits                            |
| H  | `COS` = Cost of Sale         | cost / revenue                               |
| I  | `ROAS` = Return On Add Spend | revenue / cost                               |

 \
The last six metrics can be computed in two ways, depending on the policy to count only the sales that result from clicks on the same seller's product in a banner (same-seller) or not (any-seller). Reporting can be controlled by `clickAttributionPolicy`.

***

## Aggregation Interval Size

The duration of the aggregation interval for the fundamental events is controlled by the filter parameter **intervalSize**. (Consider also the name **frequency**.) The valid values for this parameter are:

<table>
  <thead>
    <tr>
      <th>
        <p>
          Parameter
        </p>
      </th>

      <th>
        <p>
          Definition
        </p>
      </th>

      <th>
        <p>
          Type
        </p>
      </th>

      <th>
        <p>
          Required?
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <code>
            advertiserId
          </code>
        </p>
      </td>

      <td>
        <p>
          Show only metrics for this advertiser.
        </p>
      </td>

      <td>
        <p>
          <code>
            integer
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            clickAttributionPolicy
          </code>
        </p>
      </td>

      <td>
        <p>
          Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (enum:

          <code>
            Both
          </code>

          ,

          <code>
            SameSeller
          </code>

          ,

          <code>
            AnySeller
          </code>

          )
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            count
          </code>
        </p>
      </td>

      <td>
        <p>
          Return up to the first count rows of data (default is all rows).
        </p>
      </td>

      <td>
        <p>
          <code>
            integer
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            endDate
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur after date (default is today’s date).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (date-time)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            intervalSize
          </code>
        </p>
      </td>

      <td>
        <p>
          Specify the aggregation interval for events used to compute stats (default is "day").
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (enum:

          <code>
            Hour
          </code>

          ,

          <code>
            Day
          </code>

          ,

          <code>
            Month
          </code>

          , \`Year)     | No
        </p>
      </td>

      <td />
    </tr>

    <tr>
      <td>
        <p>
          <code>
            sellerId
          </code>
        </p>
      </td>

      <td>
        <p>
          Show only metrics for this seller (default all sellers).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          \`                                          | No
        </p>
      </td>

      <td />
    </tr>

    <tr>
      <td>
        <p>
          <code>
            startDate
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur before date (default is the value of

          <code>
            endDate
          </code>

          ).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (date-time)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>
  </tbody>
</table>

For example, the following request fetches aggregated seller statistics for the current day with a granularity of one row per hour. Every seller managed by this advertiser will have up to 24 rows in the response.

<EndpointBadge method="get">
  ```http theme={null}
  /marketplace-performance-outcomes/stats/sellers
  ```
</EndpointBadge>

<Info>
  The default interval size is `day`. If the interval size is `hour`, then the maximum date range allowed is one month.
</Info>

***

## Date Filtering

Filtering the results to events that happened in a temporal interval is done by setting the date filter parameters. These are `startDate` and the `endDate`. The start date includes all events timestamped since the beginning of that day, while the end date includes events until the end of day.

<table>
  <thead>
    <tr>
      <th>
        <p>
          Query Parameter
        </p>
      </th>

      <th>
        <p>
          Format
        </p>
      </th>

      <th>
        <p>
          Meaning
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <code>
            startDate
          </code>
        </p>
      </td>

      <td>
        <p>
          <code>
            YYYY-MM-DD
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur before date (default is the value of

          <code>
            endDate
          </code>

          )
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            endDate
          </code>
        </p>
      </td>

      <td>
        <p>
          <code>
            YYYY-MM-DD
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur after date (default is today’s date)
        </p>
      </td>
    </tr>
  </tbody>
</table>

If the end date is left off, it defaults to today. If the start date is left off, it defaults to the end date. As a result, the default query returns one day of stats. Using just the end date returns a single day as well:

<EndpointBadge method="get">
  ```http theme={null}
  /marketplace-performance-outcomes/stats/sellers
  ```
</EndpointBadge>

<Warning>
  There are a few constraints. The start date must not be in the future and must be on or precede the end date. The format to use for each is `YYY-MM-DD` (e.g. `2018-04-30`). The maximum duration of the date range is 1 year. If the granularity is `hour`, then the maximum duration of the date range is 1 month. Note that month and year aggregate values may contain partial data if filtered by date.
</Warning>

***

## Count Filtering

Filtering the results to a maximum number of data rows is done by setting the count filter parameter. When combined with `startDate` this can be used to perform simple pagination. For example, the first page can have a count of 100; the second page can start on the day after the last date in the first result and still have a count of 100 and so on. 

<table>
  <thead>
    <tr>
      <th>
        <p>
          Query Parameter
        </p>
      </th>

      <th>
        <p>
          Options
        </p>
      </th>

      <th>
        <p>
          Meaning
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <code>
            count
          </code>
        </p>
      </td>

      <td>
        <p>
          Int > 0
        </p>
      </td>

      <td>
        <p>
          Return up to the first count rows of data (default is to return all rows available).
        </p>
      </td>
    </tr>
  </tbody>
</table>

 \
The following query will return up to 100 rows of data.

<EndpointBadge method="get">
  ```http theme={null}
  /marketplace-performance-outcomes/stats/sellers
  ```
</EndpointBadge>

<Info>
  The default is to report all rows.
</Info>

***

## Seller Stats

Get performance statistics aggregated for sellers.

<table>
  <thead>
    <tr>
      <th>
        <p>
          Parameter
        </p>
      </th>

      <th>
        <p>
          Definition
        </p>
      </th>

      <th>
        <p>
          Type
        </p>
      </th>

      <th>
        <p>
          Required?
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <code>
            advertiserId
          </code>
        </p>
      </td>

      <td>
        <p>
          Show only metrics for this advertiser.
        </p>
      </td>

      <td>
        <p>
          <code>
            integer
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            clickAttributionPolicy
          </code>
        </p>
      </td>

      <td>
        <p>
          Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (enum:

          <code>
            Both
          </code>

          ,

          <code>
            SameSeller
          </code>

          ,

          <code>
            AnySeller
          </code>

          )
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            count
          </code>
        </p>
      </td>

      <td>
        <p>
          Return up to the first count rows of data (default is all rows).
        </p>
      </td>

      <td>
        <p>
          <code>
            integer
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            endDate
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur after date (default is today’s date).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (date-time)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            intervalSize
          </code>
        </p>
      </td>

      <td>
        <p>
          Specify the aggregation interval for events used to compute stats (default is "day").
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (enum: Hour, Day, Month, Year)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            sellerId
          </code>
        </p>
      </td>

      <td>
        <p>
          Show only metrics for this seller (default all sellers).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            startDate
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur before date (default is the value of

          <code>
            endDate
          </code>

          ).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (date-time)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>
  </tbody>
</table>

<EndpointBadge method="get">
  ```http theme={null}
  /marketplace-performance-outcomes/stats/sellers
  ```
</EndpointBadge>

**Sample response**

```json JSON theme={null}
{
    "columns": ["sellerId", "sellerName", "month", "impressions", "clicks", "cost", "saleUnits", "revenue", "cr", "cpo", "cos", "roas"],
    "data": [
       [1200972, "sellerA", "2019-05-01", 14542, 48, 3.36, 0, 0.0, 0.0, null, null, 0.0],
       [1200972, "sellerA", "2019-06-01", 16619, 53, 3.71, 0, 0.0, 0.0, null, null, 0.0],
       [1200974, "sellerB", "2019-05-01", 10102, 47, 3.29, 3, 396000.0, 0.063, 1.096, 8.308E-6, 120364.741],
       [1200974, "sellerB", "2019-06-01", 11576, 54, 3.78, 1, 132000.0, 0.018, 3.78, 2.863E-5, 34920.634]
    ],
    "rows": 4
}
```

The seller id appears in the output in the first column and the seller name appears in the second. The time interval appears in the output as the third column. The remaining columns are metrics.

***

## Campaign Stats

Get performance statistics aggregated for campaigns.

<table>
  <thead>
    <tr>
      <th>
        <p>
          Parameter
        </p>
      </th>

      <th>
        <p>
          Definition
        </p>
      </th>

      <th>
        <p>
          Type
        </p>
      </th>

      <th>
        <p>
          Required?
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <code>
            advertiserId
          </code>
        </p>
      </td>

      <td>
        <p>
          Show only metrics for this advertiser.
        </p>
      </td>

      <td>
        <p>
          <code>
            integer
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            campaignId
          </code>
        </p>
      </td>

      <td>
        <p>
          Show only metrics for this campaign (default all campaigns).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            clickAttributionPolicy
          </code>
        </p>
      </td>

      <td>
        <p>
          Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (enum:

          <code>
            Both
          </code>

          ,

          <code>
            SameSeller
          </code>

          ,

          <code>
            AnySeller
          </code>

          )
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            count
          </code>
        </p>
      </td>

      <td>
        <p>
          Return up to the first count rows of data (default is all rows).
        </p>
      </td>

      <td>
        <p>
          <code>
            integer
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            endDate
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur after date (default is today’s date).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (date-time)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            intervalSize
          </code>
        </p>
      </td>

      <td>
        <p>
          Specify the aggregation interval for events used to compute stats (default is "day").
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (enum:

          <code>
            Hour
          </code>

          ,

          <code>
            Day
          </code>

          ,

          <code>
            Month
          </code>

          ,

          <code>
            Year
          </code>

          )
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            startDate
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur before date (default is the value of

          <code>
            endDate
          </code>

          ).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (date-time)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>
  </tbody>
</table>

<EndpointBadge method="get">
  ```http theme={null}
  /marketplace-performance-outcomes/stats/campaigns
  ```
</EndpointBadge>

**Sample response**

```json JSON theme={null}
{
   "columns": [ "campaignId", "month", "impressions", "clicks", "cost", "saleUnits", "revenue", "cr", "cpo", "cos", "roas" ],
   "data": [
       [168423, "2019-05-01", 3969032, 13410, 1111.295, 985, 190758099, 0.073, 1.128, 0.000, 171653.880 ],
       [168423, "2019-06-01", 8479603, 25619, 2190.705, 740, 152783656, 0.028, 2.960, 0.000, 69741.775 ]
       ],
   "rows": 2
}
```

The campaign id appears in the output as the first column. The time interval appears in the output as the second column. The remaining columns are metrics.

***

## Seller Campaign Stats

Get performance statistics aggregated for seller campaigns.

<table>
  <thead>
    <tr>
      <th>
        <p>
          Parameter
        </p>
      </th>

      <th>
        <p>
          Definition
        </p>
      </th>

      <th>
        <p>
          Type
        </p>
      </th>

      <th>
        <p>
          Required?
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <code>
            advertiserId
          </code>
        </p>
      </td>

      <td>
        <p>
          Show only metrics for this advertiser.
        </p>
      </td>

      <td>
        <p>
          <code>
            integer
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            campaignId
          </code>
        </p>
      </td>

      <td>
        <p>
          Show only metrics for this campaign (default all campaigns).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            clickAttributionPolicy
          </code>
        </p>
      </td>

      <td>
        <p>
          Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (enum:

          <code>
            Both
          </code>

          ,

          <code>
            SameSeller
          </code>

          ,

          <code>
            AnySeller
          </code>

          )
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            count
          </code>
        </p>
      </td>

      <td>
        <p>
          Return up to the first count rows of data (default is all rows).
        </p>
      </td>

      <td>
        <p>
          <code>
            integer
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            endDate
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur after date (default is today’s date).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (date-time)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            intervalSize
          </code>
        </p>
      </td>

      <td>
        <p>
          Specify the aggregation interval for events used to compute stats (default is "day").
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (enum: Hour, Day, Month, Year)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            sellerId
          </code>
        </p>
      </td>

      <td>
        <p>
          Show only metrics for this seller (default all sellers).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            startDate
          </code>
        </p>
      </td>

      <td>
        <p>
          Filter out all events that occur before date (default is the value of

          <code>
            endDate
          </code>

          ).
        </p>
      </td>

      <td>
        <p>
          <code>
            string
          </code>

          (date-time)
        </p>
      </td>

      <td>
        <p>
          No
        </p>
      </td>
    </tr>
  </tbody>
</table>

<EndpointBadge method="get">
  ```http theme={null}
  /marketplace-performance-outcomes/stats/seller-campaigns
  ```
</EndpointBadge>

**Sample response**

```json JSON theme={null}
{
    "columns": [
        "campaignId", "sellerId", "sellerName", "month", "impressions", "clicks", "cost", "saleUnits", "revenue", "cr", "cpo", "cos", "roas"
    ],
    "data": [
        [168423, 1110222, "118883955", "2019-05-01", 14542, 48, 3.36, 0, 0.0, 0.0, null, null, 0.0],
        [168423, 1110222, "118883955", "2019-06-01", 16619, 53, 3.71, 0, 0.0, 0.0, null, null, 0.0],
        [168423, 1110225, "117980027", "2019-05-01", 12502, 48, 3.36, 0, 0.0, 0.0, null, null, 0.0],
        [168423, 1110225, "117980027", "2019-06-01", 20266, 53, 3.71, 0, 0.0, 0.0, null, null, 0.0]
    ],
    "rows": 4
}
```

The `campaignId`, `sellerId`, and `sellerName` appear in the first three columns of the output. These are followed by the interval size column. The remaining columns are metrics.

## What's next

* [Validation Errors](/marketing-solutions/v2025.10/docs/validation-errors)
