Hello,
I am trying to update some existing shipping rates using graphQL, but I keep getting an error saying : Profile is invalid: ID must be present during an update.
This is my code:
mutation {
deliveryProfileUpdate(
# Specify the delivery profile ID to update.
id: "gid://shopify/DeliveryProfile/84574077117"
profile: {
locationGroupsToUpdate: [
{
id: "gid://shopify/DeliveryLocationGroup/87830823101"
,
zonesToUpdate: {
id: "gid://shopify/DeliveryZone/386121531581"
methodDefinitionsToUpdate: [{
name: "Standard - Royal Mail Tracked 24"
rateDefinition: {price: { amount: 30, currencyCode: GBP } }
}
{
name: "Standard - Royal Mail Tracked 24"
rateDefinition: { price: { amount: 50, currencyCode: GBP } }
}
{
name: "Standard - Royal Mail Tracked 48"
rateDefinition: { price: { amount: 5.05, currencyCode: GBP } }
}
{
name: "Standard - Royal Mail Tracked 48"
rateDefinition: { price: { amount: 5.70, currencyCode: GBP } }
}
{
name: "Premium DHL/DPD Tracked 24"
rateDefinition: { price: { amount: 6.35, currencyCode: GBP } }
}
{
name: "Premium DHL/DPD Tracked 24"
rateDefinition: { price: { amount: 6.86, currencyCode: GBP } }
}
{
name: "Premium DHL/DPD Pre-Noon"
rateDefinition: { price: { amount: 11.16, currencyCode: GBP } }
}
]
}
}
]
}
) {
profile {
id
profileLocationGroups {
locationGroupZones(first: 5) {
edges {
node {
zone {
id
name
countries {
id
name
provinces {
id
name
code
}
}
}
}
}
}
}
}
userErrors {
field
message
}
}
}
I suspect there is something wrong with the methodDefitionsToUpdate, where I believe there needs to be an ID. However, I could not find anything online to be able to retrieve the method definition ID/
Thank you for your help