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.
External APIs (0.0.1)
Request
Creates a new shipping or delivery profile for subscription orders using the V2 request format. This version provides enhanced configuration options for delivery methods, zones, and pricing.
Enhancements in V2:
- Improved zone configuration
- Better support for multiple delivery methods
- Enhanced rate definition capabilities
- Support for conditional delivery rates
Key Features:
- Define custom shipping rates per zone
- Configure local delivery options
- Set up local pickup methods
- Manage shipping zones and countries
- Assign profiles to specific products or variants
Authentication: Requires valid X-API-Key header
- https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/v2/create-shipping-profile
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/v2/create-shipping-profile?api_key=string' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"name": "string",
"locationInfos": [
{
"locationId": "string",
"countryInfos": [
{
"shouldIncludeAllProvince": true,
"code": "string",
"deliveryMethodInfo": [
{
"amount": 0.1,
"currencyCode": "USD",
"carrierServiceId": "string",
"name": "string",
"carrierRate": true,
"deliveryConditionType": "string",
"priceConditions": [
null
],
"weightConditions": [
null
]
}
],
"restOfWorld": true,
"provinceCode": "string"
}
]
}
],
"id": "string"
}'{ "id": 0, "shop": "string", "deliveryProfileId": "string", "sellerGroupIds": [ "string" ], "name": "string" }
Request
Creates a new shipping or delivery profile for subscription orders. This endpoint allows you to configure custom shipping rates, delivery methods, and shipping zones for your subscription products. Delivery profiles control how subscription products are shipped to customers.
Key Features:
- Define custom shipping rates per zone
- Configure local delivery options
- Set up local pickup methods
- Manage shipping zones and countries
- Assign profiles to specific products or variants
Delivery Method Types:
- SHIPPING: Standard shipping with carrier rates or custom rates
- LOCAL_DELIVERY: Local delivery service within specific areas
- PICKUP: Customer pickup from store locations
Important Notes:
- Each delivery profile must have a unique name
- At least one delivery method is required
- Shipping rates can be set per zone and per weight/price range
- Profiles can be assigned to subscription products to control their shipping behavior
Authentication: Requires valid X-API-Key header
- https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/create-shipping-profile
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://subscription-admin.appstle.com/api/external/v2/delivery-profiles/create-shipping-profile?api_key=string' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"name": "string",
"id": 0,
"deliveryMethodInfo": [
{
"amount": 0.1,
"currencyCode": "USD",
"carrierServiceId": "string",
"name": "string",
"carrierRate": true,
"deliveryConditionType": "string",
"priceConditions": [
{
"amount": 0.1,
"deliverCondtion": "string"
}
],
"weightConditions": [
{
"deliveryCondition": "string",
"weight": 0.1,
"weightUnit": "string"
}
]
}
],
"countryInfos": [
{
"code": "string",
"restOfWorld": true,
"provinceCode": "string",
"shouldIncludeAllProvince": true
}
],
"locationInfos": [
{
"locationId": "string",
"countryInfos": [
{
"shouldIncludeAllProvince": true,
"code": "string",
"deliveryMethodInfo": [
{
"amount": 0.1,
"currencyCode": "USD",
"carrierServiceId": "string",
"name": "string",
"carrierRate": true,
"deliveryConditionType": "string",
"priceConditions": [
null
],
"weightConditions": [
null
]
}
],
"restOfWorld": true,
"provinceCode": "string"
}
]
}
],
"restOfWorld": true
}'{ "id": "12345", "shop": "example-shop.myshopify.com", "name": "Standard Subscription Shipping", "shopifyDeliveryProfileId": "gid://shopify/DeliveryProfile/67890", "default": false, "locationGroupsCount": 1, "productsCount": 15, "profileLocationGroups": [ { … } ] }
Request
Replaces old product variants with new product variants across multiple subscription contracts in bulk. This powerful operation allows merchants to update products in active subscriptions when products are discontinued, reformulated, or repackaged.
What is Product Replacement? Product replacement updates the products in active subscriptions by swapping out old variant IDs with new variant IDs. This is commonly needed when:
- Products are discontinued and replaced with new versions
- Product packaging changes (size, quantity)
- Product reformulations or recipe updates
- SKU consolidation or reorganization
- Seasonal product variations
- Price structure changes
Key Features:
- Bulk Operation: Update thousands of subscriptions simultaneously
- Multi-Variant Support: Replace multiple old variants with new ones in single request
- Flexible Mapping: One-to-one, many-to-one, or one-to-many variant replacements
- Selective or Universal: Target specific subscriptions or all subscriptions
- Asynchronous Processing: Large batches processed in background
- Price Preservation Options: Maintain existing subscription pricing or update to new prices
- Activity Logging: All replacements are logged for audit trail
Operation Modes:
- Specific Subscriptions: Provide subscription contract IDs to update only those subscriptions
- All Subscriptions: Set allSubscriptions=true to replace products in ALL active subscriptions containing the old variants
How It Works:
- Identify old variant IDs that need to be replaced
- Identify new variant IDs that will replace them
- Optionally specify which subscriptions to update (or use allSubscriptions=true)
- Submit the bulk replacement request
- System validates all variant IDs exist and are accessible
- Bulk automation task is created and queued
- Each subscription is updated with new variants
- Customers receive updated subscription details
- Next orders will include the new products
Variant ID Mapping: The replacement supports flexible mapping between old and new variants:
One-to-One Replacement:
{
"oldVariantIds": [111111],
"newVariantIds": [222222]
}Old variant 111111 is replaced with new variant 222222
Multiple Variants Replacement:
{
"oldVariantIds": [111111, 333333, 555555],
"newVariantIds": [222222, 444444, 666666]
}Each old variant is replaced with its corresponding new variant (by position)
Request Structure:
{
"subscriptionIds": [
"gid://shopify/SubscriptionContract/123456",
"gid://shopify/SubscriptionContract/123457"
]
}Query Parameters:
api_key(required): Your API authentication keyallSubscriptions(optional): Set to true to update all subscriptions, false/omit to update only specified IDsnewVariantIds(required): Comma-separated list of new variant IDs (e.g., 222222,444444,666666)oldVariantIds(required): Comma-separated list of old variant IDs to replace (e.g., 111111,333333,555555)
Use Cases:
1. Product Discontinuation: When a product is being discontinued:
- Identify replacement product
- Map old variant IDs to new variant IDs
- Update all subscriptions containing the old product
- Notify customers of the change
2. Packaging Updates: When product packaging changes (e.g., 10oz to 12oz):
- Create new variant for new package size
- Replace old variant across subscriptions
- Adjust pricing if needed
3. Product Reformulation: When product recipes or formulas change:
- Create new product variant for reformulated version
- Bulk replace old formula with new formula
- Maintain customer subscription frequency and pricing
4. SKU Consolidation: When consolidating multiple variants into a single SKU:
- Map multiple old variant IDs to single new variant ID
- Update all affected subscriptions
- Simplify inventory management
5. Seasonal Product Rotation: For seasonal subscription boxes:
- Replace summer variants with fall variants
- Update all active seasonal subscriptions
- Maintain subscription continuity
Important Considerations:
- Pricing Impact: New variants may have different prices - verify pricing strategy
- Inventory Levels: Ensure adequate inventory for new variants
- Customer Communication: Consider notifying customers before replacement
- Variant Compatibility: New variants should be appropriate replacements
- One Operation at a Time: Only one bulk operation can run per shop simultaneously
- Irreversible: Product replacements cannot be automatically undone (must be manually reversed)
- Subscription Contract IDs: Must use Shopify GraphQL ID format
Processing Time:
- Small batches (<100 subscriptions): Seconds to minutes
- Medium batches (100-1000): Minutes
- Large batches (>1000): Minutes to hours
- Processing time depends on number of subscriptions and line items
Best Practices:
- Test First: Test with a small subset of subscriptions before bulk operation
- Verify Variants: Confirm all variant IDs are correct and products are active
- Check Inventory: Ensure sufficient stock of new variants
- Customer Communication: Notify affected customers about product changes
- Price Review: Review and confirm pricing for new variants
- Backup Data: Export subscription data before making bulk changes
- Monitor Progress: Track bulk operation status to completion
- Audit Trail: Document reason for replacement for future reference
Error Scenarios:
- Another bulk operation running: 400 error
- Invalid variant IDs: Operation may fail or skip invalid variants
- Mismatched array lengths: Ensure oldVariantIds and newVariantIds have same count
- Product not found: Variants must exist in your Shopify store
- Unauthorized access: Can only modify subscriptions belonging to your shop
Customer Impact:
- Next subscription order will contain new products
- Previous orders are not affected
- Subscription price may change if new variant has different price
- Customer portal reflects the new product immediately
- Subscription frequency and schedule remain unchanged
Authentication: Requires valid api_key parameter (X-API-Key header support coming soon)
- https://subscription-admin.appstle.com/api/external/v2/bulk-automations/replace-product
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://subscription-admin.appstle.com/api/external/v2/bulk-automations/replace-product?api_key=string&allSubscriptions=true&newVariantIds=0&oldVariantIds=0' \
-H 'Content-Type: application/json' \
-d '{
"subscriptionIds": "string"
}'{}