Version: unstable
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/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" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<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\n$variables = [\n \"fulfillment\" => [\n \"lineItemsByFulfillmentOrder\" => [\n \"fulfillmentOrderId\" => \"gid://shopify/FulfillmentOrder/940656279\",\n ],\n ],\n];\n\n$response = $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}"
input: { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" } } }
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": [] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/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" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<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\n$variables = [\n \"fulfillment\" => [\n \"lineItemsByFulfillmentOrder\" => [\n \"fulfillmentOrderId\" => \"gid://shopify/FulfillmentOrder/940656279\",\n ],\n ],\n];\n\n$response = $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}"
input: { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" } } }
response: { "data": { "fulfillmentCreateV2": { "fulfillment": { "id": "gid://shopify/Fulfillment/1069019988", "status": "SUCCESS" }, "userErrors": [] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/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" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<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\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$response = $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}"
input: { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" }, "trackingInfo": { "company": "UPS", "number": "1Z001985YW99744790" } } }
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": [] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/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" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<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\n$variables = [\n \"fulfillment\" => [\n \"lineItemsByFulfillmentOrder\" => [\n \"fulfillmentOrderId\" => \"gid://shopify/FulfillmentOrder/940656279\",\n ],\n \"trackingInfo\" => [\n \"company\" => \"UPS\",\n \"numbers\" => [\"1Z001985YW99744790\", \"1Z001985YW99744791\"],\n ],\n ],\n];\n\n$response = $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}"
input: { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" }, "trackingInfo": { "company": "UPS", "numbers": [ "1Z001985YW99744790", "1Z001985YW99744791" ] } } }
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": [] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/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" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<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\n$variables = [\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\n$response = $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}"
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" ] } } }
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": [] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/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" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<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\n$variables = [\n \"fulfillment\" => [\n \"lineItemsByFulfillmentOrder\" => [\n \"fulfillmentOrderId\" => \"gid://shopify/FulfillmentOrder/940656279\",\n ],\n ],\n];\n\n$response = $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}"
input: { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279" } } }
response: { "data": { "fulfillmentCreateV2": { "fulfillment": { "id": "gid://shopify/Fulfillment/1069019989", "status": "SUCCESS", "trackingInfo": [] }, "userErrors": [] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/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" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<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\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$response = $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}"
input: { "fulfillment": { "lineItemsByFulfillmentOrder": { "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279", "fulfillmentOrderLineItems": { "id": "gid://shopify/FulfillmentOrderLineItem/361939597", "quantity": 1 } } } }
response: { "data": { "fulfillmentCreateV2": { "fulfillment": { "id": "gid://shopify/Fulfillment/1069019983", "status": "SUCCESS" }, "userErrors": [] } } }