Hi, I’m attempting to manage and change the shipping zone and rate for a Shipping Profile. My GraphQL query looks like this:
mutation {
deliveryProfileUpdate(
id: "{dp_id}",
profile: {
locationGroupsToUpdate: [{
zonesToUpdate: [{
countries: [{
code: US
provinces: [{code: "AK"},
{code: "AS"},
{code: "GU"},
{code: "HI"},
{code: "MP"},
{code: "PR"},
{code: "VI"},
{code: "FM"},
{code: "PW"},
{code: "MH"},
{code: "AA"},
{code: "AE"},
{code: "AP"
}]
}]
}]
}]
}
)
{
profile {
id
}
userErrors {
field
message
}
}
}
The response I print out is the following:
{"data":{"deliveryProfileUpdate":{"profile":null,"userErrors":[{"field":null,"message":"Profile is invalid: ID must be present during an update."}]}},"extensions":{"cost":{"requestedQueryCost":10,"actualQueryCost":10,"throttleStatus":{"maximumAvailable":100
0.0,"currentlyAvailable":990,"restoreRate":50.0}}}}
And the GID I pass in the query is this:
"gid://shopify/DeliveryProfile/75937513680"
What I’m trying to do is remove the states in the provinces
list from the already existing “Domestic” shipping profile. Why am I getting an ID error? Am I even using the correct query/fields to update a DeliveryProfile
’s zones? I’d appreciate any insight.