# locationActivate - admin-graphql - MUTATION Version: 2025-01 ## Description Activates a location so that you can stock inventory at the location. Refer to the [`isActive`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-isactive) and [`activatable`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-activatable) fields on the `Location` object. ### Access Scopes `write_locations` access scope. ## Arguments * [locationId](/docs/api/admin-graphql/2025-01/scalars/ID): ID! - The ID of a location to activate. ## Returns * [location](/docs/api/admin-graphql/2025-01/objects/Location): Location The location that was activated. * [locationActivateUserErrors](/docs/api/admin-graphql/2025-01/objects/LocationActivateUserError): LocationActivateUserError! The list of errors that occurred from executing the mutation. ## Examples ### Activate a deactivated location Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation { locationActivate(locationId: \\\"gid://shopify/Location/658095763\\\") { location { id isActive } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `mutation {\n locationActivate(locationId: \"gid://shopify/Location/658095763\") {\n location {\n id\n isActive\n }\n }\n }`,\n});\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 {\n locationActivate(locationId: \"gid://shopify/Location/658095763\") {\n location {\n id\n isActive\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation {\n locationActivate(locationId: \"gid://shopify/Location/658095763\") {\n location {\n id\n isActive\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "mutation {\n locationActivate(locationId: \"gid://shopify/Location/658095763\") {\n location {\n id\n isActive\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "locationActivate": { "location": { "id": "gid://shopify/Location/658095763", "isActive": true } } } }