Skip to content

External (0.0.1)

Languages
Servers
https://membership-admin.appstle.com

Shipping & Delivery Profiles

APIs for managing Shopify delivery profiles, shipping rates, zones, and free shipping configuration for subscription memberships

Operations

Customer Discount History

APIs for retrieving historical discount code usage and redemption information for membership contracts

Operations

Cancellation Flow Configuration

APIs for managing membership cancellation flow settings including retention offers, survey questions, and cancel confirmation screens

Operations

Billing & Orders

APIs for managing membership billing attempts, recurring orders, payment retries, order history, and order skipping

Operations

One-Time Add-Ons

APIs for managing one-time product additions to upcoming subscription orders, including adding, retrieving, and removing one-off items

Operations

Membership Plans

APIs for managing membership/subscription plan groups, including creating plans, configuring discounts, billing intervals, and assigning products to plans

Operations

Product Bundles

APIs for managing subscription product bundles, bundle configurations, item grouping, and bundle-specific discount codes

Operations

Custom CSS Styling

APIs for retrieving custom CSS styles applied to subscription widgets and customer portal for theme customization

Operations

Customer Portal Configuration

APIs for managing customer portal settings including UI customization, text labels, feature toggles, and branding options for the member self-service portal

Operations

Membership Contracts

APIs for managing membership/subscription contracts including creation, updates, status changes, line items, discounts, and billing operations

Operations

Remove product from recurring subscription

Request

Removes a line item (product) from a subscription contract. The product will no longer be included in future recurring orders.

Product Removal Process:

  • Line Item Identification: Locates specific line item using GraphQL line ID
  • Contract Update: Removes line item from subscription
  • Discount Handling: Optionally removes associated line-item discounts
  • Price Recalculation: Updates subscription total after removal
  • Activity Logging: Records product removal event

Key Features:

  • Selective Removal: Remove specific products by line ID
  • Discount Control: Choose whether to remove product-specific discounts
  • Immediate Effect: Changes apply to next billing cycle
  • Price Updates: Automatically adjusts subscription pricing

Discount Removal Option:

  • removeDiscount=true (default): Removes discounts tied to this line item
  • removeDiscount=false: Keeps discounts (may apply to other items if applicable)
  • Only affects line-item-specific discounts, not subscription-level discounts

Line ID Format:

  • GraphQL ID format: gid://shopify/SubscriptionLine/[ID]
  • Retrieve from subscription contract details endpoint
  • Each line item has unique ID

Use Cases:

  • Customer downgrades subscription to fewer products
  • Remove seasonal products at end of season
  • Customer portal product removal workflows
  • Discontinued product cleanup
  • Subscription simplification (too many items)
  • Build-a-box customization changes

Important Notes:

  • Cannot remove last line item (subscription needs at least one product)
  • Subscription must not be frozen
  • Removal is permanent (re-add if needed)
  • May affect shipping costs if weight/volume changes

Returns: Updated subscription contract object with line item removed

Authentication: Requires API key authentication via X-API-Key header or api_key parameter

Query
contractIdinteger(int64)required

Subscription contract ID

Example: contractId=123456789
api_keystring

API Key (Deprecated - Use Header X-API-Key instead)

lineIdstringrequired

Subscription line item GraphQL ID to remove

Example: lineId=gid://shopify/SubscriptionLine/987654321
removeDiscountboolean

Whether to remove associated line-item discounts (default: true)

Default true
Example: removeDiscount=true
Headers
X-API-Keystring
curl -i -X PUT \
  'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-remove-line-item?contractId=123456789&api_key=string&lineId=gid%3A%2F%2Fshopify%2FSubscriptionLine%2F987654321&removeDiscount=true' \
  -H 'X-API-Key: string'

Responses

Line item successfully removed from subscription

Bodyapplication/json
get__typenamestring
idstring
createdAtobject
updatedAtobject
nextBillingDateobject
statusstring
Enum"ACTIVE""PAUSED""CANCELLED""EXPIRED""FAILED""$UNKNOWN"
deliveryPriceobject(DeliveryPrice)
lastPaymentStatusstring
Enum"SUCCEEDED""FAILED""$UNKNOWN"
billingPolicyobject(BillingPolicy)
deliveryPolicyobject(DeliveryPolicy)
linesobject(Lines)
customerPaymentMethodobject(CustomerPaymentMethod)
deliveryMethodobject(DeliveryMethod)
originOrderobject(OriginOrder)
customerobject(Customer)
discountsobject(Discounts)
notestring
customAttributesArray of objects(CustomAttribute1)
billingAttemptsobject(BillingAttempts)
Response
application/json
{ "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": [] } }

Remove discount from subscription

Request

Removes a discount from a subscription contract. This endpoint allows you to remove previously applied discounts, restoring the subscription to full price.

Discount Removal Process:

  • Identify Discount: Uses discount ID to locate specific discount on contract
  • Remove From Contract: Removes discount allocation from subscription
  • Recalculate Pricing: Updates subscription pricing to remove discount
  • Activity Logging: Records discount removal event
  • Immediate Effect: Changes apply to next billing cycle

Key Features:

  • Selective Removal: Remove specific discounts by ID
  • Price Restoration: Returns subscription to original or remaining discount pricing
  • Multiple Discount Support: Works with subscriptions having multiple discounts
  • Activity Tracking: Logs removal for audit trail

Finding Discount ID:

  • Retrieve subscription contract details to see applied discounts
  • Each discount has a unique Shopify GraphQL ID
  • Format: gid://shopify/SubscriptionManualDiscount/[ID]

Use Cases:

  • End limited-time promotional discounts
  • Remove expired retention offers
  • Customer service discount adjustments
  • Clean up incorrectly applied discounts
  • Remove trial period pricing
  • End referral program bonuses

Returns: Updated subscription contract object with discount removed

Authentication: Requires API key authentication via X-API-Key header or api_key parameter

Query
contractIdinteger(int64)required

Subscription contract ID to remove discount from

Example: contractId=123456789
api_keystring

API Key (Deprecated - Use Header X-API-Key instead)

discountIdstringrequired

Shopify discount ID to remove (GraphQL ID format)

Example: discountId=gid://shopify/SubscriptionManualDiscount/123456789
Headers
X-API-Keystring
curl -i -X PUT \
  'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-remove-discount?contractId=123456789&api_key=string&discountId=gid%3A%2F%2Fshopify%2FSubscriptionManualDiscount%2F123456789' \
  -H 'X-API-Key: string'

Responses

Discount successfully removed from subscription

Bodyapplication/json
get__typenamestring
idstring
createdAtobject
updatedAtobject
nextBillingDateobject
statusstring
Enum"ACTIVE""PAUSED""CANCELLED""EXPIRED""FAILED""$UNKNOWN"
deliveryPriceobject(DeliveryPrice)
lastPaymentStatusstring
Enum"SUCCEEDED""FAILED""$UNKNOWN"
billingPolicyobject(BillingPolicy)
deliveryPolicyobject(DeliveryPolicy)
linesobject(Lines)
customerPaymentMethodobject(CustomerPaymentMethod)
deliveryMethodobject(DeliveryMethod)
originOrderobject(OriginOrder)
customerobject(Customer)
discountsobject(Discounts)
notestring
customAttributesArray of objects(CustomAttribute1)
billingAttemptsobject(BillingAttempts)
Response
application/json
{ "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": [] } }

Apply discount code to subscription

Request

Applies an existing Shopify discount code to a subscription contract. The discount code must already exist in Shopify and be valid for subscription usage.

Discount Application Process:

  • Code Validation: Verifies discount code exists in Shopify
  • Eligibility Check: Ensures code is valid for subscription use
  • Contract Update: Applies discount to subscription contract
  • Price Recalculation: Updates subscription pricing with discount applied
  • Activity Logging: Records discount application event

Key Features:

  • Existing Code Support: Uses Shopify discount codes already created in admin
  • Automatic Validation: Checks code validity and subscription eligibility
  • Immediate Application: Discount applies to next billing cycle
  • Contract Synchronization: Keeps Shopify contract in sync with discount

Discount Code Requirements:

  • Must exist in Shopify admin
  • Must be active and not expired
  • Must be eligible for subscription purchases
  • Usage limits must not be exceeded

Use Cases:

  • Allow customers to apply promotional codes to existing subscriptions
  • Customer service applying retention discounts
  • Reward program integration with discount codes
  • Referral program discount application
  • Seasonal promotion code application
  • Win-back campaign discount codes

Returns: Updated subscription contract object with discount applied

Authentication: Requires API key authentication via X-API-Key header or api_key parameter

Query
contractIdinteger(int64)required

Subscription contract ID to apply discount to

Example: contractId=123456789
api_keystring

API Key (Deprecated - Use Header X-API-Key instead)

discountCodestringrequired

Shopify discount code to apply

Example: discountCode=SUMMER2024
Headers
X-API-Keystring
curl -i -X PUT \
  'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-apply-discount?contractId=123456789&api_key=string&discountCode=SUMMER2024' \
  -H 'X-API-Key: string'

Responses

Discount code successfully applied to subscription

Bodyapplication/json
get__typenamestring
idstring
createdAtobject
updatedAtobject
nextBillingDateobject
statusstring
Enum"ACTIVE""PAUSED""CANCELLED""EXPIRED""FAILED""$UNKNOWN"
deliveryPriceobject(DeliveryPrice)
lastPaymentStatusstring
Enum"SUCCEEDED""FAILED""$UNKNOWN"
billingPolicyobject(BillingPolicy)
deliveryPolicyobject(DeliveryPolicy)
linesobject(Lines)
customerPaymentMethodobject(CustomerPaymentMethod)
deliveryMethodobject(DeliveryMethod)
originOrderobject(OriginOrder)
customerobject(Customer)
discountsobject(Discounts)
notestring
customAttributesArray of objects(CustomAttribute1)
billingAttemptsobject(BillingAttempts)
Response
application/json
{ "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": [] } }

Bundle Settings

APIs for managing subscription bundle configuration settings including bundle behavior, pricing rules, and display options

Operations

Customer Payment Methods

APIs for managing customer payment methods, payment tokens, and payment method retrieval for subscriptions

Operations

Product Swap Rules

APIs for retrieving product swap/substitution options allowing members to exchange subscription items based on configured swap rules and variant groups

Operations

Subscription Contract Management

Operations

Subscription Billing

Operations

Billing Attempts

Operations