Generates a discount code for a subscription bundle. This endpoint creates a Shopify discount code that can be applied to bundle subscriptions, typically used during the checkout process.
Discount Code Generation:
Discount Configuration Options:
Use Cases:
Important Notes:
Authentication: Requires valid X-API-Key header
curl --request PUT \
--url https://subscription-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": "BUNDLE10",
"discountId": "gid://shopify/DiscountCodeNode/123456",
"discountType": "PERCENTAGE",
"discountValue": 10,
"expiresAt": "2024-12-31T23:59:59Z",
"usageLimit": 100,
"currentUsageCount": 0,
"active": true
}Documentation Index
Fetch the complete documentation index at: https://developers.appstle.com/llms.txt
Use this file to discover all available pages before exploring further.
curl --request PUT \
--url https://subscription-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": "BUNDLE10",
"discountId": "gid://shopify/DiscountCodeNode/123456",
"discountType": "PERCENTAGE",
"discountValue": 10,
"expiresAt": "2024-12-31T23:59:59Z",
"usageLimit": 100,
"currentUsageCount": 0,
"active": true
}