# fulfillmentTrackingInfoUpdate - admin-graphql - MUTATION Version: 2024-10 ## Description Updates tracking information for a fulfillment. ### Access Scopes `write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission. ## Arguments * [fulfillmentId](/docs/api/admin-graphql/2024-10/scalars/ID): ID! - The ID of the fulfillment. * [notifyCustomer](/docs/api/admin-graphql/2024-10/scalars/Boolean): Boolean - 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. * [trackingInfoInput](/docs/api/admin-graphql/2024-10/input-objects/FulfillmentTrackingInput): FulfillmentTrackingInput! - The tracking input for the mutation, including tracking URL, number, and company. ## Returns * [fulfillment](/docs/api/admin-graphql/2024-10/objects/Fulfillment): Fulfillment The updated fulfillment with tracking information. * [userErrors](/docs/api/admin-graphql/2024-10/objects/UserError): UserError! The list of errors that occurred from executing the mutation. ## Examples ### Updates the tracking information for a fulfillment Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"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 } } }\",\n \"variables\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/255858046\",\n \"notifyCustomer\": true,\n \"trackingInfoInput\": {\n \"company\": \"UPS\",\n \"number\": \"1Z001985YW99744790\"\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdate(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {\n fulfillment {\n id\n status\n trackingInfo {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/255858046\",\n \"notifyCustomer\": true,\n \"trackingInfoInput\": {\n \"company\": \"UPS\",\n \"number\": \"1Z001985YW99744790\"\n }\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdate(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {\n fulfillment {\n id\n status\n trackingInfo {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/255858046\",\n \"notifyCustomer\": true,\n \"trackingInfoInput\": {\n \"company\": \"UPS\",\n \"number\": \"1Z001985YW99744790\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdate(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {\n fulfillment {\n id\n status\n trackingInfo {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/255858046\",\n \"notifyCustomer\": true,\n \"trackingInfoInput\": {\n \"company\": \"UPS\",\n \"number\": \"1Z001985YW99744790\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation FulfillmentTrackingInfoUpdate($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdate(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {\n fulfillment {\n id\n status\n trackingInfo {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillmentId": "gid://shopify/Fulfillment/255858046", "notifyCustomer": true, "trackingInfoInput": { "company": "UPS", "number": "1Z001985YW99744790" } } #### Graphql Response { "data": { "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": [] } } }