Skip to main content

customerSubscriptionContractAddSubscriptionLine

顧客向け定期購買契約の商品追加

customerSubscriptionContractAddSubscriptionLine(
subscriptionContractId: String!
customerId: String!
variantId: String!
planId: String!
quantity: Int!
customAttributes: [SubscriptionLineCustomAttributeInput!]
): [ResultCustomerSubscriptionContractAddSubscriptionLine!]

Arguments

customerSubscriptionContractAddSubscriptionLine.subscriptionContractId ● String! non-null scalar

契約情報のShopify管理ID ※必須

  • 説明: 処理対象契約の globally-unique ID.
  • 例: "gid://shopify/SubscriptionContract/123456789"

customerSubscriptionContractAddSubscriptionLine.customerId ● String! non-null scalar

顧客ID ※必須

  • 説明: 処理対象顧客の globally-unique ID.
  • 例: "gid://shopify/Customer/123456789"

customerSubscriptionContractAddSubscriptionLine.variantId ● String! non-null scalar

商品バリエーションID ※必須

  • 説明: 処理対象商品バリエーションの globally-unique ID.
  • 例: "gid://shopify/ProductVariant/123456789"

customerSubscriptionContractAddSubscriptionLine.planId ● String! non-null scalar

プランID ※必須

  • 説明: 処理対象プランの globally-unique ID.
  • 例: "gid://shopify/SellingPlan/123456789"

customerSubscriptionContractAddSubscriptionLine.quantity ● Int! non-null scalar

数量 ※必須

  • 説明: 追加する商品の数量
  • 例: 1

customerSubscriptionContractAddSubscriptionLine.customAttributes ● [SubscriptionLineCustomAttributeInput!] list input

カスタム属性

  • 説明: 追加する商品のカスタム属性
  • 例: [{key: "custom_attribute_key", value: "custom_attribute_value"}]

Type

ResultCustomerSubscriptionContractAddSubscriptionLine object

顧客向け定期購買契約の商品追加

Example

mutation {
customerSubscriptionContractAddSubscriptionLine(
subscriptionContractId: "gid://shopify/SubscriptionContract/123456789"
customerId: "gid://shopify/Customer/123456789"
variantId: "gid://shopify/ProductVariant/123456789"
planId: "gid://shopify/SellingPlan/123456789"
quantity: 1
customAttributes: [{key: "custom_attribute_key", value: "custom_attribute_value"}]
) {
lineId
productId
variantId
title
variantTitle
sku
variantImage
quantity
currentPriceAmount
currentPriceCurrencyCode
lineDiscountedPriceAmount
lineDiscountedPriceCurrencyCode
onlineStorePreviewUrl
}
}