Comprehensive API documentation for managing subscriptions, payments, and related operations. These APIs allow you to programmatically manage subscription lifecycles, handle payments, configure products, and integrate subscription functionality into your applications.
- Update subscription delivery address and method
External APIs (0.0.1)
Request
Updates the status of a subscription contract to ACTIVE, PAUSED, or CANCELLED. This endpoint manages the lifecycle of subscriptions with automatic state tracking and notifications.
Status Transitions:
- ACTIVE: Resumes a paused subscription, enabling future billing and deliveries
- PAUSED: Temporarily suspends all billing and deliveries until manually resumed
- CANCELLED: Permanently terminates the subscription (irreversible)
Key Features:
- Validates status transitions (prevents same-status updates)
- Tracks status change timestamps for audit trails
- Sends automated email notifications to customers
- Creates detailed activity logs for each status change
- Handles concurrent modifications with automatic retry
- Adjusts next billing date when resuming subscriptions
Permission Requirements (Customer Portal): When called from customer portal context:
- PAUSED status requires 'pauseResumeSub' permission
- ACTIVE status (resuming) requires 'resumeSub' permission
- CANCELLED status requires 'cancelSub' permission
- External API calls bypass these permission checks
Status Change Side Effects:
- Activating: Recalculates next billing date, marks activation timestamp
- Pausing: Stops all scheduled orders, marks pause timestamp
- Cancelling: Terminates subscription permanently, marks cancellation timestamp
Error Recovery: The system automatically handles:
- Invalid discount codes by removing them and retrying
- Concurrent modifications by retrying the operation
- This ensures reliable status updates in production environments
Important Notes:
- Status values are case-insensitive
- Cancelled subscriptions cannot be reactivated
- Paused subscriptions retain all settings and can be resumed
- Email notifications are sent automatically unless internally suppressed
Authentication: Requires valid X-API-Key header
Subscription contract ID to update. Provide the numeric ID without the gid:// prefix
New status for the subscription contract. Case-insensitive.
Pause subscription
Resume subscription
Cancel subscription
- https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-status
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-status?contractId=123456789&status=ACTIVE&api_key=string' \
-H 'X-API-Key: sk_live_1234567890abcdef'No contentRequest
Updates the shipping address or delivery method for a subscription contract. Supports standard shipping, local delivery, and pickup options with comprehensive address validation.
Delivery Method Types:
- SHIPPING: Standard shipping to customer address (default)
- LOCAL: Local delivery within specified zip codes
- PICK_UP: Customer pickup at designated location
Key Features:
- Zip code restrictions for customer portal access
- Optional ShipperHQ address validation
- Automatic phone number handling for local delivery
- Email notifications to customers
- Shipping price recalculation
- Activity log tracking with old/new addresses
Zip Code Validation (Customer Portal Only): When called from customer portal:
- Standard shipping: Validates against 'allowToSpecificZipCode' setting
- Local delivery: Validates against 'allowToSpecificZipCodeForLocalDelivery' setting
- External API calls bypass zip code restrictions
Address Validation:
- If ShipperHQ is configured, addresses are validated for deliverability
- Invalid addresses will return appropriate error messages
- Helps prevent failed deliveries and shipping issues
Special Handling:
- Local delivery addresses missing phone numbers are auto-populated
- Uses customer's phone if available, otherwise defaults to placeholder
- Handles missing address components gracefully
Post-Update Actions:
- Sends 'SHIPPING_ADDRESS_UPDATED' email to customer
- Creates activity log with address change details
- Triggers asynchronous shipping price recalculation
- May remove invalid discount codes automatically
Important Notes:
- Province codes should use ISO 3166-2 format (e.g., 'NY' for New York)
- Country codes should use ISO 3166-1 alpha-2 format (e.g., 'US')
- Phone numbers should include country code for international addresses
- Pickup locations must be pre-configured in Shopify
Authentication: Requires valid X-API-Key header
Subscription contract ID to update. Provide the numeric ID without the gid:// prefix
New shipping address and delivery method details
- https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-shipping-address
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-shipping-address?contractId=123456789&api_key=string' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: sk_live_1234567890abcdef' \
-d '{
"methodType": "SHIPPING",
"firstName": "John",
"lastName": "Doe",
"company": "Acme Corp",
"address1": "456 New Street",
"address2": "Suite 200",
"city": "Los Angeles",
"provinceCode": "CA",
"countryCode": "US",
"zip": "90001",
"phone": "+12135551234"
}'{ "id": "gid://shopify/SubscriptionContract/123456789", "status": "ACTIVE", "nextBillingDate": "2024-03-01T00:00:00Z", "customer": { "id": "gid://shopify/Customer/987654321", "email": "customer@example.com" }, "deliveryMethod": { "__typename": "SubscriptionDeliveryMethodShipping", "address": { … } }, "deliveryPrice": { "amount": "7.99", "currencyCode": "USD" } }
Request
Updates the order note that will be added to all future orders generated by this subscription. Order notes help merchants track special instructions, customer preferences, or internal information about the subscription.
Key Features:
- Note is automatically added to all future recurring orders
- Visible in both merchant portal and customer portal
- Appears in Shopify order details for easy reference
- Changes apply to future orders only (existing orders unchanged) Common Use Cases:
- Customer preferences: "No nuts - severe allergy"
- Delivery instructions: "Leave package at side door"
- Gift messages: "Happy Birthday from Mom!"
- Internal notes: "VIP customer - priority handling"
- Processing instructions: "Include sample with each order"
Important Notes:
- Empty string clears the existing note
- No character limit imposed by API (check Shopify limits)
- HTML is not rendered - stored as plain text
- Updates are logged in activity history
- Note persists until explicitly changed
Order Generation: When Appstle creates recurring orders:
- Retrieves current order note from subscription
- Adds note to new Shopify order
- Note appears in order details immediately
- Merchants can still edit individual order notes
Authentication: Requires valid X-API-Key header
Note text to be added to all future orders. Can include special instructions, preferences, or internal notes. Pass empty string to clear existing note. HTML tags are not rendered - stored as plain text.
Delivery Instruction
Internal Note
Gift Message
Allergy Note
Clear Note
- https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-order-note/{contractId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-order-note/123456789?orderNote=string&api_key=string' \
-H 'X-API-Key: sk_live_1234567890abcdef'true