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

# Get Analytics Periods Endpoint



## OpenAPI

````yaml /api-reference/openapi/portal.json get /api/v1/merchants/{merchant_id}/analytics/periods
openapi: 3.1.0
info:
  title: Depict Portal API
  version: 1.0.0
  description: >-
    REST API behind the Depict merchant portal: merchants, products,
    collections, curation, metrics, analytics and search insights. All endpoints
    require an Auth0-issued bearer token.
servers:
  - url: ''
security: []
paths:
  /api/v1/merchants/{merchant_id}/analytics/periods:
    get:
      tags:
        - Analytics
      summary: Get Analytics Periods Endpoint
      operationId: >-
        get_analytics_periods_endpoint_api_v1_merchants__merchant_id__analytics_periods_get
      parameters:
        - name: merchant_id
          in: path
          required: true
          schema:
            type: string
            title: Merchant Id
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsPeriodsResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Auth0: []
components:
  schemas:
    AnalyticsPeriodsResponse:
      properties:
        weeks:
          items:
            $ref: '#/components/schemas/AnalyticsPeriod'
          type: array
          title: Weeks
          default: []
        months:
          items:
            $ref: '#/components/schemas/AnalyticsPeriod'
          type: array
          title: Months
          default: []
      type: object
      title: AnalyticsPeriodsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AnalyticsPeriod:
      properties:
        period_type:
          type: string
          enum:
            - week
            - month
            - week4
          title: Period Type
        period_start:
          type: string
          format: date
          title: Period Start
        period_end:
          type: string
          format: date
          title: Period End
        has_snapshot:
          type: boolean
          title: Has Snapshot
      type: object
      required:
        - period_type
        - period_start
        - period_end
        - has_snapshot
      title: AnalyticsPeriod
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Auth0:
      type: oauth2
      flows:
        authorizationCode:
          scopes:
            openid: OpenID Connect
            profile: User profile
            email: User email
          authorizationUrl: https://depictai.eu.auth0.com/oauth/authorize
          tokenUrl: https://depictai.eu.auth0.com/oauth/token
      x-tokenName: id_token

````