---
title: "Controller Get Existing Cpg Analysis"
method: POST
path: "/ad_analytics/cpg_suite/cpg-analysis/get-existing"
---

# Controller Get Existing Cpg Analysis

`POST /ad_analytics/cpg_suite/cpg-analysis/get-existing`

## Request

- Base URL: `https://api.akkio.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.akkio.com/ad_analytics/cpg_suite/cpg-analysis/get-existing`
- Auth: none declared

Get existing CPG analysis results

## Request body

- CPGAnalysisRequest: Request for CPG analysis - finding top brands, categories, products, etc.
  - `grouping` 'CATEGORY' | 'SUBCATEGORY' | 'BRAND' | 'PRODUCT_NAME', required: Enum for different grouping options in CPG analysis.
  - `metric` 'total_sales' | 'transaction_count' | 'customer_count', required: Primary metrics for CPG analysis.
  - `filters` CPGSuiteFilter, required: Filter for CPG Suite.
    - `selections` SelectionPayload, required
      - `selections` array[], required
        - Selection[]
          - `field` string, required
          - `values` string[], nullable, required
    - `search_string` string, nullable: Search string for fuzzy match
    - `timeframe` SrcApiAdAnalyticsModelTimeframe
      - `start_date` string, date-time, required
      - `end_date` string, date-time, nullable, required
    - `audience_filter` CPGAudienceFilter: Audience filter for CPG Suite with category selection support.
      - `audience_id` string, nullable: Base audience ID to filter by
      - `category_selections` SelectionPayload
        - `selections` array[], required
          - Selection[]
            - `field` string, required
            - `values` string[], nullable, required

## Response `200`

Successful Response

- union
  - BrandAnalysisResponse: Response for brand analysis.
    - `grouping` 'CATEGORY' | 'SUBCATEGORY' | 'BRAND' | 'PRODUCT_NAME', required: Enum for different grouping options in CPG analysis.
    - `metric` 'total_sales' | 'transaction_count' | 'customer_count', required: Primary metrics for CPG analysis.
    - `overall_value` number, required: Overall total for the selected metric
    - `weighted_overall_value` number, required: Weighted overall total for the selected metric
    - `brands` BrandAnalysisItem[], required: List of top brands
      - `item` string, required: The item being analyzed (brand, category, product name, or UPC)
      - `value` number, required: Value of the selected metric for this item
      - `weighted_value` number, required: Weighted value of the selected metric for this item
  - CategoryAnalysisResponse: Response for category analysis.
    - `grouping` 'CATEGORY' | 'SUBCATEGORY' | 'BRAND' | 'PRODUCT_NAME', required: Enum for different grouping options in CPG analysis.
    - `metric` 'total_sales' | 'transaction_count' | 'customer_count', required: Primary metrics for CPG analysis.
    - `overall_value` number, required: Overall total for the selected metric
    - `weighted_overall_value` number, required: Weighted overall total for the selected metric
    - `categories` CategoryAnalysisItem[], required: List of top categories
      - `item` string, required: The item being analyzed (brand, category, product name, or UPC)
      - `value` number, required: Value of the selected metric for this item
      - `weighted_value` number, required: Weighted value of the selected metric for this item
  - SubcategoryAnalysisResponse: Response for subcategory analysis.
    - `grouping` 'CATEGORY' | 'SUBCATEGORY' | 'BRAND' | 'PRODUCT_NAME', required: Enum for different grouping options in CPG analysis.
    - `metric` 'total_sales' | 'transaction_count' | 'customer_count', required: Primary metrics for CPG analysis.
    - `overall_value` number, required: Overall total for the selected metric
    - `weighted_overall_value` number, required: Weighted overall total for the selected metric
    - `subcategories` SubcategoryAnalysisItem[], required: List of top subcategories
      - `item` string, required: The item being analyzed (brand, category, product name, or UPC)
      - `value` number, required: Value of the selected metric for this item
      - `weighted_value` number, required: Weighted value of the selected metric for this item
  - ProductAnalysisResponse: Response for product analysis.
    - `grouping` 'CATEGORY' | 'SUBCATEGORY' | 'BRAND' | 'PRODUCT_NAME', required: Enum for different grouping options in CPG analysis.
    - `metric` 'total_sales' | 'transaction_count' | 'customer_count', required: Primary metrics for CPG analysis.
    - `overall_value` number, required: Overall total for the selected metric
    - `weighted_overall_value` number, required: Weighted overall total for the selected metric
    - `products` ProductAnalysisItem[], required: List of top products
      - `item` string, required: The item being analyzed (brand, category, product name, or UPC)
      - `value` number, required: Value of the selected metric for this item
      - `weighted_value` number, required: Weighted value of the selected metric for this item
      - `brand` string, nullable, required: Brand of the product
      - `category` string, nullable, required: Category of the product
  - UPCAnalysisResponse: Response for UPC analysis.
    - `grouping` 'CATEGORY' | 'SUBCATEGORY' | 'BRAND' | 'PRODUCT_NAME', required: Enum for different grouping options in CPG analysis.
    - `metric` 'total_sales' | 'transaction_count' | 'customer_count', required: Primary metrics for CPG analysis.
    - `overall_value` number, required: Overall total for the selected metric
    - `weighted_overall_value` number, required: Weighted overall total for the selected metric
    - `upcs` UPCAnalysisItem[], required: List of top UPCs
      - `item` string, required: The item being analyzed (brand, category, product name, or UPC)
      - `value` number, required: Value of the selected metric for this item
      - `weighted_value` number, required: Weighted value of the selected metric for this item
      - `product_name` string, nullable, required: Name of the product
      - `brand` string, nullable, required: Brand of the product
      - `category` string, nullable, required: Category of the product

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/akkio/apis/akkio-api.md) - [All operations](https://skmtc.dev/akkio/apis/akkio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akkio/apis/akkio-api/revisions/c477deff6271?raw)
