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

# Get loyalty account streaks

> Get loyalty account streaks



## OpenAPI

````yaml /api-reference/openapi.documented.json get /api/loyalty/account_streaks
openapi: 3.0.2
info:
  title: Snag Solutions - API Docs
  description: >-
    Documentation for Loyalty & Socials APIs. Some endpoints require an API key
    to authenticate. To obtain a key, reach out to the Snag Solutions team at
    support@snagsolutions.io.
  version: '0.1'
servers:
  - url: https://admin.snagsolutions.io/
    description: Production
security: []
paths:
  /api/loyalty/account_streaks:
    get:
      tags:
        - Loyalty
      summary: Get loyalty account streaks
      description: Get loyalty account streaks
      parameters:
        - name: websiteId
          in: query
          description: Unique identifier for the website
          schema:
            type: string
            format: uuid
            title: Website ID
            example: 123e4567-e89b-12d3-a456-426614174002
        - name: organizationId
          in: query
          description: Unique identifier for the organization
          schema:
            type: string
            format: uuid
            title: Organization ID
            example: 123e4567-e89b-12d3-a456-426614174003
        - name: userGroupId
          in: query
          description: Unique identifier for the user group
          schema:
            type: string
            format: uuid
            title: User Group ID
            example: 123e4567-e89b-12d3-a456-426614174004
        - name: userId
          in: query
          description: User id to filter by
          schema:
            type: string
            format: uuid
            title: User ID
            example: 123e4567-e89b-12d3-a456-426614174001
        - name: walletAddress
          in: query
          description: Wallet address to filter by
          schema:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
            title: Wallet Address
            example: '0x1234567890123456789012345678901234567890'
        - name: loyaltyRuleId
          in: query
          description: Loyalty rule id(s) to filter by, array or single id
          required: true
          schema:
            oneOf:
              - type: string
                format: uuid
              - type: array
                items:
                  type: string
                  format: uuid
            title: Loyalty Rule IDs
            example: >-
              loyaltyRuleId=123e4567-e89b-12d3-a456-426614174001&loyaltyRuleId=123e4567-e89b-12d3-a456-426614174002
        - name: startingAfter
          in: query
          description: Pagination cursor to start after a specific resource ID
          schema:
            type: string
            title: Starting After
            example: 123e4567-e89b-12d3-a456-426614174010
        - name: limit
          in: query
          description: Maximum number of records to return (max 1000)
          schema:
            default: 10
            type: number
            minimum: 1
            maximum: 1000
            title: Limit
            example: 50
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      title: ID
                      description: ID of the loyalty account streak, null if no streak yet
                      example: 123e4567-e89b-12d3-a456-426614174001
                    createdAt:
                      type: string
                      nullable: true
                      title: Created At
                      description: >-
                        Date and time the streak was created, null if no streak
                        yet
                      example: '2025-01-01T00:00:00.000Z'
                    updatedAt:
                      type: string
                      nullable: true
                      title: Updated At
                      description: >-
                        Date and time the streak was last updated, null if no
                        streak yet
                      example: '2025-01-01T00:00:00.000Z'
                    expiresAt:
                      type: string
                      nullable: true
                      title: Expires At
                      description: Date and time the streak expires, null if no streak yet
                      example: '2025-01-01T00:00:00.000Z'
                    streakCount:
                      type: number
                      title: Streak Count
                      description: Number of days in the streak, 0 if no streak
                      example: 10
                    userId:
                      type: string
                      format: uuid
                    loyaltyRuleId:
                      type: string
                      format: uuid
                    walletAddress:
                      type: string
                    milestone:
                      type: array
                      items:
                        type: object
                        properties:
                          streakMilestone:
                            type: number
                          streakAmount:
                            type: number
                        required:
                          - streakMilestone
                          - streakAmount
                  required:
                    - createdAt
                    - updatedAt
                    - expiresAt
                    - streakCount
                    - userId
                    - loyaltyRuleId
                    - walletAddress
                    - milestone
                  title: Get Loyalty Account Streaks Response Schema
                  description: >-
                    Response schema for getting loyalty account streaks, null if
                    no streak
                title: Get Loyalty Account Streaks Response Schema
                description: >-
                  Response schema for getting loyalty account streaks, null if
                  no streak
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Forbidden, Could not validate api key
                required:
                  - message
                title: Forbidden Response
                description: Schema for forbidden response
                example: Forbidden, Could not validate api key
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Not found
                required:
                  - message
                title: Not Found Response
                description: Schema for not found response
        '405':
          description: '405'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Method not allowed
                required:
                  - message
                title: Method Not Allowed Response
                description: Schema for method not allowed response
        '429':
          description: '429'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Too many requests
                required:
                  - message
                title: Too Many Request Response
                description: Schema for too many request response
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````