I inspected all apis made available by shopify and could not find any that exposes product category. would like to send the taxonomy from my erp to shopify
E.g. for a product of type = hats i want to set programmatically via a put or patch request the category to gid://shopify/TaxonomyCategory/aa-2-17.
Hey @Silviu_Virlan! Remy is spot on here - the category field on productSet is what you need, and the GID format you already have (gid://shopify/TaxonomyCategory/aa-2-17) is correct.
Here’s an example:
mutation {
productSet(
input: {
category: "gid://shopify/TaxonomyCategory/aa-2-17"
},
identifier: {
id: "gid://shopify/Product/YOUR_PRODUCT_ID"
}
) {
product {
id
category {
id
name
}
}
userErrors {
field
message
}
}
}