Requires write_locations
access scope.
Deactivates a location and moves inventory, pending orders, and moving transfers to a destination location.
The ID of a destination location to which inventory, pending orders and moving transfers will be moved from the location to deactivate.
The ID of a location to deactivate.
The location that was deactivated.
The list of errors that occurred from executing the mutation.
mutation locationDeactivate { locationDeactivate(locationId: "gid://shopify/Location/922479430") { location { id isActive } locationDeactivateUserErrors { message code field } } }
curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-07/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation locationDeactivate { locationDeactivate(locationId: \"gid://shopify/Location/922479430\") { location { id isActive } locationDeactivateUserErrors { message code field } } }" }'
const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation locationDeactivate { locationDeactivate(locationId: "gid://shopify/Location/922479430") { location { id isActive } locationDeactivateUserErrors { message code field } } }`, ); const data = await response.json();
const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `mutation locationDeactivate { locationDeactivate(locationId: "gid://shopify/Location/922479430") { location { id isActive } locationDeactivateUserErrors { message code field } } }`, });
session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation locationDeactivate { locationDeactivate(locationId: "gid://shopify/Location/922479430") { location { id isActive } locationDeactivateUserErrors { message code field } } } QUERY response = client.query(query: query)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4