Updates the tracking information for a fulfillment
Description
Add a carrier's tracking number to a fulfillment that's already been created, for example after a shipping app buys a label for the package.
Pass the carrier name in `company` and the tracking number in `number`, and set `notifyCustomer` to `true` so that the customer receives a shipping update email with the tracking details.
Because `UPS` is a [supported tracking company](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentTrackingInfo#supported-tracking-companies), Shopify generates the tracking `url` that the response returns.
Query
mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdate(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"
}
}
cURL
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2026-10/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) { fulfillmentTrackingInfoUpdate(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"
}
}
}'
React Router
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdate(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 json = await response.json();
return json.data;
}
Ruby
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 FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdate(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)
Node.js
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdate(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"
}
},
},
});
Shopify CLI
shopify app execute \
--query \
'mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdate(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"
}
}'
Direct API Access
const response = await fetch('shopify:admin/api/2026-10/graphql.json', {
method: 'POST',
body: JSON.stringify({
query: `
mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {
fulfillmentTrackingInfoUpdate(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();
console.log(data);
Response
{
"fulfillmentTrackingInfoUpdate": {
"fulfillment": {
"id": "gid://shopify/Fulfillment/255858046",
"status": "SUCCESS",
"trackingInfo": [
{
"company": "UPS",
"number": "1Z001985YW99744790",
"url": "https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z001985YW99744790"
}
]
},
"userErrors": []
}
}