APIs for managing Shopify delivery profiles, shipping rates, zones, and free shipping configuration for subscription memberships
- Get detailed customer subscription information
External (0.0.1)
Request
Retrieves a list of all valid (active, paused, or pending) subscription contract IDs associated with a specific customer. This endpoint is useful for quickly checking which subscriptions a customer has without retrieving full contract details.
Key Features:
- Quick Lookup: Returns only contract IDs, not full contract details
- Active Subscriptions Only: Excludes cancelled or expired contracts
- Set Response: Returns unique contract IDs (no duplicates)
- Fast Performance: Lightweight query for list views
Included Subscription Statuses:
- ACTIVE: Currently active recurring subscriptions
- PAUSED: Temporarily paused but valid subscriptions
- PENDING: Scheduled to start in the future
Excluded Subscription Statuses:
- CANCELLED: Customer-cancelled subscriptions
- EXPIRED: Reached max cycles or end date
- FAILED: Failed billing with no recovery
Common Use Cases:
- Subscription Count: Quickly determine how many active subscriptions a customer has
- Access Control: Verify customer has valid subscriptions before showing portal
- List Navigation: Build dropdown or list of customer's subscriptions
- Bulk Operations: Get all contract IDs for batch processing
- Validation: Check if customer has any active memberships
- Dashboard Display: Show subscription count without full data
Example Response:
[12345, 12346, 12389]Parameters:
- customerId (required, path): The Shopify customer ID
Response: Returns a Set of Long values representing valid subscription contract IDs
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-customers/valid/{customerId}
- 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-customers/valid/6789012345?api_key=string' \
-H 'X-API-Key: string'"string"
Request
Retrieves comprehensive details for all subscription contracts associated with a specific customer. This endpoint returns complete subscription contract data including products, pricing, billing schedule, and status.
Key Information Returned:
- Contract Details: Contract ID, status (active, paused, cancelled), creation date
- Products: Line items with product names, variants, quantities, and prices
- Billing Information: Next billing date, billing frequency, payment method
- Delivery Details: Shipping address, delivery method, delivery frequency
- Pricing: Subtotal, discounts applied, total amount per cycle
- Membership Plan: Associated subscription plan name and details
- Order History: Past billing attempts and fulfillment records
Subscription Contract Details Include:
- Contract ID: Unique identifier for the subscription
- Customer ID: Shopify customer ID associated with the contract
- Status: ACTIVE, PAUSED, CANCELLED, EXPIRED
- Billing Cycle: Number of completed billing cycles
- Next Billing Date: When the next payment will be charged
- Delivery Date: When the next order will be shipped
- Products: All line items in the subscription with pricing
- Discount Codes: Applied discount codes and their values
- Custom Attributes: Any custom metadata or tags
Common Use Cases:
- Display full subscription list in customer account dashboard
- Retrieve all contract details for customer support inquiries
- Build custom customer portal with subscription management
- Sync subscription data to external CRM or analytics systems
- Generate customer subscription reports and analytics
- Validate customer's active subscriptions before offering upgrades
- Show subscription history and upcoming deliveries
Response Format: Returns a List of SubscriptionContractDetailsDTO objects, one per active/paused contract. If customer has no subscriptions, returns an empty list.
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}
- 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-customers-detail/valid/6789012345?api_key=string' \
-H 'X-API-Key: string'Customer subscription details successfully retrieved (may be empty list if no subscriptions)
{ "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 complete subscription contract data directly from Shopify's GraphQL API. This returns the full, unmodified Shopify contract object with all nested data.
Key Features:
- Raw Shopify Data: Direct response from Shopify API, not transformed
- Complete Contract: All contract fields, line items, billing details
- Real-Time Data: Fetches current state from Shopify (not cached)
- Nested Objects: Includes customer, addresses, discounts, line items
Returned Contract Data:
- Contract ID & Status: Shopify global ID, status (ACTIVE/PAUSED/CANCELLED/EXPIRED)
- Customer Info: Customer object with name, email, addresses
- Line Items: Products/variants in subscription with quantities, prices
- Billing Details: Next billing date, billing policy (frequency, interval)
- Delivery Details: Delivery policy, shipping address, method
- Pricing: Line prices, discounts, currency code
- Dates: Created at, updated at, next billing date
- Custom Attributes: Any custom data attached to the contract
- Discounts: Applied discount codes with amounts
Common Use Cases:
- Full Contract Display: Show all contract details in admin/portal
- Debugging: Inspect raw Shopify contract structure
- Data Export: Get complete contract for reporting/analytics
- Integration Development: Understand Shopify's contract schema
- Audit Trail: Capture complete contract state at a point in time
Differences from other endpoints:
- This returns Shopify's raw contract object
/api/external/v2/subscription-contract-detailsreturns transformed DTO- This includes more nested Shopify-specific fields
Parameters:
- contractId (required, path): The subscription contract ID (numeric)
Response: Returns complete Shopify SubscriptionContract GraphQL object
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts/contract-external/{contractId}
- 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/contract-external/12345?api_key=string' \
-H 'X-API-Key: string'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }