Version: 2024-10
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation($feedbackInput: [ProductResourceFeedbackInput!]!) { bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) { userErrors { field message } feedback { productId state feedbackGeneratedAt productUpdatedAt messages } } }\",\n \"variables\": {\n \"feedbackInput\": [\n {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\n \"Needs a description.\"\n ]\n },\n {\n \"productId\": \"gid://shopify/Product/788638954\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\n \"Needs an image.\"\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($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n feedbackGeneratedAt\n productUpdatedAt\n messages\n }\n }\n }`,\n \"variables\": {\n \"feedbackInput\": [\n {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\n \"Needs a description.\"\n ]\n },\n {\n \"productId\": \"gid://shopify/Product/788638954\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\n \"Needs an image.\"\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($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n feedbackGeneratedAt\n productUpdatedAt\n messages\n }\n }\n }\nQUERY\n\nvariables = {\n \"feedbackInput\": [{\"productId\"=>\"gid://shopify/Product/172561227\", \"state\"=>\"REQUIRES_ACTION\", \"feedbackGeneratedAt\"=>\"2021-05-01T23:00:00Z\", \"productUpdatedAt\"=>\"2021-04-28T16:00:00Z\", \"messages\"=>[\"Needs a description.\"]}, {\"productId\"=>\"gid://shopify/Product/788638954\", \"state\"=>\"REQUIRES_ACTION\", \"feedbackGeneratedAt\"=>\"2021-05-01T23:00:00Z\", \"productUpdatedAt\"=>\"2021-04-28T16:00:00Z\", \"messages\"=>[\"Needs an image.\"]}]\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 = <<[{\"productId\"=>\"gid://shopify/Product/172561227\", \"state\"=>\"REQUIRES_ACTION\", \"feedbackGeneratedAt\"=>\"2021-05-01T23:00:00Z\", \"productUpdatedAt\"=>\"2021-04-28T16:00:00Z\", \"messages\"=>[\"Needs a description.\"]}, {\"productId\"=>\"gid://shopify/Product/788638954\", \"state\"=>\"REQUIRES_ACTION\", \"feedbackGeneratedAt\"=>\"2021-05-01T23:00:00Z\", \"productUpdatedAt\"=>\"2021-04-28T16:00:00Z\", \"messages\"=>[\"Needs an image.\"]}],\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($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n feedbackGeneratedAt\n productUpdatedAt\n messages\n }\n }\n }`,\n {\n variables: {\n \"feedbackInput\": [\n {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\n \"Needs a description.\"\n ]\n },\n {\n \"productId\": \"gid://shopify/Product/788638954\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\n \"Needs an image.\"\n ]\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n feedbackGeneratedAt\n productUpdatedAt\n messages\n }\n }\n}"
input: { "feedbackInput": [ { "productId": "gid://shopify/Product/172561227", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-05-01T23:00:00Z", "productUpdatedAt": "2021-04-28T16:00:00Z", "messages": [ "Needs a description." ] }, { "productId": "gid://shopify/Product/788638954", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-05-01T23:00:00Z", "productUpdatedAt": "2021-04-28T16:00:00Z", "messages": [ "Needs an image." ] } ] }
response: { "data": { "bulkProductResourceFeedbackCreate": { "userErrors": [], "feedback": [ { "productId": "gid://shopify/Product/172561227", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-05-01T23:00:00Z", "productUpdatedAt": "2021-04-28T16:00:00Z", "messages": [ "Needs a description." ] }, { "productId": "gid://shopify/Product/788638954", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-05-01T23:00:00Z", "productUpdatedAt": "2021-04-28T16:00:00Z", "messages": [ "Needs an image." ] } ] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation($feedbackInput: [ProductResourceFeedbackInput!]!) { bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) { userErrors { field message } feedback { productId state feedbackGeneratedAt productUpdatedAt messages } } }\",\n \"variables\": {\n \"feedbackInput\": {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"ACCEPTED\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": []\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n feedbackGeneratedAt\n productUpdatedAt\n messages\n }\n }\n }`,\n \"variables\": {\n \"feedbackInput\": {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"ACCEPTED\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": []\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($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n feedbackGeneratedAt\n productUpdatedAt\n messages\n }\n }\n }\nQUERY\n\nvariables = {\n \"feedbackInput\": {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"ACCEPTED\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": []\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 = <<[\n \"productId\" => \"gid://shopify/Product/172561227\",\n \"state\" => \"ACCEPTED\",\n \"feedbackGeneratedAt\" => \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\" => \"2021-04-28T16:00:00Z\",\n \"messages\" => [],\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($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n feedbackGeneratedAt\n productUpdatedAt\n messages\n }\n }\n }`,\n {\n variables: {\n \"feedbackInput\": {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"ACCEPTED\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": []\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n feedbackGeneratedAt\n productUpdatedAt\n messages\n }\n }\n}"
input: { "feedbackInput": { "productId": "gid://shopify/Product/172561227", "state": "ACCEPTED", "feedbackGeneratedAt": "2021-05-01T23:00:00Z", "productUpdatedAt": "2021-04-28T16:00:00Z", "messages": [] } }
response: { "data": { "bulkProductResourceFeedbackCreate": { "userErrors": [], "feedback": [ { "productId": "gid://shopify/Product/172561227", "state": "ACCEPTED", "feedbackGeneratedAt": "2021-05-01T23:00:00Z", "productUpdatedAt": "2021-04-28T16:00:00Z", "messages": [] } ] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation($feedbackInput: [ProductResourceFeedbackInput!]!) { bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) { userErrors { field message } feedback { productId state messages } } }\",\n \"variables\": {\n \"feedbackInput\": {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\n \"Needs a description.\"\n ]\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n messages\n }\n }\n }`,\n \"variables\": {\n \"feedbackInput\": {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\n \"Needs a description.\"\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($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n messages\n }\n }\n }\nQUERY\n\nvariables = {\n \"feedbackInput\": {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\"Needs a description.\"]\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 = <<[\n \"productId\" => \"gid://shopify/Product/172561227\",\n \"state\" => \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\" => \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\" => \"2021-04-28T16:00:00Z\",\n \"messages\" => [\"Needs a description.\"],\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($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n messages\n }\n }\n }`,\n {\n variables: {\n \"feedbackInput\": {\n \"productId\": \"gid://shopify/Product/172561227\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-05-01T23:00:00Z\",\n \"productUpdatedAt\": \"2021-04-28T16:00:00Z\",\n \"messages\": [\n \"Needs a description.\"\n ]\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {\n bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n productId\n state\n messages\n }\n }\n}"
input: { "feedbackInput": { "productId": "gid://shopify/Product/172561227", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-05-01T23:00:00Z", "productUpdatedAt": "2021-04-28T16:00:00Z", "messages": [ "Needs a description." ] } }
response: { "data": { "bulkProductResourceFeedbackCreate": { "userErrors": [ { "field": [ "feedbackInput", "0", "feedbackGeneratedAt" ], "message": "Feedback for a later version of this resource was already accepted." } ], "feedback": [] } } }