Create a feedback record indicating the product is usable by your app
Description
Indicates that the app does not have any outstanding issues with this product.
Query
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}
Variables
{
"feedbackInput": {
"productId": "gid://shopify/Product/172561227",
"state": "ACCEPTED",
"feedbackGeneratedAt": "2021-05-01T23:00:00Z",
"productUpdatedAt": "2021-04-28T16:00:00Z",
"messages": []
}
}
cURL
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2026-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation($feedbackInput: [ProductResourceFeedbackInput!]!) { bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) { userErrors { field message } feedback { productId state feedbackGeneratedAt productUpdatedAt messages } } }",
"variables": {
"feedbackInput": {
"productId": "gid://shopify/Product/172561227",
"state": "ACCEPTED",
"feedbackGeneratedAt": "2021-05-01T23:00:00Z",
"productUpdatedAt": "2021-04-28T16:00:00Z",
"messages": []
}
}
}'
React Router
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}`,
{
variables: {
"feedbackInput": {
"productId": "gid://shopify/Product/172561227",
"state": "ACCEPTED",
"feedbackGeneratedAt": "2021-05-01T23:00:00Z",
"productUpdatedAt": "2021-04-28T16:00:00Z",
"messages": []
}
},
},
);
const json = await response.json();
return json.data;
}
Ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}
QUERY
variables = {
"feedbackInput": {
"productId": "gid://shopify/Product/172561227",
"state": "ACCEPTED",
"feedbackGeneratedAt": "2021-05-01T23:00:00Z",
"productUpdatedAt": "2021-04-28T16:00:00Z",
"messages": []
}
}
response = client.query(query: query, variables: variables)
Node.js
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}`,
"variables": {
"feedbackInput": {
"productId": "gid://shopify/Product/172561227",
"state": "ACCEPTED",
"feedbackGeneratedAt": "2021-05-01T23:00:00Z",
"productUpdatedAt": "2021-04-28T16:00:00Z",
"messages": []
}
},
},
});
Shopify CLI
shopify app execute \
--query \
'mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}' \
--variables \
'{
"feedbackInput": {
"productId": "gid://shopify/Product/172561227",
"state": "ACCEPTED",
"feedbackGeneratedAt": "2021-05-01T23:00:00Z",
"productUpdatedAt": "2021-04-28T16:00:00Z",
"messages": []
}
}'
Direct API Access
const response = await fetch('shopify:admin/api/2026-04/graphql.json', {
method: 'POST',
body: JSON.stringify({
query: `
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}
`,
variables: {
"feedbackInput": {
"productId": "gid://shopify/Product/172561227",
"state": "ACCEPTED",
"feedbackGeneratedAt": "2021-05-01T23:00:00Z",
"productUpdatedAt": "2021-04-28T16:00:00Z",
"messages": []
}
},
}),
});
const { data } = await response.json();
console.log(data);
Response
{
"bulkProductResourceFeedbackCreate": {
"userErrors": [],
"feedback": [
{
"productId": "gid://shopify/Product/172561227",
"state": "ACCEPTED",
"feedbackGeneratedAt": "2021-05-01T23:00:00Z",
"productUpdatedAt": "2021-04-28T16:00:00Z",
"messages": []
}
]
}
}
Create a new Product ResourceFeedback
Query
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}
Variables
{
"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."
]
}
]
}
cURL
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2026-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation($feedbackInput: [ProductResourceFeedbackInput!]!) { bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) { userErrors { field message } feedback { productId state feedbackGeneratedAt productUpdatedAt messages } } }",
"variables": {
"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."
]
}
]
}
}'
React Router
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}`,
{
variables: {
"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."
]
}
]
},
},
);
const json = await response.json();
return json.data;
}
Ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}
QUERY
variables = {
"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 = client.query(query: query, variables: variables)
Node.js
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}`,
"variables": {
"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."
]
}
]
},
},
});
Shopify CLI
shopify app execute \
--query \
'mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}' \
--variables \
'{
"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."
]
}
]
}'
Direct API Access
const response = await fetch('shopify:admin/api/2026-04/graphql.json', {
method: 'POST',
body: JSON.stringify({
query: `
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
feedbackGeneratedAt
productUpdatedAt
messages
}
}
}
`,
variables: {
"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."
]
}
]
},
}),
});
const { data } = await response.json();
console.log(data);
Response
{
"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."
]
}
]
}
}
Error response
Description
Sending outdated feedback (previous feedback payload has a greater resource_updated_at value) returns an error
Query
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
messages
}
}
}
Variables
{
"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."
]
}
}
cURL
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2026-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation($feedbackInput: [ProductResourceFeedbackInput!]!) { bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) { userErrors { field message } feedback { productId state messages } } }",
"variables": {
"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."
]
}
}
}'
React Router
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
messages
}
}
}`,
{
variables: {
"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."
]
}
},
},
);
const json = await response.json();
return json.data;
}
Ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
messages
}
}
}
QUERY
variables = {
"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 = client.query(query: query, variables: variables)
Node.js
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
messages
}
}
}`,
"variables": {
"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."
]
}
},
},
});
Shopify CLI
shopify app execute \
--query \
'mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
messages
}
}
}' \
--variables \
'{
"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."
]
}
}'
Direct API Access
const response = await fetch('shopify:admin/api/2026-04/graphql.json', {
method: 'POST',
body: JSON.stringify({
query: `
mutation($feedbackInput: [ProductResourceFeedbackInput!]!) {
bulkProductResourceFeedbackCreate(feedbackInput: $feedbackInput) {
userErrors {
field
message
}
feedback {
productId
state
messages
}
}
}
`,
variables: {
"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."
]
}
},
}),
});
const { data } = await response.json();
console.log(data);
Response
{
"bulkProductResourceFeedbackCreate": {
"userErrors": [
{
"field": [
"feedbackInput",
"0",
"feedbackGeneratedAt"
],
"message": "Feedback for a later version of this resource was already accepted."
}
],
"feedback": []
}
}