Creates a new subscription contract by either splitting (moving) or duplicating selected line items from an existing contract. This endpoint allows you to divide a subscription into multiple contracts or create a copy with specific products.
Split vs Duplicate Mode:
Important Notes:
Use Cases:
Authentication: Requires valid X-API-Key header
curl --request POST \
--url https://www.myshop.com/apps/subscriptions/cp/api/subscription-contract-details/split-existing-contract \
--header 'Content-Type: application/json' \
--data '[
"<string>"
]'{
"id": "gid://shopify/SubscriptionContract/987654321",
"status": "ACTIVE",
"nextBillingDate": "2024-02-15T00:00:00Z",
"originOrder": {
"id": "gid://shopify/Order/123456789"
},
"customer": {
"id": "gid://shopify/Customer/111111",
"email": "customer@example.com"
},
"billingPolicy": {
"interval": "MONTH",
"intervalCount": 1
},
"deliveryPolicy": {
"interval": "MONTH",
"intervalCount": 1
},
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/222222",
"quantity": 2,
"variantId": "gid://shopify/ProductVariant/333333",
"title": "Premium Coffee - Medium Roast",
"currentPrice": {
"amount": "29.99",
"currencyCode": "USD"
}
}
}
]
},
"customAttributes": [
{
"key": "_origin_type",
"value": "SPLIT_CONTRACT"
},
{
"key": "_original_contract_id",
"value": "123456789"
}
]
}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.
Contract successfully split/duplicated
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN Show child attributes
SUCCEEDED, FAILED, $UNKNOWN Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
curl --request POST \
--url https://www.myshop.com/apps/subscriptions/cp/api/subscription-contract-details/split-existing-contract \
--header 'Content-Type: application/json' \
--data '[
"<string>"
]'{
"id": "gid://shopify/SubscriptionContract/987654321",
"status": "ACTIVE",
"nextBillingDate": "2024-02-15T00:00:00Z",
"originOrder": {
"id": "gid://shopify/Order/123456789"
},
"customer": {
"id": "gid://shopify/Customer/111111",
"email": "customer@example.com"
},
"billingPolicy": {
"interval": "MONTH",
"intervalCount": 1
},
"deliveryPolicy": {
"interval": "MONTH",
"intervalCount": 1
},
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/222222",
"quantity": 2,
"variantId": "gid://shopify/ProductVariant/333333",
"title": "Premium Coffee - Medium Roast",
"currentPrice": {
"amount": "29.99",
"currencyCode": "USD"
}
}
}
]
},
"customAttributes": [
{
"key": "_origin_type",
"value": "SPLIT_CONTRACT"
},
{
"key": "_original_contract_id",
"value": "123456789"
}
]
}