Hello I am trying to create multiple shipping zones with their respective rates via graphQL. This is what I have :
mutation {
deliveryProfileUpdate(
# Specify the delivery profile ID to update.
id: "gid://shopify/DeliveryProfile/102925435191"
profile: {
locationGroupsToCreate: {
locations: "gid://shopify/Location/82401394999"
# Create a delivery zone.
zonesToCreate: [{
name: "UK Domestic"
# Add countries to the delivery zone.
countries: [{ code: GB, provinces : [
{
code: "NIR"
}]
}],
methodDefinitionsToCreate: [{
name: "Standard - Royal Mail Tracked 24"
rateDefinition: { price: { amount: 5.70, currencyCode: GBP } }
weightConditionsToCreate: [ {
criteria: {
unit: GRAMS,
value: 0,
},
operator: GREATER_THAN_OR_EQUAL_TO
},
{
criteria: {
unit: GRAMS,
value: 1000,
},
operator: LESS_THAN_OR_EQUAL_TO
} ]
}
]
},
{
name: "UK Domestic"
# Add countries to the delivery zone.
countries: [{ code: IE
}],
methodDefinitionsToCreate: [{
name: "testest"
rateDefinition: { price: { amount: 10.70, currencyCode: GBP } }
weightConditionsToCreate: [ {
criteria: {
unit: GRAMS,
value: 0,
},
operator: GREATER_THAN_OR_EQUAL_TO
},
{
criteria: {
unit: GRAMS,
value: 1000,
},
operator: LESS_THAN_OR_EQUAL_TO
} ]
}
]
}
]
}
}
) {
profile {
id
profileLocationGroups {
locationGroupZones(first: 5) {
edges {
node {
zone {
id
name
countries {
id
name
provinces {
id
name
code
}
}
}
}
}
}
}
}
}
}
When I run it, it does not return any error, however it does not create what I want. Thank you very much for your help