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

# List Loyalty Program Rules

> Read point, price, bundle, and deal rules for a program you own.

Returns name, description, active, provider, and store ids only. Ratios, product targets, and prices are not included. Bundle rules are the discount rules.

**Query parameters**:
- `type`: optional filter, one of `point`, `price`, `bundle`, `deal`. An unknown value returns 400.

**Scopes**: `ld_*` keys need `loyalty:read`. JWT app keys and legacy tokens are unchanged.

**Status codes**:
- 200: rule rows for this program
- 400: `type` is not one of the four values
- 404: program not found, or it belongs to another merchant



## OpenAPI

````yaml /openapi.public.json get /v2/loyalty/programs/{programId}/rules
openapi: 3.1.0
info:
  title: LoyaltyDog Public API
  description: >-
    Merchant-product REST API. Authenticate with Authorization: Bearer. This is
    the frozen public schema (not the full dashboard/admin OpenAPI).
  termsOfService: https://loyalty.dog/loyalty-program-terms-service
  contact:
    name: LoyaltyDog Support
    url: https://loyalty.dog/contact-us
    email: support@loyalty.dog
  version: 1.0.2
servers:
  - url: https://api.loyalty.dog
    description: Production
security:
  - bearerAuth: []
paths:
  /v2/loyalty/programs/{programId}/rules:
    get:
      tags:
        - Loyalty
      summary: List Loyalty Program Rules
      description: >-
        Read point, price, bundle, and deal rules for a program you own.


        Returns name, description, active, provider, and store ids only. Ratios,
        product targets, and prices are not included. Bundle rules are the
        discount rules.


        **Query parameters**:

        - `type`: optional filter, one of `point`, `price`, `bundle`, `deal`. An
        unknown value returns 400.


        **Scopes**: `ld_*` keys need `loyalty:read`. JWT app keys and legacy
        tokens are unchanged.


        **Status codes**:

        - 200: rule rows for this program

        - 400: `type` is not one of the four values

        - 404: program not found, or it belongs to another merchant
      operationId: list_loyalty_program_rules_v2_loyalty_programs__programId__rules_get
      parameters:
        - name: programId
          in: path
          required: true
          schema:
            anyOf:
              - $ref: '#/components/schemas/PydanticObjectId'
              - type: string
            title: Programid
        - name: type
          in: query
          required: false
          description: Return only this rule type.
          schema:
            anyOf:
              - type: string
                enum:
                  - point
                  - price
                  - bundle
                  - deal
              - type: 'null'
            title: Type
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PublicRuleRead'
        '400':
          description: Invalid type filter
        '404':
          description: Program not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    PublicRuleRead:
      type: object
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          enum:
            - point
            - price
            - bundle
            - deal
          title: Type
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        active:
          type: boolean
          title: Active
        provider:
          type: string
          title: Provider
        stores:
          type: array
          items:
            $ref: '#/components/schemas/PublicRuleStore'
          title: Stores
      required:
        - id
        - type
        - active
        - provider
      title: PublicRuleRead
      description: >-
        Public catalog row. Names and store ids only. No ratios or product
        targets.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicRuleStore:
      type: object
      properties:
        shopId:
          type: string
          title: Shopid
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
      required:
        - shopId
      title: PublicRuleStore
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token obtained from POST /v2/token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.