App reviews, troubleshooting, and recommendations
Hi,
I'm fairly new to Shopify and I am trying to create a python script that adds products onto the page. The products will have a custom metafield with metaobjects as values. Below is the code I have right now:
product_payload = {
'product': {
'title': row['Title'],
'body_html': row['Description'],
'product_type': 'painting',
'variants': [{
'price': row['Price'],
}],
'metafield': {
'key': 'Artist',
'value': "test-artist",
'value_type': 'string',
'namespace': 'custom'
}
}
}
# Make the API request to create the product
response = requests.post(admin,
headers=headers,
json=product_payload)
It says the product is successfully created, but the custom metafield value remains blank.
Any guidance will be greatly appreciated.
I suppose you have you found a solution to your problem in the last 5 months ! I'm trying to do the same with no success so far. I tried (in Python) directly using requests as well as using ShopifyAPI but so far without success... Could you share the solution you found, please ?
Thanks a lot !
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023