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

# Žebříček produktové analytiky

> Seřaďte přispěvatele do Katalogu nebo přispěvatele a tabulky v Lasso.

## Poznámky k použití

Vyberte právě jedno `scope`:

* `catalog` řadí přispěvatele podle aktivity doručování produktů.
* `extraction` vrací žebříček uživatelů i tabulek podle řádků připravených v Lasso.

Řádky Katalogu jsou jedinečné pro každého přispěvatele, ne pro celou společnost. Produkt upravený dvěma přispěvateli se objeví u obou, takže součet žebříčku může překročit celkový počet jedinečných produktů společnosti.


## OpenAPI

````yaml openapi.yaml GET /analytics/products/leaderboard
openapi: 3.1.0
info:
  title: Lasso API
  description: AI-powered product data extraction and enhancement API
  version: 1.0.0
  contact:
    name: Lasso Support
    url: https://lasso.ai
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://app.productlasso.com/api/v1
    description: Production
security:
  - BearerAuth: []
paths:
  /analytics/products/leaderboard:
    get:
      tags:
        - Analytics
      summary: Get the Catalog or Lasso leaderboard
      operationId: getProductAnalyticsLeaderboard
      parameters:
        - $ref: '#/components/parameters/ProductAnalyticsFromParam'
        - $ref: '#/components/parameters/ProductAnalyticsToParam'
        - name: scope
          in: query
          required: true
          schema:
            type: string
            enum:
              - catalog
              - extraction
        - $ref: '#/components/parameters/ProductAnalyticsCatalogStatusParam'
        - $ref: '#/components/parameters/ProductAnalyticsUserParam'
        - $ref: '#/components/parameters/ProductAnalyticsSchemaParam'
        - $ref: '#/components/parameters/ProductAnalyticsTableParam'
        - $ref: '#/components/parameters/ProductAnalyticsSourceParam'
      responses:
        '200':
          description: Contributor leaderboard; extraction scope also includes tables.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductAnalyticsLeaderboardResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    ProductAnalyticsFromParam:
      name: from
      in: query
      required: true
      description: Inclusive reporting-period start.
      schema:
        type: string
        format: date
    ProductAnalyticsToParam:
      name: to
      in: query
      required: true
      description: >-
        Inclusive reporting-period end. The range may contain at most 1,830
        days.
      schema:
        type: string
        format: date
    ProductAnalyticsCatalogStatusParam:
      name: catalog_status
      in: query
      description: >-
        Current Catalog status to include. `all` means active and draft
        products.
      schema:
        type: string
        enum:
          - all
          - active
          - draft
          - archived
        default: all
    ProductAnalyticsUserParam:
      name: user_id
      in: query
      description: Current or former user UUID, or `system` for unattributed automation.
      schema:
        type: string
    ProductAnalyticsSchemaParam:
      name: schema_id
      in: query
      description: Filters both Catalog products and Lasso extraction tables by schema.
      schema:
        type: string
        format: uuid
    ProductAnalyticsTableParam:
      name: table_id
      in: query
      description: Filters Lasso analytics to one extraction table.
      schema:
        type: string
        format: uuid
    ProductAnalyticsSourceParam:
      name: source
      in: query
      description: Catalog-only source filter. Requires `scope=catalog`.
      schema:
        type: string
        enum:
          - manual
          - product_extraction
          - shopify
  schemas:
    ProductAnalyticsLeaderboardResponse:
      type: object
      required:
        - period
        - filters
        - scope
        - by_user
      properties:
        period:
          $ref: '#/components/schemas/ProductAnalyticsPeriod'
        filters:
          $ref: '#/components/schemas/ProductAnalyticsFilters'
        scope:
          type: string
          enum:
            - catalog
            - extraction
        by_user:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ProductAnalyticsCatalogLeaderboardRow'
              - $ref: '#/components/schemas/ProductAnalyticsExtractionUserRow'
        by_table:
          type: array
          description: Present only for extraction scope.
          items:
            $ref: '#/components/schemas/ProductAnalyticsExtractionTableRow'
    ProductAnalyticsPeriod:
      type: object
      required:
        - from
        - to
      properties:
        from:
          type: string
          format: date
        to:
          type: string
          format: date
    ProductAnalyticsFilters:
      type: object
      required:
        - catalog_status
        - user_id
        - schema_id
        - table_id
        - source
      properties:
        catalog_status:
          type: string
          enum:
            - all
            - active
            - draft
            - archived
        user_id:
          type:
            - string
            - 'null'
          description: User UUID, `system`, or null when no user filter is active.
        schema_id:
          type:
            - string
            - 'null'
          format: uuid
        table_id:
          type:
            - string
            - 'null'
          format: uuid
        source:
          type:
            - string
            - 'null'
          enum:
            - manual
            - product_extraction
            - shopify
            - null
    ProductAnalyticsCatalogLeaderboardRow:
      type: object
      required:
        - user
        - unique_products
        - new_products
        - updated_existing
        - total_actions
      properties:
        user:
          $ref: '#/components/schemas/ProductAnalyticsActor'
        unique_products:
          type: integer
          minimum: 0
        new_products:
          type: integer
          minimum: 0
        updated_existing:
          type: integer
          minimum: 0
        total_actions:
          type: integer
          minimum: 0
    ProductAnalyticsExtractionUserRow:
      type: object
      required:
        - user
        - products_prepared
        - tables
      properties:
        user:
          $ref: '#/components/schemas/ProductAnalyticsActor'
        products_prepared:
          type: integer
          minimum: 0
        tables:
          type: integer
          minimum: 0
    ProductAnalyticsExtractionTableRow:
      type: object
      required:
        - table_id
        - table_name
        - initiator
        - products_prepared
      properties:
        table_id:
          type: string
          format: uuid
        table_name:
          type: string
        initiator:
          $ref: '#/components/schemas/ProductAnalyticsActor'
        products_prepared:
          type: integer
          minimum: 0
    Error:
      type: object
      required:
        - status_code
        - error_type
        - message
        - request_id
      properties:
        status_code:
          type: integer
        error_type:
          type: string
          enum:
            - invalid_request
            - unauthenticated
            - forbidden
            - not_found
            - conflict
            - validation_error
            - rate_limited
            - service_unavailable
            - internal_error
        message:
          type: string
        request_id:
          type: string
        code:
          type: string
          description: >-
            Stable machine-readable detail code for validation, conflict, and
            retryable availability errors.
        retryable:
          type: boolean
          description: Whether the request can be retried without changing its payload.
        attribute_id:
          type: string
          format: uuid
          description: Stable Attribute identity when the error is scoped to one Attribute.
        attribute_key:
          type: string
          description: Attribute key when the error is scoped to one Attribute.
        details:
          type: object
          additionalProperties: true
        current_updated_at:
          type: string
          format: date-time
          description: >-
            Current resource revision supplied for client-directed refetch after
            a stale write.
    ProductAnalyticsActor:
      type: object
      required:
        - id
        - name
        - email
        - avatar_url
        - avatar_kind
        - avatar_config
        - avatar_storage_path
        - permission_preset
        - is_former_member
      properties:
        id:
          type:
            - string
            - 'null'
          format: uuid
        name:
          type: string
        email:
          type:
            - string
            - 'null'
          format: email
        avatar_url:
          type:
            - string
            - 'null'
          format: uri
        avatar_kind:
          type:
            - string
            - 'null'
          enum:
            - upload
            - boring
            - null
        avatar_config:
          type:
            - object
            - 'null'
          additionalProperties: true
        avatar_storage_path:
          type:
            - string
            - 'null'
        permission_preset:
          type:
            - string
            - 'null'
          description: >-
            Current permission preset; null for system or former actors without
            a current membership.
        is_former_member:
          type: boolean
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````