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\": \"mutation fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) { fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) { fulfillmentEvent { id status message } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillmentEvent\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/237894043\",\n \"address1\": \"151 O'\\''Connor St\",\n \"city\": \"Ottawa\",\n \"province\": \"Ontario\",\n \"country\": \"Canada\",\n \"zip\": \"K2P 2L8\",\n \"latitude\": 45.4191176,\n \"longitude\": 75.6966166,\n \"happenedAt\": \"2024-03-07T15:50:00Z\",\n \"estimatedDeliveryAt\": \"2024-03-07T16:50:00Z\",\n \"message\": \"This package is now out for delivery!\",\n \"status\": \"OUT_FOR_DELIVERY\"\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n id\n status\n message\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillmentEvent\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/237894043\",\n \"address1\": \"151 O'Connor St\",\n \"city\": \"Ottawa\",\n \"province\": \"Ontario\",\n \"country\": \"Canada\",\n \"zip\": \"K2P 2L8\",\n \"latitude\": 45.4191176,\n \"longitude\": 75.6966166,\n \"happenedAt\": \"2024-03-07T15:50:00Z\",\n \"estimatedDeliveryAt\": \"2024-03-07T16:50:00Z\",\n \"message\": \"This package is now out for delivery!\",\n \"status\": \"OUT_FOR_DELIVERY\"\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 fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n id\n status\n message\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillmentEvent\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/237894043\",\n \"address1\": \"151 O'Connor St\",\n \"city\": \"Ottawa\",\n \"province\": \"Ontario\",\n \"country\": \"Canada\",\n \"zip\": \"K2P 2L8\",\n \"latitude\": 45.4191176,\n \"longitude\": 75.6966166,\n \"happenedAt\": \"2024-03-07T15:50:00Z\",\n \"estimatedDeliveryAt\": \"2024-03-07T16:50:00Z\",\n \"message\": \"This package is now out for delivery!\",\n \"status\": \"OUT_FOR_DELIVERY\"\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 fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n id\n status\n message\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"fulfillmentEvent\" => [\n \"fulfillmentId\" => \"gid://shopify/Fulfillment/237894043\",\n \"address1\" => \"151 O'Connor St\",\n \"city\" => \"Ottawa\",\n \"province\" => \"Ontario\",\n \"country\" => \"Canada\",\n \"zip\" => \"K2P 2L8\",\n \"latitude\" => 45.4191176,\n \"longitude\" => 75.6966166,\n \"happenedAt\" => \"2024-03-07T15:50:00Z\",\n \"estimatedDeliveryAt\" => \"2024-03-07T16:50:00Z\",\n \"message\" => \"This package is now out for delivery!\",\n \"status\" => \"OUT_FOR_DELIVERY\",\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 fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n id\n status\n message\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillmentEvent\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/237894043\",\n \"address1\": \"151 O'Connor St\",\n \"city\": \"Ottawa\",\n \"province\": \"Ontario\",\n \"country\": \"Canada\",\n \"zip\": \"K2P 2L8\",\n \"latitude\": 45.4191176,\n \"longitude\": 75.6966166,\n \"happenedAt\": \"2024-03-07T15:50:00Z\",\n \"estimatedDeliveryAt\": \"2024-03-07T16:50:00Z\",\n \"message\": \"This package is now out for delivery!\",\n \"status\": \"OUT_FOR_DELIVERY\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n id\n status\n message\n }\n userErrors {\n field\n message\n }\n }\n}"
input: { "fulfillmentEvent": { "fulfillmentId": "gid://shopify/Fulfillment/237894043", "address1": "151 O'Connor St", "city": "Ottawa", "province": "Ontario", "country": "Canada", "zip": "K2P 2L8", "latitude": 45.4191176, "longitude": 75.6966166, "happenedAt": "2024-03-07T15:50:00Z", "estimatedDeliveryAt": "2024-03-07T16:50:00Z", "message": "This package is now out for delivery!", "status": "OUT_FOR_DELIVERY" } }
response: { "data": { "fulfillmentEventCreate": { "fulfillmentEvent": { "id": "gid://shopify/FulfillmentEvent/944956426", "status": "OUT_FOR_DELIVERY", "message": "This package is now out for delivery!" }, "userErrors": [] } } }
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 fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) { fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) { fulfillmentEvent { address1 city country estimatedDeliveryAt happenedAt latitude longitude message province status zip } userErrors { field message } } }\",\n \"variables\": {\n \"fulfillmentEvent\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/237894043\",\n \"address1\": \"150 Elgin St.\",\n \"city\": \"Ottawa\",\n \"country\": \"Canada\",\n \"estimatedDeliveryAt\": \"2024-11-15T23:40:59Z\",\n \"happenedAt\": \"2024-11-15T23:40:49Z\",\n \"latitude\": 1.234,\n \"longitude\": 9.876,\n \"message\": \"In transit\",\n \"province\": \"Ontario\",\n \"status\": \"IN_TRANSIT\",\n \"zip\": \"K2P1L4\"\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n address1\n city\n country\n estimatedDeliveryAt\n happenedAt\n latitude\n longitude\n message\n province\n status\n zip\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"fulfillmentEvent\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/237894043\",\n \"address1\": \"150 Elgin St.\",\n \"city\": \"Ottawa\",\n \"country\": \"Canada\",\n \"estimatedDeliveryAt\": \"2024-11-15T23:40:59Z\",\n \"happenedAt\": \"2024-11-15T23:40:49Z\",\n \"latitude\": 1.234,\n \"longitude\": 9.876,\n \"message\": \"In transit\",\n \"province\": \"Ontario\",\n \"status\": \"IN_TRANSIT\",\n \"zip\": \"K2P1L4\"\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 fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n address1\n city\n country\n estimatedDeliveryAt\n happenedAt\n latitude\n longitude\n message\n province\n status\n zip\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"fulfillmentEvent\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/237894043\",\n \"address1\": \"150 Elgin St.\",\n \"city\": \"Ottawa\",\n \"country\": \"Canada\",\n \"estimatedDeliveryAt\": \"2024-11-15T23:40:59Z\",\n \"happenedAt\": \"2024-11-15T23:40:49Z\",\n \"latitude\": 1.234,\n \"longitude\": 9.876,\n \"message\": \"In transit\",\n \"province\": \"Ontario\",\n \"status\": \"IN_TRANSIT\",\n \"zip\": \"K2P1L4\"\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 fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n address1\n city\n country\n estimatedDeliveryAt\n happenedAt\n latitude\n longitude\n message\n province\n status\n zip\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"fulfillmentEvent\" => [\n \"fulfillmentId\" => \"gid://shopify/Fulfillment/237894043\",\n \"address1\" => \"150 Elgin St.\",\n \"city\" => \"Ottawa\",\n \"country\" => \"Canada\",\n \"estimatedDeliveryAt\" => \"2024-11-15T23:40:59Z\",\n \"happenedAt\" => \"2024-11-15T23:40:49Z\",\n \"latitude\" => 1.234,\n \"longitude\" => 9.876,\n \"message\" => \"In transit\",\n \"province\" => \"Ontario\",\n \"status\" => \"IN_TRANSIT\",\n \"zip\" => \"K2P1L4\",\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 fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n address1\n city\n country\n estimatedDeliveryAt\n happenedAt\n latitude\n longitude\n message\n province\n status\n zip\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"fulfillmentEvent\": {\n \"fulfillmentId\": \"gid://shopify/Fulfillment/237894043\",\n \"address1\": \"150 Elgin St.\",\n \"city\": \"Ottawa\",\n \"country\": \"Canada\",\n \"estimatedDeliveryAt\": \"2024-11-15T23:40:59Z\",\n \"happenedAt\": \"2024-11-15T23:40:49Z\",\n \"latitude\": 1.234,\n \"longitude\": 9.876,\n \"message\": \"In transit\",\n \"province\": \"Ontario\",\n \"status\": \"IN_TRANSIT\",\n \"zip\": \"K2P1L4\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation fulfillmentEventCreate($fulfillmentEvent: FulfillmentEventInput!) {\n fulfillmentEventCreate(fulfillmentEvent: $fulfillmentEvent) {\n fulfillmentEvent {\n address1\n city\n country\n estimatedDeliveryAt\n happenedAt\n latitude\n longitude\n message\n province\n status\n zip\n }\n userErrors {\n field\n message\n }\n }\n}"
input: { "fulfillmentEvent": { "fulfillmentId": "gid://shopify/Fulfillment/237894043", "address1": "150 Elgin St.", "city": "Ottawa", "country": "Canada", "estimatedDeliveryAt": "2024-11-15T23:40:59Z", "happenedAt": "2024-11-15T23:40:49Z", "latitude": 1.234, "longitude": 9.876, "message": "In transit", "province": "Ontario", "status": "IN_TRANSIT", "zip": "K2P1L4" } }
response: { "data": { "fulfillmentEventCreate": { "fulfillmentEvent": { "address1": "150 Elgin St.", "city": "Ottawa", "country": "Canada", "estimatedDeliveryAt": "2024-11-15T23:40:59Z", "happenedAt": "2024-11-15T23:40:49Z", "latitude": 1.234, "longitude": 9.876, "message": "In transit", "province": "Ontario", "status": "IN_TRANSIT", "zip": "K2P1L4" }, "userErrors": [] } } }