Anchor to locationLocalPickupDisablelocation
locationLocalPickupDisable
mutation
Requires Any of shipping
access scopes or user permission.
Disables local pickup for a location.
Anchor to Arguments
Arguments
- Anchor to locationIdlocation•
Id ID!required The ID of the location to disable local pickup for.
Was this section helpful?
Anchor to LocationLocalPickupDisablePayload returnsLocationLocalPickupDisablePayload returns
- Anchor to locationIdlocation•
Id The ID of the location for which local pickup was disabled.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Was this section helpful?
- Disable local pickup for a location
- Disabling local pickup for an invalid location returns an error
- locationLocalPickupDisable reference
Examples
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();
mutation disableLocalPickup($locationId: ID!) {
locationLocalPickupDisable(locationId: $locationId) {
locationId
userErrors {
code
field
message
}
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2025-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();
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"
},
},
});
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)
Input variables
JSON{
"locationId": "gid://shopify/Location/750123840"
}
Response
JSON{
"locationLocalPickupDisable": {
"locationId": "gid://shopify/Location/750123840",
"userErrors": []
}
}