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

# Get loyalty program details

> Retrieve a loyalty program's configuration including tiers, points rules, and enrollment URL.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/loyalty/programs/{id}/
openapi: 3.0.3
info:
  title: Zupy API v2
  version: 2.0.0
  description: >-
    Zupy API v2 — versioned, gateway-aware API with envelope responses, RFC 7807
    errors, and multi-auth support (JWT, API Key, Device Key).
servers:
  - url: https://api.zupy.com
    description: Production
security: []
tags:
  - name: Authentication
    description: OTP request and verification endpoints
  - name: Customers
    description: Customer management, points, history, and data operations
  - name: Loyalty Programs
    description: Loyalty program configuration and details
  - name: Rewards
    description: Loyalty reward catalog (definitions redeemed with points)
  - name: Companies
    description: Company information and loyalty configuration
  - name: Coupons
    description: >-
      Issued coupons (RewardRedemption) — both loyalty-reward redemptions and
      marketing claims
  - name: Wallet
    description: Apple Wallet pass generation and notifications
  - name: Webhooks
    description: Partner integration webhook endpoints
  - name: Webhook Management
    description: Configure and test outbound webhook delivery
paths:
  /api/v2/loyalty/programs/{id}/:
    get:
      tags:
        - Loyalty Programs
      summary: Get loyalty program details
      description: >-
        Retrieve a loyalty program's configuration including tiers, points
        rules, and enrollment URL.
      operationId: loyalty_programs_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: string
          description: Unique identifier for this loyalty program.
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoyaltyProgram'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
      security:
        - apiKeyAuth: []
components:
  schemas:
    LoyaltyProgram:
      type: object
      description: >-
        Loyalty program details including configuration, rewards catalog, and
        customer statistics.
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
          title: Nome
        slug:
          type: string
          readOnly: true
          description: >-
            Used in public URL (e.g., zupy.com/@slug). Only superusers can
            modify.
          pattern: ^[-a-zA-Z0-9_]+$
        enrollment_url:
          type: string
          format: uri
          nullable: true
          description: Public enrollment URL for this loyalty program
          readOnly: true
        description:
          type: string
          readOnly: true
        company_id:
          type: string
          readOnly: true
        points_name:
          type: string
          readOnly: true
          description: Custom name for points in this program (e.g., Stars, Coins).
        point_expiration_days:
          type: integer
          readOnly: true
          title: Point Expiration (Days)
          description: Number of days before points expire. 0 means never.
        points_per_currency:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          readOnly: true
          title: Points per Currency Unit
          description: How many points are earned per currency unit spent.
        minimum_points_redemption:
          type: integer
          readOnly: true
          title: Minimum Points for Redemption
          description: Minimum points required for any redemption.
        is_public:
          type: boolean
          readOnly: true
          title: Public Program
          description: If enabled, this program will be visible in the public directory.
        tiers_enabled:
          type: boolean
          readOnly: true
          description: >-
            If enabled, this program will use the tier system with
            Bronze/Silver/Gold tiers. If disabled, all users will use the
            default tier.
        tier_definitions:
          type: string
          readOnly: true
        welcome_campaign_id:
          type: string
          readOnly: true
          nullable: true
          description: >-
            ID of the welcome campaign that fires on enrollment (null if no
            campaign attached). Replaces the legacy welcome_points_bonus /
            welcome_reward_type fields — point awards and gifts are now
            configured via the campaign object.
        how_it_works:
          type: string
          readOnly: true
          description: >-
            Custom 'Como Funciona' wallet-card text override. Empty string means
            use the FE-derived default ("A cada R$X você ganha N pontos…").
        status:
          type: string
          readOnly: true
          enum:
            - draft
            - published
            - archived
          description: >-
            Per-program lifecycle status. Distinct from is_active (which is the
            legacy boolean kept for backwards compat).
        profile_completion_enabled:
          type: boolean
          readOnly: true
          title: Ativar Incentivo de Perfil Completo
          description: >-
            When enabled, users receive points upon completing 100% of their
            profile
        profile_completion_points:
          type: integer
          readOnly: true
          title: Pontos ao Completar Perfil
          description: >-
            Number of points the user receives upon completing 100% of their
            profile
        email:
          type: string
          format: email
          readOnly: true
          title: E-mail
        logo_url:
          type: string
          readOnly: true
          nullable: true
        rewards_count:
          type: integer
          readOnly: true
        active_customers_count:
          type: integer
          readOnly: true
        is_active:
          type: boolean
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - active_customers_count
        - company_id
        - created_at
        - description
        - email
        - enrollment_url
        - id
        - is_active
        - is_public
        - logo_url
        - minimum_points_redemption
        - name
        - point_expiration_days
        - points_name
        - points_per_currency
        - profile_completion_enabled
        - profile_completion_points
        - rewards_count
        - slug
        - status
        - tier_definitions
        - tiers_enabled
        - updated_at
    Error:
      type: object
      description: RFC 7807 Problem Details error response.
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
      required:
        - detail
        - instance
        - status
        - title
        - type
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Per-company partner API key (zupy_pk_…). Validated by Zupy against the
        company integration key hash (Story 14.x); send it on every request as
        the X-API-Key header. Scoped read-write to the owning company's data.

````