Version: 2025-01
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\": \"query FulfillmentShow($id: ID!) { fulfillment(id: $id) { 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 } } }\",\n \"variables\": {\n \"id\": \"gid://shopify/Fulfillment/237894043\"\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `query FulfillmentShow($id: ID!) {\n fulfillment(id: $id) {\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 }`,\n \"variables\": {\n \"id\": \"gid://shopify/Fulfillment/237894043\"\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 query FulfillmentShow($id: ID!) {\n fulfillment(id: $id) {\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 }\nQUERY\n\nvariables = {\n \"id\": \"gid://shopify/Fulfillment/237894043\"\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 query FulfillmentShow($id: ID!) {\n fulfillment(id: $id) {\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 }\nQUERY;\n\n$variables = [\n \"id\" => \"gid://shopify/Fulfillment/237894043\",\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 query FulfillmentShow($id: ID!) {\n fulfillment(id: $id) {\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 }`,\n {\n variables: {\n \"id\": \"gid://shopify/Fulfillment/237894043\"\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "query FulfillmentShow($id: ID!) {\n fulfillment(id: $id) {\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}"
input: { "id": "gid://shopify/Fulfillment/237894043" }
response: { "data": { "fulfillment": { "fulfillmentLineItems": { "edges": [ { "node": { "id": "gid://shopify/FulfillmentLineItem/761422146", "lineItem": { "title": "Draft", "variant": { "id": "gid://shopify/ProductVariant/43729076" } }, "quantity": 2, "originalTotalSet": { "shopMoney": { "amount": "20.0", "currencyCode": "USD" } } } } ] }, "status": "SUCCESS", "estimatedDeliveryAt": null, "location": { "id": "gid://shopify/Location/124656943", "legacyResourceId": "124656943" }, "service": { "handle": "manual" }, "trackingInfo": [ { "company": "UPS", "number": "1Z1234512345123456", "url": "https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z1234512345123456" } ], "originAddress": { "address1": "150 Elgin St", "address2": null, "city": "Ottawa", "countryCode": "CA", "provinceCode": "ON", "zip": "K2P 1L4" } } } }
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\": \"query FulfillmentEventList($id: ID!) { fulfillment(id: $id) { events(first: 10) { edges { node { happenedAt status } } } } }\",\n \"variables\": {\n \"id\": \"gid://shopify/Fulfillment/237894043\"\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `query FulfillmentEventList($id: ID!) {\n fulfillment(id: $id) {\n events(first: 10) {\n edges {\n node {\n happenedAt\n status\n }\n }\n }\n }\n }`,\n \"variables\": {\n \"id\": \"gid://shopify/Fulfillment/237894043\"\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 query FulfillmentEventList($id: ID!) {\n fulfillment(id: $id) {\n events(first: 10) {\n edges {\n node {\n happenedAt\n status\n }\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"id\": \"gid://shopify/Fulfillment/237894043\"\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 query FulfillmentEventList($id: ID!) {\n fulfillment(id: $id) {\n events(first: 10) {\n edges {\n node {\n happenedAt\n status\n }\n }\n }\n }\n }\nQUERY;\n\n$variables = [\n \"id\" => \"gid://shopify/Fulfillment/237894043\",\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 query FulfillmentEventList($id: ID!) {\n fulfillment(id: $id) {\n events(first: 10) {\n edges {\n node {\n happenedAt\n status\n }\n }\n }\n }\n }`,\n {\n variables: {\n \"id\": \"gid://shopify/Fulfillment/237894043\"\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "query FulfillmentEventList($id: ID!) {\n fulfillment(id: $id) {\n events(first: 10) {\n edges {\n node {\n happenedAt\n status\n }\n }\n }\n }\n}"
input: { "id": "gid://shopify/Fulfillment/237894043" }
response: { "data": { "fulfillment": { "events": { "edges": [ { "node": { "happenedAt": "2016-05-02T11:00:00Z", "status": "LABEL_PURCHASED" } }, { "node": { "happenedAt": "2016-05-03T11:00:00Z", "status": "OUT_FOR_DELIVERY" } } ] } } } }