> ## 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.

# Redeem customer loyalty points



## OpenAPI

````yaml /loyalty/storefront-api-swagger.json post /loyalty/cp/api/redeem-points
openapi: 3.0.1
info:
  description: ''
  title: Storefront APIs
  version: 0.0.1
servers:
  - url: https://loyalty-admin.appstle.com
security: []
tags:
  - description: >-
      Storefront APIs for the signed-in customer to enroll, enable the loyalty
      program, view their loyalty profile, sync metafields, and update profile
      attributes.
    name: Customer Enrollment & Profile
  - description: >-
      Storefront APIs for the signed-in customer to view point transactions,
      claim social-media reward points, and record store visits.
    name: Points & Earn Rules
  - description: >-
      Storefront APIs for the signed-in customer to redeem loyalty points for
      rewards or discount codes.
    name: Redemptions & Discount Codes
  - description: >-
      Storefront APIs for managing the signed-in customer's referral activity:
      generating referral URLs, sending invites, viewing referral history, and
      accepting referral offers.
    name: Referrals
  - description: >-
      Storefront APIs for the signed-in customer to submit product reviews and
      retrieve existing reviews for a product.
    name: Reviews
  - description: >-
      Storefront APIs for retrieving product and collection data, proxied
      through the Shopify Storefront API for loyalty widgets.
    name: Product Catalog
paths:
  /loyalty/cp/api/redeem-points:
    post:
      tags:
        - Redemptions & Discount Codes
      summary: Redeem customer loyalty points
      operationId: redeemPoints
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerLoyaltyRequestVM'
      responses:
        '200':
          content:
            application/json:
              example:
                availablePoints: 150
                creditedPoints: 500
                currentVipTier: Gold
                pendingPoints: 25
                rewards:
                  - createAt: '2025-01-29T10:30:00Z'
                    discountCode: LOYALTY15OFF
                    discountType: PERCENTAGE
                    discountValue: 15
                    expiryDate: '2025-06-30T23:59:59Z'
                    id: 12346
                    pointsRedeemed: 100
                    status: UNUSED
              schema:
                $ref: '#/components/schemas/CustomerLoyaltyResponseVM'
          description: >-
            Points redeemed successfully, returns updated customer loyalty
            information with new reward
        '400':
          content:
            application/json:
              schema:
                example:
                  availablePoints: 50
                  error: Insufficient points
                  requiredPoints: 100
                type: string
          description: Invalid redemption request or insufficient points
        '401':
          content:
            application/json:
              schema:
                example:
                  error: Authentication required
                type: string
          description: Customer not authenticated - JWT token missing or invalid
components:
  schemas:
    CustomerLoyaltyRequestVM:
      description: >-
        Point redemption request details including redeem rule ID, points to
        redeem, and optional variant ID for product rewards
      example:
        customerId: 67890
        points: 100
        redeemRuleId: 5
        variantId: 12345678
      properties:
        customerEmail:
          description: >
            Customer's email address. Alternative to customerId for identifying
            the customer.

            Provide either customerId OR customerEmail, not both.

            Must be a valid email address that exists in your Shopify store.

            Example: customer@example.com
          example: customer@example.com
          nullable: true
          type: string
        customerId:
          description: >
            Shopify customer ID (numeric). Identifies which customer is
            redeeming points.

            Provide either customerId OR customerEmail, not both.

            Example: 67890
          example: 67890
          format: int64
          nullable: true
          type: integer
        points:
          description: >
            Number of points to redeem. Must be positive.

            If not provided, uses the default points value from the redemption
            rule.

            Customer must have at least this many available points.

            Example: 100.0
          example: 100
          format: double
          nullable: true
          type: number
        redeemRuleId:
          description: >
            ID of the redemption rule to use. Determines what reward the
            customer receives.

            Use GET /api/external/point-redeem-rules to get available redemption
            options.

            Must be an active redemption rule configured in your loyalty
            program.

            Example: 5
          example: 5
          format: int64
          type: integer
        variantId:
          description: >
            Shopify product variant ID. Required when redeeming for
            product-specific rewards (free product).

            Not required for discount codes or store credit rewards.

            Must be a valid variant ID from your Shopify catalog.

            Example: 12345678
          example: 12345678
          format: int64
          nullable: true
          type: integer
      required:
        - redeemRuleId
      type: object
    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

````