Focuses on API authentication, access scopes, and permission management.
I am using Postman for testing to create a Product but it is not working.
You could try using the GraphQL API instead, which has a mutation for productCreate would look something like:
mutation {
productCreate(input: {
title: "Sample Product",
vendor: "SampleVendor",
descriptionHtml: "<b>Description</b>",
status: DRAFT,
productType: "DEFAULT_TYPE",
templateSuffix: "default_template",
productOptions: [{
name: "Option",
position: 1,
values: [{name: "Value1"}, {name: "Value2"}]
}],
metafields: [{
namespace: "custom",
key: "pickers",
value: "{\"colors\":[{\"title\":\"Color A\",\"material_handle\":\"material1\"},{\"title\":\"Color B\",\"material_handle\":\"material2\"}]}",
type: "json"
}]
}) {
product {
id
title
status
}
userErrors {
field
message
}
}
}
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi,
what is the response of your request?
What I am seeing from the screenshot: The tags must be a string with comma separated tags.
All the best,
Michael
Has the specific error message been returned? Please send it out and take a look