subscriptionDraftCommit mutation
Commits the updates of a Subscription Contract draft.
Required access
write_own_subscription_contracts access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
mutation subscriptionDraftCommit($draftId: ID!) { subscriptionDraftCommit(draftId: $draftId) {} } { “draftId”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=” }
<font style="color:#1F61A0;">contract</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">id</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">code</font><font style="color:#1F61A0;">field</font><font style="color:#1F61A0;">message</font><font style="color:#555555;">}</font>
Arguments
| Argument | Description | 
|---|---|
draftId( [ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)) REQUIRED  | 
The gid of the Subscription Contract draft to commit. | 
Return fields
- contract (
[SubscriptionContract](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontract))
The updated Subscription Contract object. - userErrors (
[[SubscriptionDraftUserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondraftusererror))
List of errors that occurred executing the mutation. 
