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

# Get per-version scores and the newest version, per product

> For each requested product, returns the per-version overall score (the same numbers as `averages.total` on `GET /analytics`) and the newest version. Computed as one grouped aggregate covering every requested product plus one lookup for the newest version, so a page of product cards issues one request instead of one per card.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json get /analytics/summary
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /analytics/summary:
    get:
      tags:
        - analytics
      summary: Get per-version scores and the newest version, per product
      description: >-
        For each requested product, returns the per-version overall score (the
        same numbers as `averages.total` on `GET /analytics`) and the newest
        version. Computed as one grouped aggregate covering every requested
        product plus one lookup for the newest version, so a page of product
        cards issues one request instead of one per card.
      operationId: getAnalyticsSummaryByProduct
      parameters:
        - schema:
            type: array
            items:
              type: string
            description: Repeated query param; one value per product. At most 100.
            maxItems: 100
          required: true
          description: Repeated query param; one value per product. At most 100.
          style: form
          explode: true
          name: productIds
          in: query
        - schema:
            type: boolean
            description: Filter by the joined `Session.isProduction` flag.
          required: false
          description: Filter by the joined `Session.isProduction` flag.
          name: isProduction
          in: query
      responses:
        '200':
          description: Analytics summaries per product
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProductAnalyticsSummary'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Product not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    ProductAnalyticsSummary:
      type: object
      properties:
        productId:
          type: string
          description: The requested product
        versionScores:
          type: array
          items:
            type: object
            properties:
              versionId:
                type: string
              versionName:
                type: string
              score:
                type: number
            required:
              - versionId
              - versionName
              - score
          description: >-
            Per-version overall score, 0-100. Same numbers as `averages.total`
            on `GET /analytics`.
        latestVersion:
          type: object
          nullable: true
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
          description: >-
            Newest non-deleted version by creation date, or null when the
            product has none.
      required:
        - productId
        - versionScores
        - latestVersion
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````