Creates a Shopify discount code specifically for a subscription bundle. This endpoint generates unique, single-use or multi-use discount codes tied to bundle purchases.
Key Features:
Discount Configuration:
Use Cases:
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
curl --request PUT \
--url https://membership-admin.appstle.com/api/external/v2/subscription-bundlings/discount/{token} \
--header 'Content-Type: application/json' \
--data '
{
"cart": {
"token": "<string>",
"note": {},
"attributes": {},
"original_total_price": 123,
"total_price": 123,
"total_discount": 123,
"total_weight": 123,
"item_count": 123,
"items": [
{
"id": 123,
"properties": {},
"quantity": 123,
"variant_id": 123,
"key": "<string>",
"title": "<string>",
"price": 123,
"original_price": 123,
"discounted_price": 123,
"line_price": 123,
"original_line_price": 123,
"total_discount": 123,
"discounts": [
{}
],
"sku": "<string>",
"grams": 123,
"vendor": "<string>",
"taxable": true,
"product_id": 123,
"product_has_only_default_variant": true,
"gift_card": true,
"final_price": 123,
"final_line_price": 123,
"url": "<string>",
"featured_image": {
"aspect_ratio": 123,
"alt": "<string>",
"height": 123,
"url": "<string>",
"width": 123
},
"image": "<string>",
"handle": "<string>",
"requires_shipping": true,
"product_type": "<string>",
"product_title": "<string>",
"product_description": "<string>",
"variant_title": {},
"variant_options": [
"<string>"
],
"options_with_values": [
{
"name": "<string>",
"value": "<string>"
}
],
"line_level_discount_allocations": [
{}
],
"line_level_total_discount": 123
}
],
"requires_shipping": true,
"currency": "<string>",
"items_subtotal_price": 123,
"cart_level_discount_applications": [
{}
]
}
}
'{
"discountCode": "<string>",
"errorMessage": "<string>",
"discountNeeded": true
}Documentation Index
Fetch the complete documentation index at: https://appstleinc-aeca3e0a.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bundle token identifier
API Key (Deprecated - Use Header X-API-Key instead)
Discount code configuration including code, value, type, and validity
Show child attributes
curl --request PUT \
--url https://membership-admin.appstle.com/api/external/v2/subscription-bundlings/discount/{token} \
--header 'Content-Type: application/json' \
--data '
{
"cart": {
"token": "<string>",
"note": {},
"attributes": {},
"original_total_price": 123,
"total_price": 123,
"total_discount": 123,
"total_weight": 123,
"item_count": 123,
"items": [
{
"id": 123,
"properties": {},
"quantity": 123,
"variant_id": 123,
"key": "<string>",
"title": "<string>",
"price": 123,
"original_price": 123,
"discounted_price": 123,
"line_price": 123,
"original_line_price": 123,
"total_discount": 123,
"discounts": [
{}
],
"sku": "<string>",
"grams": 123,
"vendor": "<string>",
"taxable": true,
"product_id": 123,
"product_has_only_default_variant": true,
"gift_card": true,
"final_price": 123,
"final_line_price": 123,
"url": "<string>",
"featured_image": {
"aspect_ratio": 123,
"alt": "<string>",
"height": 123,
"url": "<string>",
"width": 123
},
"image": "<string>",
"handle": "<string>",
"requires_shipping": true,
"product_type": "<string>",
"product_title": "<string>",
"product_description": "<string>",
"variant_title": {},
"variant_options": [
"<string>"
],
"options_with_values": [
{
"name": "<string>",
"value": "<string>"
}
],
"line_level_discount_allocations": [
{}
],
"line_level_total_discount": 123
}
],
"requires_shipping": true,
"currency": "<string>",
"items_subtotal_price": 123,
"cart_level_discount_applications": [
{}
]
}
}
'{
"discountCode": "<string>",
"errorMessage": "<string>",
"discountNeeded": true
}