delivery Profile Updatemutation
mutation
2024-10latest
Requires Any of shipping
access scopes or manage
user permission.
Update a delivery profile.
Arguments
The ID of the delivery profile to update.
Anchor to leaveLegacyModeProfilesleaveLegacyModeProfilesWhether this delivery profile should leave legacy mode.
Specifies the input fields for a delivery profile.
Was this section helpful?
DeliveryProfileUpdatePayload returns
The delivery profile that was updated.
The list of errors that occurred from executing the mutation.
Was this section helpful?
Code examples for MUTATION: deliveryProfileUpdate
Query Reference for MUTATION: deliveryProfileUpdate
"mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n # DeliveryProfile fields\n }\n userErrors {\n field\n message\n }\n }\n}"
Input Reference for MUTATION: deliveryProfileUpdate
"{\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"leaveLegacyModeProfiles\": true,\n \"profile\": {\n \"conditionsToDelete\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"locationGroupsToCreate\": [\n {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"locations\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"locationsToAdd\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"locationsToRemove\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"zonesToCreate\": [\n {\n \"countries\": [\n {\n \"code\": \"AC\",\n \"includeAllProvinces\": true,\n \"provinces\": [\n {\n \"code\": \"<your-code>\"\n }\n ],\n \"restOfWorld\": true\n }\n ],\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"methodDefinitionsToCreate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"methodDefinitionsToUpdate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"name\": \"<your-name>\"\n }\n ],\n \"zonesToUpdate\": [\n {\n \"countries\": [\n {\n \"code\": \"AC\",\n \"includeAllProvinces\": true,\n \"provinces\": [\n {\n \"code\": \"<your-code>\"\n }\n ],\n \"restOfWorld\": true\n }\n ],\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"methodDefinitionsToCreate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"methodDefinitionsToUpdate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"name\": \"<your-name>\"\n }\n ]\n }\n ],\n \"locationGroupsToDelete\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"locationGroupsToUpdate\": [\n {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"locations\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"locationsToAdd\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"locationsToRemove\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"zonesToCreate\": [\n {\n \"countries\": [\n {\n \"code\": \"AC\",\n \"includeAllProvinces\": true,\n \"provinces\": [\n {\n \"code\": \"<your-code>\"\n }\n ],\n \"restOfWorld\": true\n }\n ],\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"methodDefinitionsToCreate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"methodDefinitionsToUpdate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"name\": \"<your-name>\"\n }\n ],\n \"zonesToUpdate\": [\n {\n \"countries\": [\n {\n \"code\": \"AC\",\n \"includeAllProvinces\": true,\n \"provinces\": [\n {\n \"code\": \"<your-code>\"\n }\n ],\n \"restOfWorld\": true\n }\n ],\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"methodDefinitionsToCreate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"methodDefinitionsToUpdate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"name\": \"<your-name>\"\n }\n ]\n }\n ],\n \"methodDefinitionsToDelete\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"name\": \"<your-name>\",\n \"profileLocationGroups\": [\n {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"locations\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"locationsToAdd\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"locationsToRemove\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"zonesToCreate\": [\n {\n \"countries\": [\n {\n \"code\": \"AC\",\n \"includeAllProvinces\": true,\n \"provinces\": [\n {\n \"code\": \"<your-code>\"\n }\n ],\n \"restOfWorld\": true\n }\n ],\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"methodDefinitionsToCreate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"methodDefinitionsToUpdate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"name\": \"<your-name>\"\n }\n ],\n \"zonesToUpdate\": [\n {\n \"countries\": [\n {\n \"code\": \"AC\",\n \"includeAllProvinces\": true,\n \"provinces\": [\n {\n \"code\": \"<your-code>\"\n }\n ],\n \"restOfWorld\": true\n }\n ],\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"methodDefinitionsToCreate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"methodDefinitionsToUpdate\": [\n {\n \"active\": true,\n \"conditionsToUpdate\": [\n {\n \"criteria\": 1.1,\n \"criteriaUnit\": \"<your-criteriaUnit>\",\n \"field\": \"TOTAL_PRICE\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"description\": \"<your-description>\",\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"name\": \"<your-name>\",\n \"participant\": {\n \"adaptToNewServices\": true,\n \"carrierServiceId\": \"gid://shopify/<objectName>/10079785100\",\n \"fixedFee\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"participantServices\": [\n {\n \"active\": true,\n \"name\": \"<your-name>\"\n }\n ],\n \"percentageOfRateFee\": 1.1\n },\n \"priceConditionsToCreate\": [\n {\n \"criteria\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ],\n \"rateDefinition\": {\n \"id\": \"gid://shopify/<objectName>/10079785100\",\n \"price\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"weightConditionsToCreate\": [\n {\n \"criteria\": {\n \"unit\": \"GRAMS\",\n \"value\": 1.1\n },\n \"operator\": \"GREATER_THAN_OR_EQUAL_TO\"\n }\n ]\n }\n ],\n \"name\": \"<your-name>\"\n }\n ]\n }\n ],\n \"sellingPlanGroupsToAssociate\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"sellingPlanGroupsToDissociate\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"variantsToAssociate\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"variantsToDissociate\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"zonesToDelete\": [\n \"gid://shopify/<objectName>/10079785100\"\n ]\n }\n}"
Schema Reference for MUTATION: deliveryProfileUpdate
"input DeliveryProfileInput {\n conditionsToDelete: [ID!]\n locationGroupsToCreate: [DeliveryProfileLocationGroupInput!]\n locationGroupsToDelete: [ID!]\n locationGroupsToUpdate: [DeliveryProfileLocationGroupInput!]\n methodDefinitionsToDelete: [ID!]\n name: String\n profileLocationGroups: [DeliveryProfileLocationGroupInput!]\n sellingPlanGroupsToAssociate: [ID!]\n sellingPlanGroupsToDissociate: [ID!]\n variantsToAssociate: [ID!]\n variantsToDissociate: [ID!]\n zonesToDelete: [ID!]\n}\n\ninput DeliveryProfileLocationGroupInput {\n id: ID\n locations: [ID!]\n locationsToAdd: [ID!]\n locationsToRemove: [ID!]\n zonesToCreate: [DeliveryLocationGroupZoneInput!]\n zonesToUpdate: [DeliveryLocationGroupZoneInput!]\n}\n"
Display Examples for MUTATION: deliveryProfileUpdate
[ { "example": { "type_name": "deliveryprofileupdate", "title": "Update delivery profile to add a location and a zone to an existing group ", "description": "Given a delivery profile with a location group for shipping from locations in Canada,\ngroup is updated to include shipping from a warehouse in Ottawa.\nThe group is also updated to allow shipping to a United States zone.\n\n**Note:** due to the potential complexity of the nested data, it is recommended to update no more than 5 groups per each request.\n", "query_string": "mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n}", "query_arguments": { "id": "$id", "profile": "$profile" }, "variables": { "id": "gid://shopify/DeliveryProfile/593363170", "profile": { "name": "Sample Updated Delivery Profile", "locationGroupsToUpdate": [ { "id": "gid://shopify/DeliveryLocationGroup/955592432", "locationsToAdd": [ "gid://shopify/Location/884687543" ], "zonesToCreate": [ { "name": "USA Zone", "countries": { "code": "US", "provinces": [ { "code": "CO" } ] }, "methodDefinitionsToCreate": [ { "name": "Standard", "rateDefinition": { "price": { "amount": 1, "currencyCode": "USD" } } } ] } ] } ] } }, "response": { "data": { "deliveryProfileUpdate": { "profile": { "id": "gid://shopify/DeliveryProfile/593363170", "name": "Sample Updated Delivery Profile", "profileLocationGroups": [ { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/955592432", "locations": { "nodes": [ { "name": "Ottawa Store", "address": { "country": "Canada" } }, { "name": "Ottawa Warehouse", "address": { "country": "Canada" } }, { "name": "Shipping Origin", "address": { "country": "Canada" } } ] } }, "locationGroupZones": { "edges": [ { "node": { "zone": { "id": "gid://shopify/DeliveryZone/161697132", "name": "Canada", "countries": [ { "code": { "countryCode": "CA" }, "provinces": [ { "code": "ON" } ] } ] } } }, { "node": { "zone": { "id": "gid://shopify/DeliveryZone/1066475777", "name": "USA Zone", "countries": [ { "code": { "countryCode": "US" }, "provinces": [ { "code": "CO" } ] } ] } } } ] } } ] }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/delivery/test/unit/graph_api/admin/delivery/mutations/profile_update_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) { deliveryProfileUpdate(id: $id, profile: $profile) { profile { id name profileLocationGroups { locationGroup { id locations(first: 5) { nodes { name address { country } } } } locationGroupZones(first: 2) { edges { node { zone { id name countries { code { countryCode } provinces { code } } } } } } } } userErrors { field message } } }\",\n \"variables\": {\n \"id\": \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\": {\n \"name\": \"Sample Updated Delivery Profile\",\n \"locationGroupsToUpdate\": [\n {\n \"id\": \"gid://shopify/DeliveryLocationGroup/955592432\",\n \"locationsToAdd\": [\n \"gid://shopify/Location/884687543\"\n ],\n \"zonesToCreate\": [\n {\n \"name\": \"USA Zone\",\n \"countries\": {\n \"code\": \"US\",\n \"provinces\": [\n {\n \"code\": \"CO\"\n }\n ]\n },\n \"methodDefinitionsToCreate\": [\n {\n \"name\": \"Standard\",\n \"rateDefinition\": {\n \"price\": {\n \"amount\": 1.0,\n \"currencyCode\": \"USD\"\n }\n }\n }\n ]\n }\n ]\n }\n ]\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"id\": \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\": {\n \"name\": \"Sample Updated Delivery Profile\",\n \"locationGroupsToUpdate\": [\n {\n \"id\": \"gid://shopify/DeliveryLocationGroup/955592432\",\n \"locationsToAdd\": [\n \"gid://shopify/Location/884687543\"\n ],\n \"zonesToCreate\": [\n {\n \"name\": \"USA Zone\",\n \"countries\": {\n \"code\": \"US\",\n \"provinces\": [\n {\n \"code\": \"CO\"\n }\n ]\n },\n \"methodDefinitionsToCreate\": [\n {\n \"name\": \"Standard\",\n \"rateDefinition\": {\n \"price\": {\n \"amount\": 1.0,\n \"currencyCode\": \"USD\"\n }\n }\n }\n ]\n }\n ]\n }\n ]\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"id\": \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\": {\n \"name\": \"Sample Updated Delivery Profile\",\n \"locationGroupsToUpdate\": [{\"id\"=>\"gid://shopify/DeliveryLocationGroup/955592432\", \"locationsToAdd\"=>[\"gid://shopify/Location/884687543\"], \"zonesToCreate\"=>[{\"name\"=>\"USA Zone\", \"countries\"=>{\"code\"=>\"US\", \"provinces\"=>[{\"code\"=>\"CO\"}]}, \"methodDefinitionsToCreate\"=>[{\"name\"=>\"Standard\", \"rateDefinition\"=>{\"price\"=>{\"amount\"=>1.0, \"currencyCode\"=>\"USD\"}}}]}]}]\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"id\": \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\": {\n \"name\": \"Sample Updated Delivery Profile\",\n \"locationGroupsToUpdate\": [\n {\n \"id\": \"gid://shopify/DeliveryLocationGroup/955592432\",\n \"locationsToAdd\": [\n \"gid://shopify/Location/884687543\"\n ],\n \"zonesToCreate\": [\n {\n \"name\": \"USA Zone\",\n \"countries\": {\n \"code\": \"US\",\n \"provinces\": [\n {\n \"code\": \"CO\"\n }\n ]\n },\n \"methodDefinitionsToCreate\": [\n {\n \"name\": \"Standard\",\n \"rateDefinition\": {\n \"price\": {\n \"amount\": 1.0,\n \"currencyCode\": \"USD\"\n }\n }\n }\n ]\n }\n ]\n }\n ]\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"id\" => \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\" => [\n \"name\" => \"Sample Updated Delivery Profile\",\n \"locationGroupsToUpdate\" => [{\"id\"=>\"gid://shopify/DeliveryLocationGroup/955592432\", \"locationsToAdd\"=>[\"gid://shopify/Location/884687543\"], \"zonesToCreate\"=>[{\"name\"=>\"USA Zone\", \"countries\"=>{\"code\"=>\"US\", \"provinces\"=>[{\"code\"=>\"CO\"}]}, \"methodDefinitionsToCreate\"=>[{\"name\"=>\"Standard\", \"rateDefinition\"=>{\"price\"=>{\"amount\"=>1.0, \"currencyCode\"=>\"USD\"}}}]}]}],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "id", "description": "The ID of the delivery profile to update.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "id", "argValue": " \"gid://shopify/DeliveryProfile/593363170\"", "typeKind": "MUTATION" }, { "arg": { "name": "profile", "description": "Specifies the input fields for a delivery profile.", "type": { "kind": "INPUT_OBJECT", "name": "DeliveryProfileInput", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "DeliveryProfileInput!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "profile", "argValue": " {\"name\":\"Sample Updated Delivery Profile\",\"locationGroupsToUpdate\":[{\"id\":\"gid://shopify/DeliveryLocationGroup/955592432\",\"locationsToAdd\":[\"gid://shopify/Location/884687543\"],\"zonesToCreate\":[{\"name\":\"USA Zone\",\"countries\":{\"code\":\"US\",\"provinces\":[{\"code\":\"CO\"}]},\"methodDefinitionsToCreate\":[{\"name\":\"Standard\",\"rateDefinition\":{\"price\":{\"amount\":1,\"currencyCode\":\"USD\"}}}]}]}]}", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "deliveryprofileupdate", "title": "Update delivery profile to add a location group", "description": "Given a delivery profile with a location group for shipping from Canada,\nprofile is updated to add a location group for shipping from the United States.\n\n**Note:** due to the potential complexity of the nested data, it is recommended to create no more than 5 groups per each request.\n", "query_string": "mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n}", "query_arguments": { "id": "$id", "profile": "$profile" }, "variables": { "id": "gid://shopify/DeliveryProfile/593363170", "profile": { "name": "Sample Updated Delivery Profile", "locationGroupsToCreate": [ { "locationsToAdd": [ "gid://shopify/Location/415211365" ], "zonesToCreate": [ { "name": "USA Zone", "countries": { "code": "US", "provinces": [ { "code": "CO" } ] }, "methodDefinitionsToCreate": [ { "name": "Standard", "rateDefinition": { "price": { "amount": 1, "currencyCode": "USD" } } } ] }, { "name": "Mexico Zone", "countries": { "code": "MX", "provinces": [ { "code": "MOR" } ] }, "methodDefinitionsToCreate": [ { "name": "Standard", "rateDefinition": { "price": { "amount": 1, "currencyCode": "USD" } } } ] } ] } ] } }, "response": { "data": { "deliveryProfileUpdate": { "profile": { "id": "gid://shopify/DeliveryProfile/593363170", "name": "Sample Updated Delivery Profile", "profileLocationGroups": [ { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/955592432", "locations": { "nodes": [ { "name": "Ottawa Store", "address": { "country": "Canada" } }, { "name": "Shipping Origin", "address": { "country": "Canada" } } ] } }, "locationGroupZones": { "edges": [ { "node": { "zone": { "id": "gid://shopify/DeliveryZone/161697132", "name": "Canada", "countries": [ { "code": { "countryCode": "CA" }, "provinces": [ { "code": "ON" } ] } ] } } } ] } }, { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/982182450", "locations": { "nodes": [ { "name": "US Store", "address": { "country": "United States" } } ] } }, "locationGroupZones": { "edges": [ { "node": { "zone": { "id": "gid://shopify/DeliveryZone/1066475776", "name": "Mexico Zone", "countries": [ { "code": { "countryCode": "MX" }, "provinces": [ { "code": "MOR" } ] } ] } } }, { "node": { "zone": { "id": "gid://shopify/DeliveryZone/1066475775", "name": "USA Zone", "countries": [ { "code": { "countryCode": "US" }, "provinces": [ { "code": "CO" } ] } ] } } } ] } } ] }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/delivery/test/unit/graph_api/admin/delivery/mutations/profile_update_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) { deliveryProfileUpdate(id: $id, profile: $profile) { profile { id name profileLocationGroups { locationGroup { id locations(first: 5) { nodes { name address { country } } } } locationGroupZones(first: 2) { edges { node { zone { id name countries { code { countryCode } provinces { code } } } } } } } } userErrors { field message } } }\",\n \"variables\": {\n \"id\": \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\": {\n \"name\": \"Sample Updated Delivery Profile\",\n \"locationGroupsToCreate\": [\n {\n \"locationsToAdd\": [\n \"gid://shopify/Location/415211365\"\n ],\n \"zonesToCreate\": [\n {\n \"name\": \"USA Zone\",\n \"countries\": {\n \"code\": \"US\",\n \"provinces\": [\n {\n \"code\": \"CO\"\n }\n ]\n },\n \"methodDefinitionsToCreate\": [\n {\n \"name\": \"Standard\",\n \"rateDefinition\": {\n \"price\": {\n \"amount\": 1.0,\n \"currencyCode\": \"USD\"\n }\n }\n }\n ]\n },\n {\n \"name\": \"Mexico Zone\",\n \"countries\": {\n \"code\": \"MX\",\n \"provinces\": [\n {\n \"code\": \"MOR\"\n }\n ]\n },\n \"methodDefinitionsToCreate\": [\n {\n \"name\": \"Standard\",\n \"rateDefinition\": {\n \"price\": {\n \"amount\": 1.0,\n \"currencyCode\": \"USD\"\n }\n }\n }\n ]\n }\n ]\n }\n ]\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"id\": \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\": {\n \"name\": \"Sample Updated Delivery Profile\",\n \"locationGroupsToCreate\": [\n {\n \"locationsToAdd\": [\n \"gid://shopify/Location/415211365\"\n ],\n \"zonesToCreate\": [\n {\n \"name\": \"USA Zone\",\n \"countries\": {\n \"code\": \"US\",\n \"provinces\": [\n {\n \"code\": \"CO\"\n }\n ]\n },\n \"methodDefinitionsToCreate\": [\n {\n \"name\": \"Standard\",\n \"rateDefinition\": {\n \"price\": {\n \"amount\": 1.0,\n \"currencyCode\": \"USD\"\n }\n }\n }\n ]\n },\n {\n \"name\": \"Mexico Zone\",\n \"countries\": {\n \"code\": \"MX\",\n \"provinces\": [\n {\n \"code\": \"MOR\"\n }\n ]\n },\n \"methodDefinitionsToCreate\": [\n {\n \"name\": \"Standard\",\n \"rateDefinition\": {\n \"price\": {\n \"amount\": 1.0,\n \"currencyCode\": \"USD\"\n }\n }\n }\n ]\n }\n ]\n }\n ]\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"id\": \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\": {\n \"name\": \"Sample Updated Delivery Profile\",\n \"locationGroupsToCreate\": [{\"locationsToAdd\"=>[\"gid://shopify/Location/415211365\"], \"zonesToCreate\"=>[{\"name\"=>\"USA Zone\", \"countries\"=>{\"code\"=>\"US\", \"provinces\"=>[{\"code\"=>\"CO\"}]}, \"methodDefinitionsToCreate\"=>[{\"name\"=>\"Standard\", \"rateDefinition\"=>{\"price\"=>{\"amount\"=>1.0, \"currencyCode\"=>\"USD\"}}}]}, {\"name\"=>\"Mexico Zone\", \"countries\"=>{\"code\"=>\"MX\", \"provinces\"=>[{\"code\"=>\"MOR\"}]}, \"methodDefinitionsToCreate\"=>[{\"name\"=>\"Standard\", \"rateDefinition\"=>{\"price\"=>{\"amount\"=>1.0, \"currencyCode\"=>\"USD\"}}}]}]}]\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"id\": \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\": {\n \"name\": \"Sample Updated Delivery Profile\",\n \"locationGroupsToCreate\": [\n {\n \"locationsToAdd\": [\n \"gid://shopify/Location/415211365\"\n ],\n \"zonesToCreate\": [\n {\n \"name\": \"USA Zone\",\n \"countries\": {\n \"code\": \"US\",\n \"provinces\": [\n {\n \"code\": \"CO\"\n }\n ]\n },\n \"methodDefinitionsToCreate\": [\n {\n \"name\": \"Standard\",\n \"rateDefinition\": {\n \"price\": {\n \"amount\": 1.0,\n \"currencyCode\": \"USD\"\n }\n }\n }\n ]\n },\n {\n \"name\": \"Mexico Zone\",\n \"countries\": {\n \"code\": \"MX\",\n \"provinces\": [\n {\n \"code\": \"MOR\"\n }\n ]\n },\n \"methodDefinitionsToCreate\": [\n {\n \"name\": \"Standard\",\n \"rateDefinition\": {\n \"price\": {\n \"amount\": 1.0,\n \"currencyCode\": \"USD\"\n }\n }\n }\n ]\n }\n ]\n }\n ]\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation deliveryProfileUpdate($id: ID!, $profile: DeliveryProfileInput!) {\n deliveryProfileUpdate(id: $id, profile: $profile) {\n profile {\n id\n name\n profileLocationGroups {\n locationGroup {\n id\n locations(first: 5) {\n nodes {\n name\n address {\n country\n }\n }\n }\n }\n locationGroupZones(first: 2) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n }\n provinces {\n code\n }\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"id\" => \"gid://shopify/DeliveryProfile/593363170\",\n \"profile\" => [\n \"name\" => \"Sample Updated Delivery Profile\",\n \"locationGroupsToCreate\" => [{\"locationsToAdd\"=>[\"gid://shopify/Location/415211365\"], \"zonesToCreate\"=>[{\"name\"=>\"USA Zone\", \"countries\"=>{\"code\"=>\"US\", \"provinces\"=>[{\"code\"=>\"CO\"}]}, \"methodDefinitionsToCreate\"=>[{\"name\"=>\"Standard\", \"rateDefinition\"=>{\"price\"=>{\"amount\"=>1.0, \"currencyCode\"=>\"USD\"}}}]}, {\"name\"=>\"Mexico Zone\", \"countries\"=>{\"code\"=>\"MX\", \"provinces\"=>[{\"code\"=>\"MOR\"}]}, \"methodDefinitionsToCreate\"=>[{\"name\"=>\"Standard\", \"rateDefinition\"=>{\"price\"=>{\"amount\"=>1.0, \"currencyCode\"=>\"USD\"}}}]}]}],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "id", "description": "The ID of the delivery profile to update.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "id", "argValue": " \"gid://shopify/DeliveryProfile/593363170\"", "typeKind": "MUTATION" }, { "arg": { "name": "profile", "description": "Specifies the input fields for a delivery profile.", "type": { "kind": "INPUT_OBJECT", "name": "DeliveryProfileInput", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "DeliveryProfileInput!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "profile", "argValue": " {\"name\":\"Sample Updated Delivery Profile\",\"locationGroupsToCreate\":[{\"locationsToAdd\":[\"gid://shopify/Location/415211365\"],\"zonesToCreate\":[{\"name\":\"USA Zone\",\"countries\":{\"code\":\"US\",\"provinces\":[{\"code\":\"CO\"}]},\"methodDefinitionsToCreate\":[{\"name\":\"Standard\",\"rateDefinition\":{\"price\":{\"amount\":1,\"currencyCode\":\"USD\"}}}]},{\"name\":\"Mexico Zone\",\"countries\":{\"code\":\"MX\",\"provinces\":[{\"code\":\"MOR\"}]},\"methodDefinitionsToCreate\":[{\"name\":\"Standard\",\"rateDefinition\":{\"price\":{\"amount\":1,\"currencyCode\":\"USD\"}}}]}]}]}", "typeKind": "MUTATION" } ] } ]