Setting product category using REST API

Setting product category using REST API

jjdesign1
New Member
10 0 0
Hi, i've been using Python to try and import my Ebay products to Shopify automatically to save time on manually copying our catologue from Ebay.
 
I am using the API (I'm using the REST API, but happy for suggestions using GraphQL) to create a product, how can I set the product category and the category metafields in the same way I can when creating a product manually?
 
Currently I cannot set it and it's blank (photo 1) and then of course leading to empty metafields. Eventhough I try define metafields on my end, it just chucks out access to this namespace and key on metafields for this resource type is not allowed. Any help is greatly appreciated
 
Screenshot 2024-12-11 225542.pngScreenshot 2024-12-11 225547.png
 
 
 
 
 
 
 
 
Replies 2 (2)
BuyCheapCentral
Visitor
1 0 0

Hi, how do you set this up inside Shopify with existing products ? I'm not sure where to apply this code. I'm new here.. thanks

jjdesign1
New Member
10 0 0

Just wondering if anyone has any further suggestions?