APIs for managing Shopify delivery profiles, shipping rates, zones, and free shipping configuration for subscription memberships
- Get membership/subscription contract list
External (0.0.1)
Request
Automatically generates and emails a secure magic link to the customer for accessing their subscription management portal. This is a convenience endpoint that combines token generation and email delivery in a single API call.
Key Features:
- Automated Delivery: Generates magic link and sends email in one operation
- Customer Lookup: Finds customer by email address automatically
- Branded Emails: Uses shop's configured email templates and branding
- Subscription Validation: Only sends if customer has active subscriptions
- Time-Limited Links: Email contains token that expires after configured duration
Email Contents: The sent email typically includes:
- Magic Link Button: One-click access to customer portal
- Link URL: Full URL with embedded authentication token
- Expiration Notice: When the link will expire (e.g., "Valid for 24 hours")
- Shop Branding: Store logo, colors, and custom messaging
- Help Text: Instructions on how to use the portal
Workflow:
- API receives customer email address
- System looks up customer in Shopify by email
- Validates customer has active subscription contracts
- Generates secure JWT authentication token
- Constructs magic link URL with token
- Sends branded email with magic link to customer
- Returns success confirmation to API caller
Email Template Customization: Email appearance and content can be customized via:
- Shop's email notification settings in admin
- Custom email templates for magic links
- Localization settings for customer's language
- Custom branding (logo, colors, footer)
Common Use Cases:
- Customer support: send portal access link to customers over phone/chat
- Automated workflows: trigger magic link emails based on events
- Forgot password alternative: passwordless portal access
- Post-purchase flows: send portal access after first order
- Reactivation campaigns: re-engage paused/cancelled customers
- Customer onboarding: welcome emails with portal access
- Subscription reminders: include portal link in reminder emails
Integration Example:
GET /api/external/v2/subscription-contracts-email-magic-link?
email=customer@example.com&
api_key=your_api_keyThis sends a magic link email to customer@example.com for portal access.
Error Handling:
- If customer not found, returns 400 Bad Request
- If customer has no active subscriptions, returns 400
- If email service fails, returns 500 Internal Server Error
- Invalid email format returns 400 Bad Request
Email Delivery Notes:
- Emails are sent asynchronously (may take 1-5 minutes to deliver)
- Check spam folders if customer doesn't receive email
- Respect customer's email preferences and unsubscribe status
- Rate limits may apply to prevent abuse
Security Considerations:
- Only send to verified customer email addresses
- Email contains passwordless authentication link
- Links expire after configured duration (default: 24-72 hours)
- Sending to wrong email grants that person subscription access
- Consider email verification before using this endpoint
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-email-magic-link
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-email-magic-link?api_key=string&email=customer%40example.com' \
-H 'X-API-Key: string'Request
Retrieves a paginated list of membership/subscription contracts with advanced filtering capabilities. This endpoint provides comprehensive access to all subscription contracts in your store with flexible query options.
Key Information Returned:
- Contract Details: Contract ID, status, creation date, billing cycle
- Customer Information: Customer name, email, Shopify customer ID
- Subscription Items: Products, variants, quantities in subscription
- Billing Information: Next billing date, billing frequency, pricing
- Delivery Details: Shipping address, delivery method, next delivery date
- Plan Information: Membership plan type, selling plan IDs
- Status Tracking: Active, paused, cancelled, expired states
Filtering Capabilities:
- Date Ranges: Filter by creation date or next billing date
- Customer Search: Search by customer name or email
- Status Filter: Filter by contract status (active, paused, cancelled)
- Plan Type: Filter by membership plan type
- Billing Frequency: Filter by billing interval (weekly, monthly, etc.)
- Product/Variant: Find contracts containing specific products or variants
- Order Name: Search by Shopify order name/number
- Selling Plan: Filter by Shopify selling plan IDs
- Special Filters: Contracts with deleted products or bounced emails
Pagination:
- Supports standard pagination parameters (page, size, sort)
- Returns pagination headers for total count and navigation
- Default page size configurable via request parameters
Use Cases:
- Export subscription data to external CRM or analytics systems
- Build custom subscription dashboards and reports
- Sync membership data with external platforms
- Identify subscriptions needing attention (bounced emails, deleted products)
- Generate subscription activity reports by date range
- Find all subscriptions for a specific product or variant
- Monitor subscription health and churn metrics
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
Filter contracts created on or after this date
Filter contracts created on or before this date
Filter contracts with next billing date on or after this date
Filter contracts with next billing date on or before this date
Filter by specific subscription/membership contract ID
Filter by customer name or email (partial match)
Filter by subscription status
Filter by billing frequency count (e.g., 1 for every 1 month)
Filter by billing frequency interval
Filter by plan type (PAY_AS_YOU_GO or PREPAID)
Filter by selling plan IDs (comma-separated for multiple)
Include only contracts with products deleted from Shopify store
Include only contracts where email notifications bounced or failed
- https://membership-admin.appstle.com/api/external/v2/subscription-contract-details
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://membership-admin.appstle.com/api/external/v2/subscription-contract-details?api_key=string&fromCreatedDate=2024-01-01T00%3A00%3A00Z&toCreatedDate=2024-12-31T23%3A59%3A59Z&fromNextDate=2024-01-01T00%3A00%3A00Z&toNextDate=2024-12-31T23%3A59%3A59Z&subscriptionContractId=gid%3A%2F%2Fshopify%2FSubscriptionContract%2F12345&customerName=john%40example.com&orderName=%231001&status=ACTIVE&billingPolicyIntervalCount=1&billingPolicyInterval=MONTH&planType=PAY_AS_YOU_GO&recordType=CONTRACT&productId=123456789&variantId=987654321&sellingPlanIds=123%2C456%2C789&havingProductsDeletedFromStore=false&emailBouncedOrFailed=false&page=0&size=10&sort=id%2Cdesc' \
-H 'X-API-Key: string'Subscription contracts successfully retrieved with pagination headers
{ "id": 0, "shop": "string", "graphSubscriptionContractId": "string", "subscriptionContractId": 0, "billingPolicyInterval": "string", "billingPolicyIntervalCount": 0, "currencyCode": "string", "customerId": 0, "graphCustomerId": "string", "deliveryPolicyInterval": "string", "deliveryPolicyIntervalCount": 0, "status": "string", "graphOrderId": "string", "orderId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "nextBillingDate": "2019-08-24T14:15:22Z", "orderAmount": 0.1, "orderName": "string", "customerName": "string", "customerEmail": "string", "subscriptionCreatedEmailSent": true, "endsAt": "2019-08-24T14:15:22Z", "startsAt": "2019-08-24T14:15:22Z", "subscriptionCreatedEmailSentStatus": "SENT", "minCycles": 0, "maxCycles": 0, "customerFirstName": "string", "customerLastName": "string", "autoCharge": true, "importedId": "string", "stopUpComingOrderEmail": true, "pausedFromActive": true, "subscriptionCreatedSmsSentStatus": "SENT", "phone": "string", "activatedOn": "2019-08-24T14:15:22Z", "pausedOn": "2019-08-24T14:15:22Z", "cancelledOn": "2019-08-24T14:15:22Z", "contractDetailsJSON": "string", "cancellationFeedback": "string", "orderNote": "string", "orderNoteAttributes": "string", "allowDeliveryPriceOverride": true, "orderAmountUSD": 0.1, "billingDateAfterTrial": "2019-08-24T14:15:22Z", "trialEndDate": "2019-08-24T14:15:22Z", "pausedBySecurityChallenge": true, "dunning": true, "contractAmount": 0.1, "contractAmountUSD": 0.1, "upcomingSwapRule": "string", "emailBouncedOrFailed": true }
Request
Retrieves the pending/scheduled downgrade details for a specific subscription contract. This endpoint returns information about a downgrade that has been scheduled but not yet executed.
Response Information:
- contractId: The subscription contract ID
- waitTillTimestamp: When the downgrade will be executed
- oldVariantId: The current product variant ID
- newVariantId: The target product variant ID after downgrade
- oldPrice: Current subscription price
- newPrice: New price after downgrade
- sellingPlanId: The selling plan ID for the new subscription
- sellingPlanName: Name of the selling plan
Use Cases:
- Check if a customer has a pending downgrade scheduled
- Display pending downgrade information in custom dashboards
- Verify downgrade details before allowing further modifications
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contract-details/{contractId}/pending-downgrade
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://membership-admin.appstle.com/api/external/v2/subscription-contract-details/12345/pending-downgrade?api_key=string' \
-H 'X-API-Key: string'{ "shop": "string", "contractId": 0, "waitTillTimestamp": "string", "oldLineId": "string", "oldVariantId": "string", "newVariantId": "string", "sellingPlanId": "string", "sellingPlanName": "string", "oldPrice": 0.1, "newPrice": 0.1, "newCustomerTag": "string", "oldCustomerTags": "string", "newOrderTag": "string", "eventSource": "string", "retryCount": 0, "customerId": 0, "executionArn": "string" }