# fulfillmentCreateV2 - admin-graphql - MUTATION Version: 2025-01 ## Description Creates a fulfillment for one or many fulfillment orders. The fulfillment orders are associated with the same order and are assigned to the same location. ### 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 * [fulfillment](/docs/api/admin-graphql/2025-01/input-objects/FulfillmentV2Input): FulfillmentV2Input! - The input fields used to create a fulfillment from fulfillment orders. * [message](/docs/api/admin-graphql/2025-01/scalars/String): String - An optional message for the fulfillment request. ## Returns * [fulfillment](/docs/api/admin-graphql/2025-01/objects/Fulfillment): Fulfillment The created fulfillment. * [userErrors](/docs/api/admin-graphql/2025-01/objects/UserError): UserError! The list of errors that occurred from executing the mutation. ## Examples ### Creates a fulfillment for one or many fulfillment orders 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 FulfillmentCreate($fulfillment: FulfillmentV2Input!) { fulfillmentCreateV2(fulfillment: $fulfillment) { fulfillment { fulfillmentLineItems(first: 10) { edges { node { id lineItem { title variant { id } } quantity originalTotalSet { shopMoney { amount currencyCode } } } } } status estimatedDeliveryAt location { id legacyResourceId } service { handle } trackingInfo(first: 10) { company number url } originAddress { address1 address2 city countryCode provinceCode zip } } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n }\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation FulfillmentCreate($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n fulfillmentLineItems(first: 10) {\n edges {\n node {\n id\n lineItem {\n title\n variant {\n id\n }\n }\n quantity\n originalTotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n }\n }\n status\n estimatedDeliveryAt\n location {\n id\n legacyResourceId\n }\n service {\n handle\n }\n trackingInfo(first: 10) {\n company\n number\n url\n }\n originAddress {\n address1\n address2\n city\n countryCode\n provinceCode\n zip\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\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 FulfillmentCreate($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n fulfillmentLineItems(first: 10) {\n edges {\n node {\n id\n lineItem {\n title\n variant {\n id\n }\n }\n quantity\n originalTotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n }\n }\n status\n estimatedDeliveryAt\n location {\n id\n legacyResourceId\n }\n service {\n handle\n }\n trackingInfo(first: 10) {\n company\n number\n url\n }\n originAddress {\n address1\n address2\n city\n countryCode\n provinceCode\n zip\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n }\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 FulfillmentCreate($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n fulfillmentLineItems(first: 10) {\n edges {\n node {\n id\n lineItem {\n title\n variant {\n id\n }\n }\n quantity\n originalTotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n }\n }\n status\n estimatedDeliveryAt\n location {\n id\n legacyResourceId\n }\n service {\n handle\n }\n trackingInfo(first: 10) {\n company\n number\n url\n }\n originAddress {\n address1\n address2\n city\n countryCode\n provinceCode\n zip\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation FulfillmentCreate($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n fulfillmentLineItems(first: 10) {\n edges {\n node {\n id\n lineItem {\n title\n variant {\n id\n }\n }\n quantity\n originalTotalSet {\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n }\n }\n status\n estimatedDeliveryAt\n location {\n id\n legacyResourceId\n }\n service {\n handle\n }\n trackingInfo(first: 10) {\n company\n number\n url\n }\n originAddress {\n address1\n address2\n city\n countryCode\n provinceCode\n zip\n }\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" } } } #### Graphql Response { "data": { "fulfillmentCreateV2": { "fulfillment": { "fulfillmentLineItems": { "edges": [ { "node": { "id": "gid://shopify/FulfillmentLineItem/1024375042", "lineItem": { "title": "Crafty Shoes - Blue", "variant": { "id": "gid://shopify/ProductVariant/715806386" } }, "quantity": 1, "originalTotalSet": { "shopMoney": { "amount": "10.0", "currencyCode": "USD" } } } }, { "node": { "id": "gid://shopify/FulfillmentLineItem/1024375043", "lineItem": { "title": "Crafty Shoes - Green", "variant": { "id": "gid://shopify/ProductVariant/445365074" } }, "quantity": 10, "originalTotalSet": { "shopMoney": { "amount": "1000.0", "currencyCode": "USD" } } } } ] }, "status": "SUCCESS", "estimatedDeliveryAt": null, "location": { "id": "gid://shopify/Location/124656943", "legacyResourceId": "124656943" }, "service": { "handle": "manual" }, "trackingInfo": [], "originAddress": null }, "userErrors": [] } } } ### Fulfill a fulfillment order 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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) { fulfillmentCreateV2(fulfillment: $fulfillment) { fulfillment { id status } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n }\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n }\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" } } } #### Graphql Response { "data": { "fulfillmentCreateV2": { "fulfillment": { "id": "gid://shopify/Fulfillment/1069019988", "status": "SUCCESS" }, "userErrors": [] } } } ### Fulfill a fulfillment order with tracking data 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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) { fulfillmentCreateV2(fulfillment: $fulfillment) { fulfillment { id status trackingInfo(first: 10) { company number url } } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"company\": \"UPS\",\n \"number\": \"1Z001985YW99744790\"\n }\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"company\": \"UPS\",\n \"number\": \"1Z001985YW99744790\"\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"company\": \"UPS\",\n \"number\": \"1Z001985YW99744790\"\n }\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"company\": \"UPS\",\n \"number\": \"1Z001985YW99744790\"\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" }, "trackingInfo": { "company": "UPS", "number": "1Z001985YW99744790" } } } #### Graphql Response { "data": { "fulfillmentCreateV2": { "fulfillment": { "id": "gid://shopify/Fulfillment/1069019986", "status": "SUCCESS", "trackingInfo": [ { "company": "UPS", "number": "1Z001985YW99744790", "url": "https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z001985YW99744790" } ] }, "userErrors": [] } } } ### Fulfill a fulfillment order 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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) { fulfillmentCreateV2(fulfillment: $fulfillment) { fulfillment { id status trackingInfo(first: 10) { company number url } } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"company\": \"UPS\",\n \"numbers\": [\n \"1Z001985YW99744790\",\n \"1Z001985YW99744791\"\n ]\n }\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"company\": \"UPS\",\n \"numbers\": [\n \"1Z001985YW99744790\",\n \"1Z001985YW99744791\"\n ]\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"company\": \"UPS\",\n \"numbers\": [\"1Z001985YW99744790\", \"1Z001985YW99744791\"]\n }\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"company\": \"UPS\",\n \"numbers\": [\n \"1Z001985YW99744790\",\n \"1Z001985YW99744791\"\n ]\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" }, "trackingInfo": { "company": "UPS", "numbers": [ "1Z001985YW99744790", "1Z001985YW99744791" ] } } } #### Graphql Response { "data": { "fulfillmentCreateV2": { "fulfillment": { "id": "gid://shopify/Fulfillment/1069019987", "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": [] } } } ### Fulfill a fulfillment order with two tracking numbers and tracking urls from different tracking tracking providers 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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) { fulfillmentCreateV2(fulfillment: $fulfillment) { fulfillment { id status trackingInfo(first: 10) { company number url } } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"numbers\": [\n \"1Z1234512345123456\",\n \"MS123\"\n ],\n \"urls\": [\n \"https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z1234512345123456\",\n \"http://shopify-unsupported-tracking-company.com?tracking_number=MS123\"\n ]\n }\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"numbers\": [\n \"1Z1234512345123456\",\n \"MS123\"\n ],\n \"urls\": [\n \"https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z1234512345123456\",\n \"http://shopify-unsupported-tracking-company.com?tracking_number=MS123\"\n ]\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"numbers\": [\"1Z1234512345123456\", \"MS123\"],\n \"urls\": [\"https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z1234512345123456\", \"http://shopify-unsupported-tracking-company.com?tracking_number=MS123\"]\n }\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n },\n \"trackingInfo\": {\n \"numbers\": [\n \"1Z1234512345123456\",\n \"MS123\"\n ],\n \"urls\": [\n \"https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z1234512345123456\",\n \"http://shopify-unsupported-tracking-company.com?tracking_number=MS123\"\n ]\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" }, "trackingInfo": { "numbers": [ "1Z1234512345123456", "MS123" ], "urls": [ "https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z1234512345123456", "http://shopify-unsupported-tracking-company.com?tracking_number=MS123" ] } } } #### Graphql Response { "data": { "fulfillmentCreateV2": { "fulfillment": { "id": "gid://shopify/Fulfillment/1069019985", "status": "SUCCESS", "trackingInfo": [ { "company": "UPS", "number": "1Z1234512345123456", "url": "https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z1234512345123456" }, { "company": "UPS", "number": "MS123", "url": "http://shopify-unsupported-tracking-company.com?tracking_number=MS123" } ] }, "userErrors": [] } } } ### Fulfill a fulfillment order without providing tracking info 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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) { fulfillmentCreateV2(fulfillment: $fulfillment) { fulfillment { id status trackingInfo(first: 10) { company number url } } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n }\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n }\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\"\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n trackingInfo(first: 10) {\n company\n number\n url\n }\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" } } } #### Graphql Response { "data": { "fulfillmentCreateV2": { "fulfillment": { "id": "gid://shopify/Fulfillment/1069019989", "status": "SUCCESS", "trackingInfo": [] }, "userErrors": [] } } } ### Partially fulfill a fulfillment order 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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) { fulfillmentCreateV2(fulfillment: $fulfillment) { fulfillment { id status } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\",\n \"fulfillmentOrderLineItems\": {\n \"id\": \"gid://shopify/FulfillmentOrderLineItem/361939597\",\n \"quantity\": 1\n }\n }\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\",\n \"fulfillmentOrderLineItems\": {\n \"id\": \"gid://shopify/FulfillmentOrderLineItem/361939597\",\n \"quantity\": 1\n }\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\",\n \"fulfillmentOrderLineItems\": {\n \"id\": \"gid://shopify/FulfillmentOrderLineItem/361939597\",\n \"quantity\": 1\n }\n }\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 fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillment\": {\n \"lineItemsByFulfillmentOrder\": {\n \"fulfillmentOrderId\": \"gid://shopify/FulfillmentOrder/940656279\",\n \"fulfillmentOrderLineItems\": {\n \"id\": \"gid://shopify/FulfillmentOrderLineItem/361939597\",\n \"quantity\": 1\n }\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {\n fulfillmentCreateV2(fulfillment: $fulfillment) {\n fulfillment {\n id\n status\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279", "fulfillmentOrderLineItems": { "id": "gid://shopify/FulfillmentOrderLineItem/361939597", "quantity": 1 } } } } #### Graphql Response { "data": { "fulfillmentCreateV2": { "fulfillment": { "id": "gid://shopify/Fulfillment/1069019983", "status": "SUCCESS" }, "userErrors": [] } } }