> ## 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 available ways to earn loyalty points

> Returns all active point earning campaigns and rules that the customer can participate in. This shows customers how they can earn more points.

**Common Earning Methods:**
- Points per dollar spent on purchases
- Bonus points for first subscription
- Points for referring friends
- Birthday bonus points
- Social media follows (Instagram, Facebook, Twitter)
- Product reviews
- Account creation bonus

**Response includes:**
- Campaign name and description
- Points awarded
- Action required (e.g., 'Follow on Instagram')
- Icon/image URL
- Terms and conditions

**Use Cases:**
- Display 'Ways to Earn' section in customer portal
- Show earning opportunities on product pages
- Encourage customer engagement

**Authentication:** Customer must be logged in via Shopify customer session



## OpenAPI

````yaml /subscription/storefront-api-swagger.json get /subscriptions/cp/api/loyalty-integration/earn-options
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for the customer-facing subscription portal.
    These APIs enable customers to manage their subscriptions, update billing
    information, modify delivery schedules, and access their account details
    through your storefront.


    **Important**: These APIs must be called from your shop's domain (e.g.,
    https://www.myshop.com/apps/subscriptions/cp/api/**) and require customer
    authentication. Unauthenticated requests will return a 401 Unauthorized
    error.
  title: Storefront APIs
  version: 0.0.1
servers:
  - url: https://www.myshop.com/apps
security: []
tags:
  - description: >-
      Core customer portal APIs for managing customer account settings,
      authentication, and portal configurations.
    name: Customer Portal
  - description: >-
      APIs for customers to view and manage their subscription contracts
      including status updates, frequency changes, and cancellations.
    name: Subscription Management
  - description: >-
      APIs for retrieving and updating subscription contract details — delivery
      schedules, line items, addresses, billing cycles.
    name: Subscription Contracts
  - description: >-
      APIs for retrieving available subscription plans and selling plan
      configurations exposed to customers.
    name: Subscription Plans
  - description: >-
      APIs for managing one-time add-on products that can be purchased alongside
      recurring subscription items.
    name: Subscription One-Time Products
  - description: >-
      APIs for retrieving aggregated subscription data and account-level
      subscription information for the signed-in customer.
    name: Subscription Data
  - description: >-
      APIs for managing customizable product boxes and bundles where customers
      can select multiple items.
    name: Build-a-Box & Bundles
  - description: >-
      APIs for managing payment methods, billing information, and processing
      subscription payments.
    name: Billing & Payments
  - description: >-
      APIs for retrieving product information, selling plans, variant data, and
      subscription-enabled products available to customers.
    name: Product Catalog
  - description: >-
      APIs for managing delivery schedules, shipping addresses, delivery
      methods, and tracking order status.
    name: Delivery & Shipping
  - description: >-
      APIs for handling subscription cancellations, retention activities, and
      customer feedback management.
    name: Customer Retention
  - description: >-
      APIs for integrating loyalty programs with subscriptions including points
      redemption and earning options.
    name: Loyalty Integration
  - description: >-
      APIs for accessing portal customization settings, translations, and theme
      configurations.
    name: Customization
  - description: >-
      APIs for retrieving promotional campaigns shown in the customer portal,
      tracking banner engagement, and redeeming campaign offers.
    name: Campaigns
  - description: >-
      APIs for local pickup and click-and-collect — listing pickup locations and
      resolving eligible pickup dates and time slots.
    name: Store Pickup
paths:
  /subscriptions/cp/api/loyalty-integration/earn-options:
    get:
      tags:
        - Loyalty Integration
      summary: Get available ways to earn loyalty points
      description: >-
        Returns all active point earning campaigns and rules that the customer
        can participate in. This shows customers how they can earn more points.


        **Common Earning Methods:**

        - Points per dollar spent on purchases

        - Bonus points for first subscription

        - Points for referring friends

        - Birthday bonus points

        - Social media follows (Instagram, Facebook, Twitter)

        - Product reviews

        - Account creation bonus


        **Response includes:**

        - Campaign name and description

        - Points awarded

        - Action required (e.g., 'Follow on Instagram')

        - Icon/image URL

        - Terms and conditions


        **Use Cases:**

        - Display 'Ways to Earn' section in customer portal

        - Show earning opportunities on product pages

        - Encourage customer engagement


        **Authentication:** Customer must be logged in via Shopify customer
        session
      operationId: getEarnOptions
      parameters:
        - description: Customer ID (optional, auto-detected from session)
          in: query
          name: customerId
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                - action: Make a purchase
                  description: Earn 5 points for every $1 spent
                  name: Purchase Rewards
                  pointsAmount: 5
                - action: Share referral link
                  description: Earn 500 points when your friend makes their first purchase
                  name: Refer a Friend
                  pointsAmount: 500
          description: Earning options retrieved successfully
        '401':
          content:
            '*/*':
              schema:
                items:
                  $ref: '#/components/schemas/LoyaltyPointEarnCampaign'
                type: array
          description: Customer not logged in
components:
  schemas:
    LoyaltyPointEarnCampaign:
      properties:
        basePoints:
          format: int32
          type: integer
        createAt:
          format: date-time
          type: string
        details:
          type: string
        id:
          format: int64
          type: integer
        name:
          type: string
        productData:
          type: string
        reward_text:
          type: string
        type:
          type: string
        updateAt:
          format: date-time
          type: string
      type: object

````