fulfillmentTrackingInfoUpdateV2
Requires access scope,
access scope or
access scope. Also: The user must have fulfill_and_ship_orders permission.
Updates tracking information for a fulfillment. Use instead.
Arguments
- Anchor to fulfillmentIdfulfillment•
Id ID!required The ID of the fulfillment.
- Anchor to notifyCustomernotify•
Customer Whether the customer will be notified of this update and future updates for the fulfillment. If this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated.
- Anchor to trackingInfoInputtracking•
Info Input FulfillmentTracking requiredInput! The tracking input for the mutation, including tracking URL, number, and company.
Anchor to FulfillmentTrackingInfoUpdateV2Payload returnsFulfillmentTrackingInfoUpdateV2Payload returns
- Anchor to fulfillmentfulfillment•
The updated fulfillment with tracking information.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
- Add a tracking number and a tracking company name to a fulfillment
- Add tracking information with two tracking numbers and a supported tracking company name specified
- returns a user error if the fulfillment is not found
- fulfillmentTrackingInfoUpdateV2 reference
Examples
mutation fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {
fulfillment {
id
status
trackingInfo {
company
number
url
}
}
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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) { fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) { fulfillment { id status trackingInfo { company number url } } userErrors { field message } } }",
"variables": {
"fulfillmentId": "gid://shopify/Fulfillment/255858046",
"notifyCustomer": true,
"trackingInfoInput": {
"company": "UPS",
"number": "1Z001985YW99744790"
}
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {
fulfillment {
id
status
trackingInfo {
company
number
url
}
}
userErrors {
field
message
}
}
}`,
{
variables: {
"fulfillmentId": "gid://shopify/Fulfillment/255858046",
"notifyCustomer": true,
"trackingInfoInput": {
"company": "UPS",
"number": "1Z001985YW99744790"
}
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {
fulfillment {
id
status
trackingInfo {
company
number
url
}
}
userErrors {
field
message
}
}
}`,
"variables": {
"fulfillmentId": "gid://shopify/Fulfillment/255858046",
"notifyCustomer": true,
"trackingInfoInput": {
"company": "UPS",
"number": "1Z001985YW99744790"
}
},
},
});
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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {
fulfillment {
id
status
trackingInfo {
company
number
url
}
}
userErrors {
field
message
}
}
}
QUERY
variables = {
"fulfillmentId": "gid://shopify/Fulfillment/255858046",
"notifyCustomer": true,
"trackingInfoInput": {
"company": "UPS",
"number": "1Z001985YW99744790"
}
}
response = client.query(query: query, variables: variables)