将订购免费送货折扣添加到订购草稿中-subscriptionDraftFreeShippingDiscountAdd mutation
将订购免费送货折扣添加到订购草稿中。
所需的访问
write_own_subscription_contracts 访问范围。
在本页面
互动范例
这是一个示例变异查询。使用下面的嵌入式交互式工具来编辑查询。
提示:使用Ctrl+Space表示自动填充字段。
突变subscriptionDraftFreeShippingDiscountAdd ($ draftId :ID !,$ input :SubscriptionFreeShippingDiscountInput !){ subscriptionDraftFreeShippingDiscountAdd (draftId :$ draftId ,input :$ input ){} } { “ draftId” :“ Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE =” , “输入” :{} }
<font style="color:#1F61A0;">discountAdded </font><font style="color:#555555;">{</font><font style="color:#1F61A0;">ID</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">草稿</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;">代码</font><font style="color:#1F61A0;">场地</font><font style="color:#1F61A0;">信息</font><font style="color:#555555;">}</font>
争论
SubscriptionFreeShippingDiscountInput字段
- recurringCycleLimit(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
订阅免费送货折扣将应用于订单的最大次数。 - 标题(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
与订阅免费送货折扣关联的标题。 
返回字段
- discountAdded(
[SubscriptionManualDiscount](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionmanualdiscount))
额外的订阅免费送货折扣。 - 草稿(
[SubscriptionDraft](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondraft))
订阅合同草稿对象。 - userErrors(
[[SubscriptionDraftUserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondraftusererror))
执行突变时发生的错误列表。 
