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

# Get loyalty program configuration

> Retrieves the shop's active loyalty campaign configuration: its tiers (ordered by starting points) and milestones (ordered by points needed). Returns NOT_FOUND when the shop has no active loyalty campaign.



## OpenAPI

````yaml /ingress-openapi.json get /sdk/studio/{shopId}/loyalty
openapi: 3.0.0
info:
  title: Stash API
  description: >-
    Set of APIs for integrating Stash functionality into games. API set includes
    authentication, payment processing, checkout links, user management, and
    various platform-specific integrations. The API supports both client-side
    and server-side implementations with appropriate security measures for each
    context.
  version: '1.0'
servers:
  - url: https://test-api.stash.gg
security: []
tags:
  - name: Catalog
    description: >-
      Server-side catalog endpoints for shops with a real-time catalog
      integration.
  - name: Launcher Payment
    description: Payment processing endpoints for Stash Launcher.
  - name: Subscription Checkout Links
    description: Checkout link generation for subscription purchases
  - name: Webshop Account Linking
    description: >-
      Authentication endpoints for integrating third-party login providers or
      custom login with Stash Webshops.
  - name: Payments
    description: Payment history and transaction management endpoints
  - name: Pricing
    description: Server-side pricing endpoints for fetching uploaded price sheet data
  - name: Stash Pay
    description: Server-side quick payment endpoints for internal use
  - name: Web Shop
    description: Server-side endpoints that control your web shop.
  - name: Subscription Plans
    description: Retrieve subscription plan details and pricing
  - name: Subscriptions
    description: Manage player subscriptions - retrieve, cancel, and reactivate
  - name: Server URLs
    description: Server-side URL generation endpoints for authenticated URLs
  - name: User Preferences
    description: User preferences management endpoints for payment channel preferences
  - name: Loyalty
    description: >-
      Endpoints for reading a shop's loyalty program and, for enabled shops,
      configuring it
  - name: Localization
    description: >-
      Endpoints for refreshing a shop's localizations from its localization
      source
  - name: Reports
    description: >-
      Endpoints for listing a shop's daily transaction files and downloading
      them through signed links
paths:
  /sdk/studio/{shopId}/loyalty:
    get:
      tags:
        - Loyalty
      summary: Get loyalty program configuration
      description: >-
        Retrieves the shop's active loyalty campaign configuration: its tiers
        (ordered by starting points) and milestones (ordered by points needed).
        Returns NOT_FOUND when the shop has no active loyalty campaign.
      operationId: GetLoyalty
      parameters:
        - name: shopId
          description: Shop identifier from Stash Studio
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/server.ingress.loyalty.v1.GetLoyaltyResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
      security:
        - hmac: []
components:
  schemas:
    server.ingress.loyalty.v1.GetLoyaltyResponse:
      type: object
      properties:
        activeCampaign:
          $ref: >-
            #/components/schemas/server.ingress.loyalty.v1.GetLoyaltyResponse.Campaign
      description: A shop's active loyalty campaign configuration
      title: Get Loyalty Response
      required:
        - activeCampaign
    google.rpc.Status:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/google.protobuf.Any'
    server.ingress.loyalty.v1.GetLoyaltyResponse.Campaign:
      type: object
      properties:
        campaignId:
          type: string
          description: Identifier of the loyalty campaign (season).
        tiers:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.ingress.loyalty.v1.GetLoyaltyResponse.Campaign.LoyaltyTier
          description: >-
            The campaign's tiers, ordered by starting points ascending; each
            tier lists its own milestones. May be empty.
      description: A loyalty campaign (season) with its tiers and milestones.
      title: Loyalty Campaign
      required:
        - campaignId
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    server.ingress.loyalty.v1.GetLoyaltyResponse.Campaign.LoyaltyTier:
      type: object
      properties:
        tierId:
          type: string
          description: Partner-facing tier identifier. Unique within the campaign.
        name:
          type: string
          description: Display name of the tier.
        startPoints:
          type: integer
          format: int64
          description: >-
            The points balance at which this tier begins. Tiers are returned
            ordered by this value ascending.
        pointsPerDollar:
          type: integer
          format: int64
          description: Loyalty points earned per US dollar of spend while in this tier.
        pointsMultiplierPermille:
          type: integer
          format: int64
          description: >-
            This tier's configured points-earning rate relative to the base
            (lowest) tier, expressed in permille; divide by 1000 (base tier =
            1000). The ratio of this tier's points-per-dollar to the base tier's
            points-per-dollar.
        iconUrl:
          type: string
          description: URL to the tier icon image. Omitted when no icon is configured.
        milestones:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.ingress.loyalty.v1.GetLoyaltyResponse.Campaign.LoyaltyTier.LoyaltyMilestone
          description: >-
            The milestones that belong to this tier, ordered by points needed
            ascending. May be empty.
      description: A tier in a shop's active loyalty campaign.
      title: Loyalty Tier
      required:
        - tierId
    server.ingress.loyalty.v1.GetLoyaltyResponse.Campaign.LoyaltyTier.LoyaltyMilestone:
      type: object
      properties:
        milestoneId:
          type: string
          description: Milestone identifier. Unique within the campaign.
        name:
          type: string
          description: Display name of the milestone.
        pointsNeeded:
          type: integer
          format: int64
          description: >-
            The points balance required to reach this milestone. Milestones are
            returned ordered by this value ascending.
        rewards:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.ingress.loyalty.v1.GetLoyaltyResponse.Campaign.LoyaltyTier.LoyaltyMilestone.MilestoneRewardItem
          description: >-
            All rewards granted at this milestone. Empty when no reward is
            configured.
      description: A milestone belonging to a tier in a shop's active loyalty campaign.
      title: Loyalty Milestone
      required:
        - milestoneId
    server.ingress.loyalty.v1.GetLoyaltyResponse.Campaign.LoyaltyTier.LoyaltyMilestone.MilestoneRewardItem:
      type: object
      properties:
        itemId:
          type: string
          description: >-
            Identifier of the reward: a shop bonus identifier for
            currency/points rewards, or the product's external identifier (SKU)
            for product rewards.
        quantity:
          type: integer
          format: int64
          description: Amount of the reward granted.
        type:
          $ref: '#/components/schemas/server.ingress.loyalty.v1.LoyaltyRewardType'
      description: A single reward granted when a loyalty milestone is reached.
      title: Loyalty Milestone Reward Item
    server.ingress.loyalty.v1.LoyaltyRewardType:
      type: string
      enum:
        - LOYALTY_REWARD_TYPE_UNSPECIFIED
        - LOYALTY_REWARD_TYPE_IN_GAME_CURRENCY
        - LOYALTY_REWARD_TYPE_LOYALTY_CURRENCY
        - LOYALTY_REWARD_TYPE_LOYALTY_POINTS
        - LOYALTY_REWARD_TYPE_SKU_ITEM
      default: LOYALTY_REWARD_TYPE_UNSPECIFIED
      description: The kind of reward granted at a loyalty milestone.
  securitySchemes:
    hmac:
      type: apiKey
      description: >-
        Versioned HMAC-SHA256 signature authenticating server-to-server SDK
        requests (your backend calling Stash), as opposed to client-side SDK
        operations. Recommended over the deprecated X-Stash-Api-Key for the best
        security. Header format:
        v1;{appId};{unixMillisTimestamp};{base64Signature}
        (semicolon-delimited). {base64Signature} is the base64-encoded
        HMAC-SHA256 of the string {unixMillisTimestamp}.{requestBody} using your
        app ingress secret (the ingress secret is shown base64-encoded in
        Studio; base64-decode it to the raw bytes used as the HMAC key), where
        {requestBody} is the request body exactly as you send it for POST and
        PUT requests (the compact canonical request JSON is also accepted) and
        empty for GET requests. A signature over the exact bytes verifies for
        bodies of up to 18 KiB (18,432 bytes); a larger body may be refused with
        401 even when correctly signed. The timestamp must be within 5 minutes
        of Stash server time. Your appId is your immutable app identifier, shown
        in Stash Studio under Project Settings > App details; your ingress
        secret is under Project Settings > API Secrets.
      name: x-stash-hmac-signature
      in: header

````

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