Anchor to fulfillmentTrackingInfoUpdatefulfillment
fulfillmentTrackingInfoUpdate
mutation
Requires access scope,
access scope or
access scope. Also: The user must have fulfill_and_ship_orders permission.
Updates tracking information for a fulfillment.
Anchor to Arguments
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.
Was this section helpful?
Anchor to FulfillmentTrackingInfoUpdatePayload returnsFulfillmentTrackingInfoUpdatePayload 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.
Was this section helpful?
- Updates the tracking information for a fulfillment
- fulfillmentTrackingInfoUpdate reference
Examples
1const { admin } = await authenticate.admin(request);23const response = await admin.graphql(4 `#graphql5 mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {6 fulfillmentTrackingInfoUpdate(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {7 fulfillment {8 id9 status10 trackingInfo {11 company12 number13 url14 }15 }16 userErrors {17 field18 message19 }20 }21 }`,22 {23 variables: {24 "fulfillmentId": "gid://shopify/Fulfillment/255858046",25 "notifyCustomer": true,26 "trackingInfoInput": {27 "company": "UPS",28 "number": "1Z001985YW99744790"29 }30 },31 },32);3334const data = await response.json();35
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
}
}
}
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 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 { 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 data = await response.json();
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"
}
},
},
});
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)
Input variables
JSON1{2 "fulfillmentId": "gid://shopify/Fulfillment/255858046",3 "notifyCustomer": true,4 "trackingInfoInput": {5 "company": "UPS",6 "number": "1Z001985YW99744790"7 }8}
Response
JSON1{2 "fulfillmentTrackingInfoUpdate": {3 "fulfillment": {4 "id": "gid://shopify/Fulfillment/255858046",5 "status": "SUCCESS",6 "trackingInfo": [7 {8 "company": "UPS",9 "number": "1Z001985YW99744790",10 "url": "https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z001985YW99744790"11 }12 ]13 },14 "userErrors": []15 }16}