> ## 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 a player's loyalty standing

> Retrieves a single player's loyalty standing (points balance, current tier, distance to the next tier and milestone, and effective points multiplier) for the shop's active loyalty campaign. Returns NOT_FOUND when the shop has no active loyalty campaign.



## OpenAPI

````yaml /ingress-openapi.json get /sdk/studio/{shopId}/loyalty/players/{playerId}
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/players/{playerId}:
    get:
      tags:
        - Loyalty
      summary: Get a player's loyalty standing
      description: >-
        Retrieves a single player's loyalty standing (points balance, current
        tier, distance to the next tier and milestone, and effective points
        multiplier) for the shop's active loyalty campaign. Returns NOT_FOUND
        when the shop has no active loyalty campaign.
      operationId: GetPlayerLoyalty
      parameters:
        - name: shopId
          description: Shop identifier from Stash Studio
          in: path
          required: true
          schema:
            type: string
        - name: playerId
          description: The player whose loyalty standing to retrieve
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/server.ingress.loyalty.v1.GetPlayerLoyaltyResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
      security:
        - hmac: []
components:
  schemas:
    server.ingress.loyalty.v1.GetPlayerLoyaltyResponse:
      type: object
      properties:
        loyalty:
          $ref: >-
            #/components/schemas/server.ingress.loyalty.v1.GetPlayerLoyaltyResponse.PlayerLoyaltyState
      description: A single player's loyalty standing
      title: Get Player Loyalty Response
      required:
        - loyalty
    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.GetPlayerLoyaltyResponse.PlayerLoyaltyState:
      type: object
      properties:
        campaignId:
          type: string
          description: >-
            Identifier of the live loyalty campaign (season) this snapshot is
            scoped to.
        totalPoints:
          type: integer
          format: int64
          description: The player's loyalty points balance for this campaign.
        pointsDelta:
          type: integer
          format: int32
          description: >-
            Signed change in the loyalty points balance caused by the associated
            event; negative on a refund reversal, zero when the balance did not
            change.
        currentTierId:
          type: string
          description: >-
            The player's current tier, as the partner-facing tier identifier.
            Omitted when no tier matches the balance.
        previousTierId:
          type: string
          description: >-
            The player's prior tier, set only when the associated event changed
            the tier. Omitted when the tier did not change.
        pointsToNextTier:
          type: integer
          format: int64
          description: >-
            Loyalty points still needed to reach the next tier. Omitted when the
            player is already at the top tier.
        pointsToNextMilestone:
          type: integer
          format: int64
          description: >-
            Loyalty points still needed to reach the next unreached milestone.
            Omitted when there is no further milestone.
        nextMilestone:
          $ref: >-
            #/components/schemas/server.ingress.loyalty.v1.GetPlayerLoyaltyResponse.PlayerLoyaltyState.Milestone
        pointsMultiplierPermille:
          type: integer
          format: int64
          description: >-
            The effective (applied) points-earning multiplier for the player's
            current loyalty tier, relative to the base (lowest) tier, expressed
            in permille; divide by 1000 (1500 = 1.5x; base tier = 1000). Exact
            per-tier rates are available in the tier configuration.
      description: >-
        A player's standing in a shop's active loyalty campaign at a point in
        time.
      title: Player Loyalty State
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    server.ingress.loyalty.v1.GetPlayerLoyaltyResponse.PlayerLoyaltyState.Milestone:
      type: object
      properties:
        milestoneId:
          type: string
          description: >-
            Identifier of the milestone; the same identifier reported as
            milestoneId on the loyalty milestone claimed event and by the
            loyalty read API.
        rewards:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.ingress.loyalty.v1.GetPlayerLoyaltyResponse.PlayerLoyaltyState.MilestoneRewardItem
          description: All rewards granted when this milestone is reached.
      description: >-
        The next loyalty milestone a player is progressing toward and the
        rewards it grants.
      title: Player Next Milestone
    server.ingress.loyalty.v1.GetPlayerLoyaltyResponse.PlayerLoyaltyState.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: Player 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.