fulfillmentOrderHold
Requires access scope or
access scope. Also: The user must have fulfill_and_ship_orders permission.
Applies a fulfillment hold on a fulfillment order.
As of the 2025-01 API version, the mutation can be successfully executed on fulfillment orders that are already on hold. To place multiple holds on a fulfillment order, apps need to supply the handle field. Each app can place up to 10 active holds per fulfillment order. If an app attempts to place more than this, the mutation will return a user error indicating that the limit has been reached. The app would need to release one of its existing holds before being able to apply a new one.
Arguments
- Anchor to fulfillmentHoldfulfillment•
Hold FulfillmentOrder requiredHold Input! The details of the fulfillment hold applied on the fulfillment order.
- •ID!required
The ID of the fulfillment order on which a fulfillment hold is applied.
Anchor to FulfillmentOrderHoldPayload returnsFulfillmentOrderHoldPayload returns
- Anchor to fulfillmentOrderfulfillment•
Order The fulfillment order on which a fulfillment hold was applied.
- Anchor to remainingFulfillmentOrderremaining•
Fulfillment Order The remaining fulfillment order containing the line items to which the hold wasn't applied, if specific line items were specified to be placed on hold.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
- Applies a fulfillment hold on an open fulfillment order
- Put a fulfillment order on hold
- fulfillmentOrderHold reference
Examples
1const { admin } = await authenticate.admin(request);23const response = await admin.graphql(4 `#graphql5 mutation FulfillmentOrderHold($fulfillmentHold: FulfillmentOrderHoldInput!, $id: ID!) {6 fulfillmentOrderHold(fulfillmentHold: $fulfillmentHold, id: $id) {7 fulfillmentOrder {8 id9 }10 remainingFulfillmentOrder {11 id12 }13 userErrors {14 field15 message16 }17 }18 }`,19 {20 variables: {21 "fulfillmentHold": {22 "reason": "INVENTORY_OUT_OF_STOCK",23 "reasonNotes": "Waiting on new shipment"24 },25 "id": "gid://shopify/FulfillmentOrder/1046001479"26 },27 },28);2930const data = await response.json();31
mutation FulfillmentOrderHold($fulfillmentHold: FulfillmentOrderHoldInput!, $id: ID!) {
fulfillmentOrderHold(fulfillmentHold: $fulfillmentHold, id: $id) {
fulfillmentOrder {
id
}
remainingFulfillmentOrder {
id
}
userErrors {
field
message
}
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation FulfillmentOrderHold($fulfillmentHold: FulfillmentOrderHoldInput!, $id: ID!) { fulfillmentOrderHold(fulfillmentHold: $fulfillmentHold, id: $id) { fulfillmentOrder { id } remainingFulfillmentOrder { id } userErrors { field message } } }",
"variables": {
"fulfillmentHold": {
"reason": "INVENTORY_OUT_OF_STOCK",
"reasonNotes": "Waiting on new shipment"
},
"id": "gid://shopify/FulfillmentOrder/1046001479"
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation FulfillmentOrderHold($fulfillmentHold: FulfillmentOrderHoldInput!, $id: ID!) {
fulfillmentOrderHold(fulfillmentHold: $fulfillmentHold, id: $id) {
fulfillmentOrder {
id
}
remainingFulfillmentOrder {
id
}
userErrors {
field
message
}
}
}`,
{
variables: {
"fulfillmentHold": {
"reason": "INVENTORY_OUT_OF_STOCK",
"reasonNotes": "Waiting on new shipment"
},
"id": "gid://shopify/FulfillmentOrder/1046001479"
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation FulfillmentOrderHold($fulfillmentHold: FulfillmentOrderHoldInput!, $id: ID!) {
fulfillmentOrderHold(fulfillmentHold: $fulfillmentHold, id: $id) {
fulfillmentOrder {
id
}
remainingFulfillmentOrder {
id
}
userErrors {
field
message
}
}
}`,
"variables": {
"fulfillmentHold": {
"reason": "INVENTORY_OUT_OF_STOCK",
"reasonNotes": "Waiting on new shipment"
},
"id": "gid://shopify/FulfillmentOrder/1046001479"
},
},
});
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 FulfillmentOrderHold($fulfillmentHold: FulfillmentOrderHoldInput!, $id: ID!) {
fulfillmentOrderHold(fulfillmentHold: $fulfillmentHold, id: $id) {
fulfillmentOrder {
id
}
remainingFulfillmentOrder {
id
}
userErrors {
field
message
}
}
}
QUERY
variables = {
"fulfillmentHold": {
"reason": "INVENTORY_OUT_OF_STOCK",
"reasonNotes": "Waiting on new shipment"
},
"id": "gid://shopify/FulfillmentOrder/1046001479"
}
response = client.query(query: query, variables: variables)
Input variables
JSON1{2 "fulfillmentHold": {3 "reason": "INVENTORY_OUT_OF_STOCK",4 "reasonNotes": "Waiting on new shipment"5 },6 "id": "gid://shopify/FulfillmentOrder/1046001479"7}
Response
JSON1{2 "fulfillmentOrderHold": {3 "fulfillmentOrder": {4 "id": "gid://shopify/FulfillmentOrder/1046001479"5 },6 "remainingFulfillmentOrder": null,7 "userErrors": []8 }9}