curl -X POST http://localhost:3000/graphql_extension -H "authorization: #{token}" -d 'query=
mutation {
sellingPlanGroupCreate(
input: {
name: "Bill monthly"
merchantCode: "bill-monthly"
options: ["Delivery every"]
position: 1
sellingPlansToCreate: [
{
name: "Delivered every month"
options: "1 Month(s)"
position: 1
billingPolicy: { recurring: { interval: MONTH, intervalCount: 1, anchors: [{type: MONTHDAY, day: 2}] } }
deliveryPolicy: { recurring: { interval: MONTH, intervalCount: 1, anchors: [{type: MONTHDAY, day: 2}] } }
pricingPolicies: [
{
fixed: {
adjustmentType: PERCENTAGE
adjustmentValue: { percentage: 15.0 }
}
}
]
}
]
}
resources: { productIds: ["gid://shopify/Product/6211635085506"], productVariantIds: [] }
) {
sellingPlanGroup{
id
name
}
userErrors {
field
message
}
}
}'
curl -X POST \
"http://localhost:3000/graphql_extension" \
-H "authorization: #{token}" \
-d 'query=mutation {
sellingPlanGroupAddProducts(
id: "gid://shopify/SellingPlanGroup/60391618"
productIds: ["gid://shopify/Product/6211635085506"]
) {
sellingPlanGroup{id name}
userErrors {
field
message
}
}
}'
curl -X POST http://localhost:3000/graphql_extension -H "authorization: #{token}" -d 'query=
mutation {
sellingPlanGroupRemoveProducts(
id: "gid://shopify/SellingPlanGroup/73597122"
productIds: ["gid://shopify/Product/6211635085506"]
) {
removedProductIds
userErrors {
field
message
}
}
}'
curl -X POST http://localhost:3000/graphql_extension -H "authorization: #{token}" -d 'query=
mutation {
sellingPlanGroupUpdate(
input: {
name: "Bill monthly"
merchantCode: "bill-monthly"
}
id: "gid://shopify/SellingPlanGroup/95060162"
) {
sellingPlanGroup{
id
name
}
userErrors {
field
message
}
}
}'