Add additional variable/information fields to product in API or CSV

apiexplorer
Visitor
1 0 0

Hello,

I need to add additional fields to a product (beyond the ones Shopify provides). Ideally, it would be some sort of key-value that I can add to a product via API or CSV and that I can later retrieve in my storefront and admin. Is there any way to do this? Are metafields the way to go? 

For example, I would like to add key-values for each product like: "marking-price-1-colors": "3", "marking-price-2-colors": "5" ... etc

 

Reply 1 (1)

Jonathan-HA
Shopify Partner
316 24 99

Hey @apiexplorer ,

Metafields would indeed be the best way to do this. You can assign Metafields at the product level or variant level.

The Metafield structure is already in key/value format.  It also supports namespaces so you can have identical key names in different namespaces (e.g. facebook.category, google_shopping.category).

You can also use raw JSON strings for the Metafield value for more flexibility (e.g. nested data structures)

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill