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

Update shipping address for subscription contract

Request

Changes the delivery shipping address for a subscription contract. This allows customers to update where their subscription orders are delivered.

Key Features:

  • Full Address Update: Change complete shipping address in one call
  • Address Validation: System validates address format and country codes
  • Immediate Effect: New address applies to the next delivery
  • Activity Logging: All address changes are logged for audit trail
  • International Support: Supports addresses in all countries

Required Address Fields:

  • firstName: Recipient's first name
  • lastName: Recipient's last name
  • address1: Street address line 1
  • city: City name
  • countryCode: ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
  • zip: Postal/ZIP code

Optional Address Fields:

  • address2: Apartment, suite, unit number
  • company: Company name (for business addresses)
  • phone: Contact phone number
  • provinceCode: State/province code (e.g., CA, NY, ON)

Common Use Cases:

  • Customer Moved: Update address after relocation
  • Temporary Address: Ship to vacation home or temporary location
  • Gift Recipient: Change recipient for gift subscriptions
  • Correct Typos: Fix address errors from initial signup
  • Business to Home: Switch between business and residential addresses
  • Seasonal Address: Update for snowbird/seasonal residents

Country and Province Codes:

  • countryCode: Use ISO 3166-1 alpha-2 codes
    • Examples: US (United States), CA (Canada), GB (United Kingdom), AU (Australia)
  • provinceCode: Use ISO 3166-2 subdivision codes
    • US Examples: CA (California), NY (New York), TX (Texas)
    • Canada Examples: ON (Ontario), BC (British Columbia), QC (Quebec)

Address Validation:

  • Format Validation: System checks required fields are present
  • Country Validation: Verifies country code is valid
  • Province Validation: Checks province code matches country
  • Postal Code: Validates postal code format for country

Important Notes:

  • Shipping Rate Recalculation: New address may have different shipping costs
  • Delivery Method: System automatically selects appropriate delivery method
  • Next Order Only: Only affects future orders, not orders already placed
  • Address Book: Consider updating customer's default address separately
  • PO Boxes: Some delivery methods may not support PO Box addresses

Shipping Cost Impact:

  • Changing address may change shipping costs for future deliveries
  • International addresses typically have higher shipping costs
  • Remote/rural areas may have additional delivery fees
  • Consider notifying customer of cost changes

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

Query
contractIdinteger(int64)required

Subscription contract ID

Example: contractId=12345
api_keystring

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

Headers
X-API-Keystring
Bodyapplication/jsonrequired

New shipping address details

address1string
address2string
citystring
firstNamestring
lastNamestring
phonestring
provincestring
zipstring
countrystring
countryCodestring
provinceCodestring
companystring
curl -i -X PUT \
  'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-shipping-address?contractId=12345&api_key=string' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: string' \
  -d '{
    "firstName": "John",
    "lastName": "Doe",
    "address1": "123 Main Street",
    "address2": "Apt 4B",
    "city": "San Francisco",
    "provinceCode": "CA",
    "countryCode": "US",
    "zip": "94102",
    "phone": "+1-415-555-0123",
    "company": "Acme Corp"
  }'

Responses

Shipping address successfully updated

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": [] } }

Update subscription payment method

Request

Updates the payment method for a subscription contract by refreshing payment instrument from Shopify customer. This endpoint syncs the subscription's payment method with the customer's default payment method in Shopify.

Payment Method Update Process:

  • Fetch Latest Payment: Retrieves customer's current default payment method from Shopify
  • Update Contract: Associates new payment method with subscription contract
  • Validate Payment: Ensures payment method is valid and active
  • Sync Changes: Updates payment instrument in subscription billing system

Key Features:

  • Automatic Sync: Pulls latest payment method from Shopify customer record
  • Payment Validation: Verifies new payment method is usable for billing
  • Contract Update: Updates Shopify subscription contract with new payment
  • Failed Billing Recovery: Useful for updating payment after billing failures

Use Cases:

  • Customer updates credit card and wants to apply to existing subscription
  • Recover from failed billing by allowing payment method update
  • Sync payment methods in customer portal workflows
  • Update expired or invalid payment methods
  • Switch between multiple saved payment methods
  • Integration with custom payment update flows

Important Notes:

  • Customer must have a default payment method in Shopify
  • Payment method must be valid and not expired
  • Updates are reflected immediately for future billing
  • Does not retry failed billing attempts automatically

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

Query
contractIdinteger(int64)required

Subscription contract ID to update payment method for

Example: contractId=123456789
api_keystring

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

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

Responses

Payment method successfully updated for subscription

Update order note/instructions for subscription contract

Request

Updates the persistent order note attached to a subscription contract. This note is automatically included with EVERY future recurring order generated from this subscription, appearing in Shopify admin order details and printable packing slips.

IMPORTANT: Recurring vs One-Time Notes

  • This Endpoint (Contract Note): Applies to ALL FUTURE ORDERS permanently
  • Billing Attempt Note (/subscription-billing-attempts-update-order-note): Applies to ONE SPECIFIC ORDER only
  • Combined Behavior: If both notes exist, they are concatenated in the Shopify order

How It Works:

  1. Accepts subscription contract ID and new order note text
  2. Stores note in subscription contract record
  3. Every time a new order is created (monthly, weekly, etc.), note is automatically added
  4. Previous contract note is replaced (not appended)
  5. Empty string clears the existing note
  6. Does NOT affect past orders already created

Character Limits & Validation:

  • Maximum Length: 5000 characters (Shopify order note limit)
  • Encoding: UTF-8 supported (emojis, international characters allowed)
  • HTML: Plain text only - HTML tags display as text
  • Line Breaks: Use \n for line breaks (preserved in Shopify)
  • Special Characters: Automatically escaped for safety

Common Use Cases:

1. Permanent Delivery Instructions

Example: "Always leave package at back door. Do not ring doorbell (baby sleeping)."
Use Case: Customer wants same delivery instructions for all future orders
Applies To: Every monthly shipment permanently

2. Gift Subscription Messages

Example: "This is a gift subscription for Mom. Happy Birthday! Love, Sarah"
Use Case: Gift subscription with recurring message
Applies To: All orders until subscription ends or note is changed

3. Special Handling Requirements

Example: "FRAGILE - Glass bottles. Handle with care. Keep upright during shipping."
Use Case: Delicate products requiring special warehouse handling
Applies To: Every fulfillment automatically

4. Customer Preferences

Example: "Customer is allergic to peanuts. NO peanut products. Double-check packaging."
Use Case: Critical dietary restrictions or preferences
Applies To: All future orders for safety compliance

5. Internal Merchant Notes

Example: "VIP customer - priority processing. Include bonus samples."
Use Case: Internal fulfillment team instructions
Applies To: All shipments to provide consistent VIP treatment

6. Clearing Unwanted Notes

Example: orderNote="" (empty string)
Use Case: Customer moved, no longer needs "Leave at neighbor" note
Result: Future orders have no contract note (one-time notes still possible)

Where Note Appears:

  • Shopify Admin: Order details page under "Notes"
  • Packing Slips: Printed on warehouse packing slips (if enabled)
  • Order Confirmation Emails: May appear in customer emails (theme-dependent)
  • Fulfillment Apps: Visible to third-party logistics providers
  • Order APIs: Accessible via Shopify Order REST/GraphQL APIs

When to Use Contract Note vs Billing Attempt Note:

ScenarioUse Contract NoteUse Billing Attempt Note
Permanent delivery instructions
One-time special request
Gift message for all shipments
"Skip broccoli this week"
Allergy warnings
"Deliver to neighbor (vacation week)"
VIP customer priority

Error Handling:

400 - Bad Request:

  • Order note exceeds 5000 character limit
  • Contract ID doesn't belong to authenticated shop
  • Contract is in invalid state

404 - Contract Not Found:

  • Subscription contract ID doesn't exist
  • Contract was deleted
  • Wrong shop (contract belongs to different store)

Integration Best Practices:

  1. Display Character Counter: Show "450 / 5000 characters" in UI
  2. Preview Formatting: Show how line breaks will appear
  3. Confirm Permanent Changes: Warn user "This note will appear on ALL future orders"
  4. Sanitize Input: Strip HTML tags, prevent injection attacks
  5. Show Current Note: Pre-fill form with existing note before update

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

Path
contractIdinteger(int64)required

Subscription contract ID

Example: 12345
Query
api_keystring

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

orderNotestringrequired

Custom order note/instructions to include with subscription orders

Example: orderNote=Please leave at back door
Headers
X-API-Keystring
curl -i -X PUT \
  'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-order-note/12345?api_key=string&orderNote=Please+leave+at+back+door' \
  -H 'X-API-Key: string'

Responses

Order note updated successfully. Returns true. Note will appear on all future recurring orders from this contract.

Bodyapplication/json
boolean
Response
application/json
true

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