Skip to content

Customer Portal APIs (0.0.1)

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.

Languages
Servers
https://www.myshop.com/apps

Customer Portal

Core customer portal APIs for managing customer account settings, authentication, and portal configurations.

Operations

Get available loyalty point redemption options

Request

Returns all available rewards that the customer can redeem their loyalty points for. This shows customers what they can spend their points on.

Common Redemption Options:

  • Discount codes (e.g., $5 off for 500 points)
  • Percentage discounts (e.g., 10% off for 1000 points)
  • Free shipping rewards
  • Free products or samples
  • Exclusive access to sales

Response includes:

  • Redemption option ID
  • Name and description
  • Points cost
  • Reward value (dollar amount or percentage)
  • Availability (minimum purchase, restrictions)
  • Whether customer has enough points

Filtering:

  • Only shows active redemption options
  • Filters based on customer's tier/VIP level
  • Shows whether customer has sufficient points

Use Cases:

  • Display 'Redeem Points' section in customer portal
  • Show available rewards in checkout
  • Encourage customers to save points for bigger rewards

Authentication: Customer must be logged in via Shopify customer session

curl -i -X GET \
  https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem-options

Responses

Redemption options retrieved successfully

Bodyapplication/json
Response
application/json
[ { "id": 1, "name": "$5 Off Coupon", "description": "Get $5 off your next order", "pointsCost": 500, "rewardValue": 5, "rewardType": "FIXED_AMOUNT", "canRedeem": true }, { "id": 2, "name": "15% Off Entire Order", "description": "Get 15% off your entire order", "pointsCost": 1500, "rewardValue": 15, "rewardType": "PERCENTAGE", "canRedeem": true } ]

Get customer loyalty points and rewards data

Request

Retrieves the loyalty/rewards program data for the currently logged-in customer. This includes points balance, tier status, and available rewards.

Supported Loyalty Programs:

  • Appstle Loyalty & Rewards
  • Yotpo Loyalty & Referrals
  • Smile.io (via Appstle integration)

What you get:

  • Current points balance
  • Points pending (from recent orders)
  • VIP tier/level
  • Points history
  • Available reward redemptions

Use Cases:

  • Display points balance in customer portal
  • Show available rewards customer can redeem
  • Display VIP tier badge
  • Show points expiration dates

Authentication: Customer must be logged in via Shopify customer session

Note: Requires loyalty app integration to be configured in merchant settings

curl -i -X GET \
  https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/customer

Responses

Loyalty data retrieved successfully

Bodyapplication/json
Response
application/json
{ "pointsBalance": 1250, "pointsPending": 150, "tierName": "Gold", "pointsToNextTier": 250, "customerEmail": "customer@example.com" }

Get currently logged-in customer ID

Request

Returns the customer ID of the currently authenticated customer from their Shopify session. This endpoint is used by the customer portal UI to identify which customer is logged in.

Use Cases:

  • Customer portal initialization - determine who's logged in
  • Fetch customer-specific data (subscriptions, orders, settings)
  • Validate customer session before displaying sensitive information
  • Personalize customer portal UI with customer name/email

How it works:

  • Customer must be logged in to their Shopify customer account
  • Session is validated via Shopify App Proxy
  • Returns Shopify customer ID (numeric)

Important Notes:

  • This endpoint only works when called from the shop domain (via Shopify App Proxy)
  • Customer must be logged in to Shopify
  • Returns null if customer is not authenticated
  • Do not use this for external API integrations - use External APIs with explicit customer ID instead

Authentication: Requires active Shopify customer session (browser-based)

curl -i -X GET \
  https://www.myshop.com/apps/subscriptions/cp/api/logged-in-customer

Responses

Customer ID retrieved successfully

Bodyapplication/json
integer(int64)
Response
application/json
6548267876558

Subscription Management

APIs for customers to view and manage their subscription contracts including status updates, frequency changes, and cancellations.

Operations

Billing & Payments

APIs for managing payment methods, billing information, and processing subscription payments.

Operations

Product Catalog

APIs for retrieving product information, selling plans, variant data, and subscription-enabled products available to customers.

Operations

Delivery & Shipping

APIs for managing delivery schedules, shipping addresses, delivery methods, and tracking order status.

Customer Retention

APIs for handling subscription cancellations, retention activities, and customer feedback management.

Loyalty Integration

APIs for integrating loyalty programs with subscriptions including points redemption and earning options.

Customization

APIs for accessing portal customization settings, translations, and theme configurations.