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
Retrieves detailed information about a specific product swap automation configuration. This endpoint returns complete details about the source products, destination products, swap triggers, and all associated settings.
Response Details:
- Complete swap configuration
- Source product variants with images and quantities
- Destination product variants with images and quantities
- Billing cycle triggers and conditions
- Discount carry-forward settings
- Email notification preferences
- Swap status and history
Source and Destination Variants: Both source and destination variants are returned as JSON strings containing:
- Variant ID
- Display name/title
- Product image URL
- Quantity to swap
- Product metadata
Swap Timing:
- forBillingCycle: If set, swap occurs at this specific cycle number
- checkForEveryRecurringOrder: If true, swap happens on every order
- updatedFirstOrder: If true, can affect the initial subscription order
Discount Handling:
- NONE: No discount carried forward
- PERCENTAGE: Percentage discount is maintained
- FIXED_AMOUNT: Fixed amount discount is maintained
- PRICE: Specific price point is maintained
Authentication: Requires valid X-API-Key header
- https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}' \
-H 'X-API-Key: string'{ "id": 0, "shop": "string", "sourceVariants": "string", "destinationVariants": "string", "updatedFirstOrder": true, "checkForEveryRecurringOrder": true, "name": "string", "changeNextOrderDateBy": 0, "forBillingCycle": 0, "carryDiscountForward": true, "ruleSequence": 0, "stopSwapEmails": true, "discountCarryForward": "NONE" }
Request
Permanently deletes a product swap automation configuration. Once deleted, the swap will no longer be applied to any subscription orders. Existing subscriptions that have already had products swapped are not affected.
Deletion Behavior:
- Permanently removes the swap automation
- Does not reverse past swaps that have already occurred
- Future orders will not have this swap applied
- Cannot be undone - swap configuration must be recreated if needed
Impact on Subscriptions:
- Active Subscriptions: Will continue with current products (no automatic reversion)
- Future Orders: Swap will not be applied
- Past Orders: Already swapped products remain unchanged
- Queued Swaps: Pending swaps for this automation are cancelled
When to Delete:
- Discontinuing a seasonal product rotation
- Removing outdated swap rules
- Cleaning up test or experimental swaps
- Product lines being discontinued
- Correcting misconfigured swaps
Important Notes:
- This operation is permanent and cannot be undone
- Consider deactivating instead of deleting if you might reuse the configuration
- Activity logs for past swaps are retained
- Customers are not automatically notified of swap deletion
Best Practices:
- Review affected subscriptions before deletion
- Consider communicating changes to affected customers
- Export swap configuration if you might need it later
- Use deactivation for temporary pauses instead of deletion
Authentication: Requires valid X-API-Key header
- https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}' \
-H 'X-API-Key: string'