# fulfillmentTrackingInfoUpdateV2 - admin-graphql - MUTATION Version: 2025-01 ## 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/2025-01/scalars/ID): ID! - The ID of the fulfillment. * [notifyCustomer](/docs/api/admin-graphql/2025-01/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/2025-01/input-objects/FulfillmentTrackingInput): FulfillmentTrackingInput! - The tracking input for the mutation, including tracking URL, number, and company. ## Returns * [fulfillment](/docs/api/admin-graphql/2025-01/objects/Fulfillment): Fulfillment The updated fulfillment with tracking information. * [userErrors](/docs/api/admin-graphql/2025-01/objects/UserError): UserError! The list of errors that occurred from executing the mutation. ## Examples ### Add a tracking number and a tracking company name to a fulfillment Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"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 } } }\",\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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(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": { "fulfillmentTrackingInfoUpdateV2": { "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": [] } } } ### Add tracking information with two tracking numbers and a supported tracking company name specified Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"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 } } }\",\n \"variables\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/255858046\",\n \"notifyCustomer\": true,\n \"trackingInfoInput\": {\n \"company\": \"UPS\",\n \"numbers\": [\n \"1Z001985YW99744790\",\n \"1Z001985YW99744791\"\n ]\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(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 \"numbers\": [\n \"1Z001985YW99744790\",\n \"1Z001985YW99744791\"\n ]\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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(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 \"numbers\": [\"1Z001985YW99744790\", \"1Z001985YW99744791\"]\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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(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 \"numbers\": [\n \"1Z001985YW99744790\",\n \"1Z001985YW99744791\"\n ]\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(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", "numbers": [ "1Z001985YW99744790", "1Z001985YW99744791" ] } } #### Graphql Response { "data": { "fulfillmentTrackingInfoUpdateV2": { "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" }, { "company": "UPS", "number": "1Z001985YW99744791", "url": "https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z001985YW99744791" } ] }, "userErrors": [] } } } ### Returns an user error if the fulfillment is not found Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) { fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) { fulfillment { id } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/623721858\",\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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {\n fulfillment {\n id\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/623721858\",\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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {\n fulfillment {\n id\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/623721858\",\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 fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {\n fulfillment {\n id\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/623721858\",\n \"trackingInfoInput\": {\n \"company\": \"UPS\",\n \"number\": \"1Z001985YW99744790\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentTrackingInfoUpdateV2($fulfillmentId: ID!, $trackingInfoInput: FulfillmentTrackingInput!, $notifyCustomer: Boolean) {\n fulfillmentTrackingInfoUpdateV2(fulfillmentId: $fulfillmentId, trackingInfoInput: $trackingInfoInput, notifyCustomer: $notifyCustomer) {\n fulfillment {\n id\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillmentId": "gid://shopify/Fulfillment/623721858", "trackingInfoInput": { "company": "UPS", "number": "1Z001985YW99744790" } } #### Graphql Response { "data": { "fulfillmentTrackingInfoUpdateV2": { "fulfillment": null, "userErrors": [ { "field": [ "fulfillmentId" ], "message": "Fulfillment does not exist." } ] } } }