Skip to main content
POST
/
subscriptions
/
cp
/
api
/
subscription-contract-details
/
split-existing-contract
Split or duplicate an existing subscription contract
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.

Query Parameters

contractId
integer<int64>
required
isSplitContract
boolean
default:false
attemptBilling
boolean
default:false

Body

application/json

Response

Contract successfully split/duplicated

get__typename
string
id
string
createdAt
object
updatedAt
object
nextBillingDate
object
status
enum<string>
Available options:
ACTIVE,
PAUSED,
CANCELLED,
EXPIRED,
FAILED,
$UNKNOWN
deliveryPrice
object
lastPaymentStatus
enum<string>
Available options:
SUCCEEDED,
FAILED,
$UNKNOWN
billingPolicy
object
deliveryPolicy
object
lines
object
customerPaymentMethod
object
deliveryMethod
object
originOrder
object
customer
object
discounts
object
note
string
customAttributes
object[]
billingAttempts
object