fulfillmentServiceUpdate
Requires access scope. Also: The user must have fulfill_and_ship_orders permission.
Updates a fulfillment service.
If you are using API version 2023-10
or later,
and you need to update the location managed by the fulfillment service
(for example, to change the address of a fulfillment service),
use the
LocationEdit
mutation.
Arguments
- Anchor to callbackUrlcallback•
Url The URL to send requests for the fulfillment service. The following considerations apply:
- Shopify queries the
callback_url/fetch_tracking_numbers
endpoint to retrieve tracking numbers for orders, ifis set to
true
. - Shopify queries the
callback_url/fetch_stock
endpoint to retrieve inventory levels, ifis set to
true
. - Shopify uses the
callback_url/fulfillment_order_notification
endpoint to send fulfillment and cancellation requests.
- Shopify queries the
- •ID!required
The id of the fulfillment service.
- Anchor to inventoryManagementinventory•
Management Whether the fulfillment service tracks product inventory and provides updates to Shopify.
- Anchor to namename•
The name of the fulfillment service.
- Anchor to trackingSupporttracking•
Support Whether the fulfillment service provides tracking numbers for packages.
Anchor to FulfillmentServiceUpdatePayload returnsFulfillmentServiceUpdatePayload returns
- Anchor to fulfillmentServicefulfillment•
Service The updated fulfillment service.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
- Modify an existing FulfillmentService
- fulfillmentServiceUpdate reference
Examples
mutation fulfillmentServiceUpdate($id: ID!, $name: String!) {
fulfillmentServiceUpdate(id: $id, name: $name) {
fulfillmentService {
id
serviceName
}
userErrors {
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 fulfillmentServiceUpdate($id: ID!, $name: String!) { fulfillmentServiceUpdate(id: $id, name: $name) { fulfillmentService { id serviceName } userErrors { field message } } }",
"variables": {
"id": "gid://shopify/FulfillmentService/198258461",
"name": "My Updated Fulfillment Warehouse"
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation fulfillmentServiceUpdate($id: ID!, $name: String!) {
fulfillmentServiceUpdate(id: $id, name: $name) {
fulfillmentService {
id
serviceName
}
userErrors {
field
message
}
}
}`,
{
variables: {
"id": "gid://shopify/FulfillmentService/198258461",
"name": "My Updated Fulfillment Warehouse"
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation fulfillmentServiceUpdate($id: ID!, $name: String!) {
fulfillmentServiceUpdate(id: $id, name: $name) {
fulfillmentService {
id
serviceName
}
userErrors {
field
message
}
}
}`,
"variables": {
"id": "gid://shopify/FulfillmentService/198258461",
"name": "My Updated Fulfillment Warehouse"
},
},
});
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 fulfillmentServiceUpdate($id: ID!, $name: String!) {
fulfillmentServiceUpdate(id: $id, name: $name) {
fulfillmentService {
id
serviceName
}
userErrors {
field
message
}
}
}
QUERY
variables = {
"id": "gid://shopify/FulfillmentService/198258461",
"name": "My Updated Fulfillment Warehouse"
}
response = client.query(query: query, variables: variables)