Anchor to section titled 'undefined'

locationLocalPickupDisable
mutation

Requires Any of shipping access scopes or manage_delivery_settings user permission.

Disables local pickup for a location.


Anchor to locationId
locationId
required

The ID of the location to disable local pickup for.


Was this section helpful?

The ID of the location for which local pickup was disabled.

The list of errors that occurred from executing the mutation.


Was this section helpful?

Examples

Hide code
DescriptionCopy
mutation disableLocalPickup($locationId: ID!) {
  locationLocalPickupDisable(locationId: $locationId) {
    locationId
    userErrors {
      code
      field
      message
    }
  }
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2024-01/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation disableLocalPickup($locationId: ID!) { locationLocalPickupDisable(locationId: $locationId) { locationId userErrors { code field message } } }",
 "variables": {
    "locationId": "gid://shopify/Location/750123840"
  }
}'
const { admin } = await authenticate.admin(request);

const response = await admin.graphql(
  `#graphql
  mutation disableLocalPickup($locationId: ID!) {
    locationLocalPickupDisable(locationId: $locationId) {
      locationId
      userErrors {
        code
        field
        message
      }
    }
  }`,
  {
    variables: {
      "locationId": "gid://shopify/Location/750123840"
    },
  },
);

const data = await response.json();
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 disableLocalPickup($locationId: ID!) {
    locationLocalPickupDisable(locationId: $locationId) {
      locationId
      userErrors {
        code
        field
        message
      }
    }
  }
QUERY

variables = {
  "locationId": "gid://shopify/Location/750123840"
}

response = client.query(query: query, variables: variables)
const client = new shopify.clients.Graphql({session});
const data = await client.query({
  data: {
    "query": `mutation disableLocalPickup($locationId: ID!) {
      locationLocalPickupDisable(locationId: $locationId) {
        locationId
        userErrors {
          code
          field
          message
        }
      }
    }`,
    "variables": {
      "locationId": "gid://shopify/Location/750123840"
    },
  },
});
use Shopify\Clients\Graphql;

$client = new Graphql("your-development-store.myshopify.com", $accessToken);
$query = <<<QUERY
  mutation disableLocalPickup($locationId: ID!) {
    locationLocalPickupDisable(locationId: $locationId) {
      locationId
      userErrors {
        code
        field
        message
      }
    }
  }
QUERY;

$variables = [
  "locationId" => "gid://shopify/Location/750123840",
];

$response = $client->query(["query" => $query, "variables" => $variables]);
Hide code
Input variables
Copy
{
  "locationId": "gid://shopify/Location/750123840"
}
Hide code
Response
JSON
{
  "locationLocalPickupDisable": {
    "locationId": "gid://shopify/Location/750123840",
    "userErrors": []
  }
}