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($feedbackInput: [DiscountResourceFeedbackInput!]!) { bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) { userErrors { field message } feedback { discountId state feedbackGeneratedAt discountUpdatedAt messages } } }\",\n \"variables\": {\n \"feedbackInput\": [\n {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\n \"Discounts that have a discount code with spaces are not supported.\"\n ]\n },\n {\n \"discountId\": \"gid://shopify/DiscountNode/2429471\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\n \"Discount currency must be supported by catalog.\"\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: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n feedbackGeneratedAt\n discountUpdatedAt\n messages\n }\n }\n }`,\n \"variables\": {\n \"feedbackInput\": [\n {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\n \"Discounts that have a discount code with spaces are not supported.\"\n ]\n },\n {\n \"discountId\": \"gid://shopify/DiscountNode/2429471\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\n \"Discount currency must be supported by catalog.\"\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: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n feedbackGeneratedAt\n discountUpdatedAt\n messages\n }\n }\n }\nQUERY\n\nvariables = {\n \"feedbackInput\": [{\"discountId\"=>\"gid://shopify/DiscountNode/240556786\", \"state\"=>\"REQUIRES_ACTION\", \"feedbackGeneratedAt\"=>\"2021-07-15T23:00:00Z\", \"discountUpdatedAt\"=>\"2021-07-28T16:00:00Z\", \"messages\"=>[\"Discounts that have a discount code with spaces are not supported.\"]}, {\"discountId\"=>\"gid://shopify/DiscountNode/2429471\", \"state\"=>\"REQUIRES_ACTION\", \"feedbackGeneratedAt\"=>\"2021-07-15T23:00:00Z\", \"discountUpdatedAt\"=>\"2021-07-28T16:00:00Z\", \"messages\"=>[\"Discount currency must be supported by catalog.\"]}]\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 = <<[{\"discountId\"=>\"gid://shopify/DiscountNode/240556786\", \"state\"=>\"REQUIRES_ACTION\", \"feedbackGeneratedAt\"=>\"2021-07-15T23:00:00Z\", \"discountUpdatedAt\"=>\"2021-07-28T16:00:00Z\", \"messages\"=>[\"Discounts that have a discount code with spaces are not supported.\"]}, {\"discountId\"=>\"gid://shopify/DiscountNode/2429471\", \"state\"=>\"REQUIRES_ACTION\", \"feedbackGeneratedAt\"=>\"2021-07-15T23:00:00Z\", \"discountUpdatedAt\"=>\"2021-07-28T16:00:00Z\", \"messages\"=>[\"Discount currency must be supported by catalog.\"]}],\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: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n feedbackGeneratedAt\n discountUpdatedAt\n messages\n }\n }\n }`,\n {\n variables: {\n \"feedbackInput\": [\n {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\n \"Discounts that have a discount code with spaces are not supported.\"\n ]\n },\n {\n \"discountId\": \"gid://shopify/DiscountNode/2429471\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\n \"Discount currency must be supported by catalog.\"\n ]\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation($feedbackInput: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n feedbackGeneratedAt\n discountUpdatedAt\n messages\n }\n }\n}"
input: { "feedbackInput": [ { "discountId": "gid://shopify/DiscountNode/240556786", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-07-15T23:00:00Z", "discountUpdatedAt": "2021-07-28T16:00:00Z", "messages": [ "Discounts that have a discount code with spaces are not supported." ] }, { "discountId": "gid://shopify/DiscountNode/2429471", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-07-15T23:00:00Z", "discountUpdatedAt": "2021-07-28T16:00:00Z", "messages": [ "Discount currency must be supported by catalog." ] } ] }
response: { "data": { "bulkDiscountResourceFeedbackCreate": { "userErrors": [], "feedback": [ { "discountId": "gid://shopify/DiscountNode/240556786", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-07-15T23:00:00Z", "discountUpdatedAt": "2021-07-28T16:00:00Z", "messages": [ "Discounts that have a discount code with spaces are not supported." ] }, { "discountId": "gid://shopify/DiscountNode/2429471", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-07-15T23:00:00Z", "discountUpdatedAt": "2021-07-28T16:00:00Z", "messages": [ "Discount currency must be supported by catalog." ] } ] } } }
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($feedbackInput: [DiscountResourceFeedbackInput!]!) { bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) { userErrors { field message } feedback { discountId state feedbackGeneratedAt discountUpdatedAt messages } } }\",\n \"variables\": {\n \"feedbackInput\": [\n {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"ACCEPTED\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": []\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: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n feedbackGeneratedAt\n discountUpdatedAt\n messages\n }\n }\n }`,\n \"variables\": {\n \"feedbackInput\": [\n {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"ACCEPTED\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": []\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: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n feedbackGeneratedAt\n discountUpdatedAt\n messages\n }\n }\n }\nQUERY\n\nvariables = {\n \"feedbackInput\": [{\"discountId\"=>\"gid://shopify/DiscountNode/240556786\", \"state\"=>\"ACCEPTED\", \"feedbackGeneratedAt\"=>\"2021-07-15T23:00:00Z\", \"discountUpdatedAt\"=>\"2021-07-28T16:00:00Z\", \"messages\"=>[]}]\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 = <<[{\"discountId\"=>\"gid://shopify/DiscountNode/240556786\", \"state\"=>\"ACCEPTED\", \"feedbackGeneratedAt\"=>\"2021-07-15T23:00:00Z\", \"discountUpdatedAt\"=>\"2021-07-28T16:00:00Z\", \"messages\"=>[]}],\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: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n feedbackGeneratedAt\n discountUpdatedAt\n messages\n }\n }\n }`,\n {\n variables: {\n \"feedbackInput\": [\n {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"ACCEPTED\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": []\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation($feedbackInput: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n feedbackGeneratedAt\n discountUpdatedAt\n messages\n }\n }\n}"
input: { "feedbackInput": [ { "discountId": "gid://shopify/DiscountNode/240556786", "state": "ACCEPTED", "feedbackGeneratedAt": "2021-07-15T23:00:00Z", "discountUpdatedAt": "2021-07-28T16:00:00Z", "messages": [] } ] }
response: { "data": { "bulkDiscountResourceFeedbackCreate": { "userErrors": [], "feedback": [ { "discountId": "gid://shopify/DiscountNode/240556786", "state": "ACCEPTED", "feedbackGeneratedAt": "2021-07-15T23:00:00Z", "discountUpdatedAt": "2021-07-28T16:00:00Z", "messages": [] } ] } } }
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($feedbackInput: [DiscountResourceFeedbackInput!]!) { bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) { userErrors { field message } feedback { discountId state messages } } }\",\n \"variables\": {\n \"feedbackInput\": {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\n \"Discount currency must be supported by catalog.\"\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: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n messages\n }\n }\n }`,\n \"variables\": {\n \"feedbackInput\": {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\n \"Discount currency must be supported by catalog.\"\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: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n messages\n }\n }\n }\nQUERY\n\nvariables = {\n \"feedbackInput\": {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\"Discount currency must be supported by catalog.\"]\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 \"discountId\" => \"gid://shopify/DiscountNode/240556786\",\n \"state\" => \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\" => \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\" => \"2021-07-28T16:00:00Z\",\n \"messages\" => [\"Discount currency must be supported by catalog.\"],\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: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n messages\n }\n }\n }`,\n {\n variables: {\n \"feedbackInput\": {\n \"discountId\": \"gid://shopify/DiscountNode/240556786\",\n \"state\": \"REQUIRES_ACTION\",\n \"feedbackGeneratedAt\": \"2021-07-15T23:00:00Z\",\n \"discountUpdatedAt\": \"2021-07-28T16:00:00Z\",\n \"messages\": [\n \"Discount currency must be supported by catalog.\"\n ]\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation($feedbackInput: [DiscountResourceFeedbackInput!]!) {\n bulkDiscountResourceFeedbackCreate(feedbackInput: $feedbackInput) {\n userErrors {\n field\n message\n }\n feedback {\n discountId\n state\n messages\n }\n }\n}"
input: { "feedbackInput": { "discountId": "gid://shopify/DiscountNode/240556786", "state": "REQUIRES_ACTION", "feedbackGeneratedAt": "2021-07-15T23:00:00Z", "discountUpdatedAt": "2021-07-28T16:00:00Z", "messages": [ "Discount currency must be supported by catalog." ] } }
response: { "data": { "bulkDiscountResourceFeedbackCreate": { "userErrors": [ { "field": [ "feedbackInput", "0", "feedbackGeneratedAt" ], "message": "Feedback for a later version of this resource was already accepted." } ], "feedback": [] } } }