Add Product to Existing Subscription

Solved
PaulVomberg
Tourist
13 0 0

Is it possible to add a product to an existing subscription? If so, what's the API call to make that happen? 

Accepted Solution (1)

Accepted Solutions
Brian_S
Shopify Partner
29 3 11

This is an accepted solution.

Yes - you can add lines to a SubscriptionContract:

  1. First you'll get a SubscriptionDraft Id via subscriptionContractUpdate: https://shopify.dev/api/admin-graphql/2021-10/mutations/subscriptioncontractupdate
  2. Then you add a line via subscriptionDraftLineAdd: https://shopify.dev/api/admin-graphql/2021-10/mutations/subscriptionDraftLineAdd
  3. Then you commit your draft via subscriptionDraftCommit: https://shopify.dev/api/admin-graphql/2021-10/mutations/subscriptionDraftCommit

 

Check out this tutorialhttps://shopify.dev/apps/subscriptions/contracts#add-a-line-to-the-subscription-draft

 

Brian Singer
CTO & Cofounder of Subscription Startup - Awtomatic
awtomatic.app

View solution in original post

Replies 2 (2)
Brian_S
Shopify Partner
29 3 11

This is an accepted solution.

Yes - you can add lines to a SubscriptionContract:

  1. First you'll get a SubscriptionDraft Id via subscriptionContractUpdate: https://shopify.dev/api/admin-graphql/2021-10/mutations/subscriptioncontractupdate
  2. Then you add a line via subscriptionDraftLineAdd: https://shopify.dev/api/admin-graphql/2021-10/mutations/subscriptionDraftLineAdd
  3. Then you commit your draft via subscriptionDraftCommit: https://shopify.dev/api/admin-graphql/2021-10/mutations/subscriptionDraftCommit

 

Check out this tutorialhttps://shopify.dev/apps/subscriptions/contracts#add-a-line-to-the-subscription-draft

 

Brian Singer
CTO & Cofounder of Subscription Startup - Awtomatic
awtomatic.app

View solution in original post

PaulVomberg
Tourist
13 0 0

That's great - thank you so much Brian!