Get detailed subscription information for a customer
Retrieves comprehensive subscription contract details for a specific customer, including subscription status, products, billing information, delivery schedules, and more. This endpoint returns full subscription objects with all associated data, making it ideal for displaying subscription management interfaces and detailed analytics.
Full behavior, validation rules, and side effects
What This Endpoint Returns: Unlike the contract IDs endpoint which returns only numeric IDs, this endpoint provides complete SubscriptionContractDetailsDTO objects for each of the customer’s subscriptions. Each object contains all information needed to display and manage a subscription.
Data Included in Response:
Subscription Identity:
- Subscription contract ID (Shopify numeric ID)
- Subscription GraphQL ID (Shopify GID format)
- Internal Appstle database ID
- Contract creation date
Subscription Status & Lifecycle:
- Current status (ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED)
- Status reason (why paused/cancelled)
- Next billing date and time
- Contract anchor date
- Cancellation date (if applicable)
- Current billing cycle number
- Min/max cycle limits
Billing Configuration:
- Billing interval (WEEK, MONTH, YEAR)
- Billing interval count (e.g., every 2 weeks)
- Billing policy (pricing details)
- Currency code
- Recurring total price
- Applied discounts and pricing policies
Delivery Configuration:
- Delivery interval (WEEK, MONTH, YEAR)
- Delivery interval count
- Delivery method (SHIPPING, PICK_UP, LOCAL_DELIVERY)
- Delivery policy details
- Delivery price
Products & Line Items:
- All subscribed products and variants
- Product titles, SKUs, and images
- Quantities per product
- Individual line item prices
- Product-specific discounts
- Line item attributes and custom fields
Customer Information:
- Customer ID and GraphQL ID
- Customer name and email
- Customer acceptance status
Address Details:
- Billing address (full address object)
- Shipping address (full address object)
- Address validation status
Payment Information:
- Payment instrument type
- Payment method details (card last 4, etc.)
- Payment gateway used
Order & Fulfillment:
- Last order ID and details
- Last order date
- Order note
- Fulfillment status
Additional Metadata:
- Custom note attributes
- Tags and labels
- Internal flags and settings
- Selling plan ID and group ID
- Shop domain
Use Cases:
1. Customer Portal:
- Display all subscriptions on customer dashboard
- Show subscription details page
- Enable subscription management actions
- Display upcoming order information
2. Admin Dashboard:
- View customer’s complete subscription portfolio
- Analyze subscription health and status
- Identify at-risk or high-value subscriptions
- Generate customer subscription reports
3. Customer Support:
- Quick access to all customer subscription details
- Troubleshoot billing or delivery issues
- Verify subscription configurations
- Assist with subscription modifications
4. Analytics & Reporting:
- Calculate customer lifetime value
- Analyze subscription mix per customer
- Track subscription frequency distribution
- Identify cross-sell/upsell opportunities
5. Integration & Automation:
- Sync subscription data to CRM/analytics platforms
- Trigger workflows based on subscription details
- Build custom reporting dashboards
- Export subscription data for analysis
Response Format:
Returns an array of SubscriptionContractDetailsDTO objects:
[
{
"id": 789,
"subscriptionContractId": 5234567890,
"status": "ACTIVE",
"nextBillingDate": "2024-03-15T00:00:00Z",
"billingInterval": "MONTH",
"billingIntervalCount": 1,
"deliveryInterval": "MONTH",
"deliveryIntervalCount": 1,
"currencyCode": "USD",
"currentTotalPrice": "49.99",
"customerId": 12345,
"customerEmail": "customer@example.com",
"lineItems": [...],
"billingAddress": {...},
"shippingAddress": {...}
},
{...}
]
Response Scenarios:
Customer with no subscriptions:
[]
Returns empty array with 200 OK status (not an error).
Customer with multiple subscriptions: Array contains multiple subscription objects, each representing a separate subscription contract.
Performance Considerations:
Response Size:
- Each subscription object can be 5-50 KB depending on line items
- Customer with 10 subscriptions: ~100-500 KB response
- Consider pagination or filtering for customers with 20+ subscriptions
Query Performance:
- Typical response time: 200-500ms
- Slower for customers with many subscriptions or complex products
- Database query is optimized with indexed lookups
Best Practices:
- Cache Results: Cache response data to minimize API calls
- Filter Client-Side: Filter/sort subscriptions on client after retrieval
- Selective Display: Don’t display all fields if not needed
- Handle Empty Array: Always gracefully handle case with no subscriptions
- Optimize Images: Product images can be large - lazy load if displaying
Data Freshness:
- Data is retrieved from Appstle database (not real-time Shopify query)
- Updated via webhooks with < 1 second lag typically
- Use sync endpoint if data appears stale
Security Notes:
- Customer ID is validated against authenticated shop
- Returns only subscriptions belonging to specified customer
- Cannot access customers from other shops
- Sensitive payment details (full card numbers) are never returned
Comparison with Other Endpoints:
vs. GET /subscription-customers/valid/:
- This endpoint: Returns complete subscription details
- Valid contracts endpoint: Returns only contract IDs
- Use this when you need full subscription information
vs. GET /subscription-contract-details:
- This endpoint: Filtered by single customer
- Contract details endpoint: Query across all customers with filters
- Use this for customer-specific views
vs. GET /subscription-contracts/contract-external/:
- This endpoint: All contracts for a customer
- Contract external endpoint: Single contract with Shopify raw data
- Use this for customer overview, other for detailed single contract
Authentication: Requires valid X-API-Key header or api_key parameter (deprecated)
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.
Headers
Path Parameters
Customer Id
Query Parameters
API Key (Deprecated - Use Header X-API-Key instead)
Response
Successfully retrieved customer subscription details. Returns array of subscription objects (may be empty).
SENT, UNSENT, FAILED, EMAIL_SETTINGS_DISABLED, CUSTOMER_PAYMENT_EMPTY, CONTRACT_PAUSED_STATUS SENT, UNSENT, FAILED, SMS_SETTINGS_DISABLED, CUSTOMER_PAYMENT_EMPTY, CONTRACT_PAUSED_STATUS, PHONE_NUMBER_EMPTY STORE_FRONT, IMPORTED, SPLIT_ATTEMPT_BILLING, SPLIT_CONTRACT REGULAR_SUBSCRIPTION, BUILD_A_BOX_CLASSIC, BUILD_A_BOX_SINGLE_PRODUCT, BUNDLING_CLASSIC, BUNDLING_MIX_AND_MATCH, SECTIONED_BUNDLE, VOLUME_DISCOUNT