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

# Get customer loyalty details



## OpenAPI

````yaml /loyalty/admin-api-swagger.json get /api/external/customer-loyalty
openapi: 3.0.1
info:
  description: ''
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://loyalty-admin.appstle.com
security: []
tags:
  - description: >-
      Admin APIs for enrolling customers into the loyalty program, retrieving
      customer loyalty details, and updating profile information such as birth
      date.
    name: Customer Enrollment & Profile
  - description: >-
      Admin APIs for managing customer point balances, transaction history,
      point earning rules, top customers leaderboard, and approving pending
      transactions.
    name: Points & Earn Rules
  - description: >-
      Admin APIs for redeeming customer points, managing redemption rules, and
      validating or updating discount codes generated through loyalty
      redemptions.
    name: Redemptions & Discount Codes
  - description: >-
      Admin APIs for retrieving storefront widget label translations consumed by
      the loyalty widget on the merchant's storefront.
    name: Storefront Widgets & Labels
paths:
  /api/external/customer-loyalty:
    get:
      tags:
        - Customer Enrollment & Profile
      summary: Get customer loyalty details
      operationId: externalGetCustomerLoyalty
      parameters:
        - description: API key for authentication
          in: header
          name: X-API-Key
          required: true
          schema:
            type: string
        - description: Shopify customer ID (optional if customerEmail provided)
          in: query
          name: customerId
          required: false
          schema:
            format: int64
            type: integer
        - description: Customer email address (optional if customerId provided)
          in: query
          name: customerEmail
          required: false
          schema:
            type: string
        - description: 'Filter rewards by status (comma-separated: ACTIVE, USED, UNUSED)'
          in: query
          name: status
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                achievableTierId: 2
                availablePoints: 250
                createAt: '2024-01-15T10:00:00Z'
                creditedPoints: 500
                currentVipTier: Gold
                customerStatus: ACTIVE
                dob: '1990-05-15'
                pendingPoints: 50
                referralLink: https://yourstore.com/r/abc123
                referredCompleted: 3
                rewardedForCreatingAccount: true
                rewardedForFacebook: true
                rewardedForInstagram: false
                rewardedForNewsLetter: true
                rewardedForPinterest: false
                rewardedForSharingOnFacebook: false
                rewardedForSharingOnX: false
                rewardedForSms: false
                rewardedForTiktok: false
                rewardedForTwitter: false
                rewardedForYoutube: false
                rewards:
                  - discountCode: LOYALTY10OFF
                    discountType: PERCENTAGE
                    discountValue: 10
                    expiryDate: '2025-06-30T23:59:59Z'
                    id: 12345
                    pointsRedeemed: 100
                    status: UNUSED
                spentAmount: 1250.99
                storeCreditBalance: 25
                vipTierExpiredAt: '2025-12-31T23:59:59Z'
              schema:
                $ref: '#/components/schemas/CustomerLoyaltyResponseVM'
          description: Successfully retrieved customer loyalty details
        '400':
          content:
            application/json:
              schema:
                example:
                  error: Either customerId or customerEmail is required
                type: string
          description: >-
            Bad request - Neither customerId nor customerEmail provided, or
            invalid status parameter
        '401':
          content:
            application/json:
              schema:
                example:
                  error: Invalid API key
                type: string
          description: Unauthorized - Invalid or missing X-API-Key
        '404':
          content:
            application/json:
              schema:
                example:
                  error: Customer not found
                type: string
          description: >-
            Customer not found - No customer exists with the provided ID or
            email
      security:
        - X-API-Key: []
components:
  schemas:
    CustomerLoyaltyResponseVM:
      properties:
        achievableTierId:
          format: int64
          type: integer
        availablePoints:
          format: double
          type: number
        createAt:
          format: date-time
          type: string
        creditedPoints:
          format: double
          type: number
        currentVipTier:
          type: string
        customerStatus:
          enum:
            - ACTIVE
            - INACTIVE
            - EXCLUDED
            - EXCLUDED_BY_CUSTOMER
          type: string
        dob:
          format: date
          type: string
        expiringPointsAmount:
          format: double
          type: number
        pendingPoints:
          format: double
          type: number
        pointsExpireAt:
          format: date-time
          type: string
        referralLink:
          type: string
        referredCompleted:
          format: int64
          type: integer
        rewardedForCreatingAccount:
          type: boolean
        rewardedForFacebook:
          type: boolean
        rewardedForInstagram:
          type: boolean
        rewardedForNewsLetter:
          type: boolean
        rewardedForPinterest:
          type: boolean
        rewardedForSharingOnFacebook:
          type: boolean
        rewardedForSharingOnX:
          type: boolean
        rewardedForSms:
          type: boolean
        rewardedForTiktok:
          type: boolean
        rewardedForTwitter:
          type: boolean
        rewardedForYoutube:
          type: boolean
        rewards:
          items:
            $ref: '#/components/schemas/CustomerReward'
          type: array
        spentAmount:
          format: double
          type: number
        storeCreditBalance:
          format: double
          type: number
        storeCreditCurrency:
          type: string
        vipTierExpiredAt:
          format: date-time
          type: string
      type: object
    CustomerReward:
      properties:
        amount:
          format: double
          type: number
        createAt:
          format: date-time
          type: string
        customerId:
          format: int64
          type: integer
        description:
          type: string
        discountCode:
          type: string
        discountCodeId:
          type: string
        expireDate:
          format: date-time
          type: string
        id:
          format: int64
          type: integer
        lastExpiryReminderSentDate:
          format: date-time
          type: string
        orderId:
          format: int64
          type: integer
        orderName:
          type: string
        pointRedeemRuleId:
          format: int64
          type: integer
        pointTransactionId:
          format: int64
          type: integer
        productData:
          type: string
        rewardType:
          enum:
            - STORE_CREDIT
            - DISCOUNT_CODE
            - POINTS
          type: string
        shop:
          type: string
        status:
          enum:
            - USED
            - UNUSED
            - REFUNDED
            - EXPIRED
            - SUBSCRIPTION_ACTIVE
            - CANCELED
          type: string
        usageCount:
          format: int64
          type: integer
        usedAt:
          format: date-time
          type: string
        variantId:
          format: int64
          type: integer
      required:
        - createAt
        - customerId
        - discountCode
        - shop
        - status
      type: object

````