I have a store with functionalities heavily reliant on products custom metafields. For a non-technical person, creating a product like that would be super difficult to fill out properly, so I want to create a base in airtable from where all correct information would be filled and then passed to shopify with an API call.
The problem is when metafields values are empty I cannot get their IDs. Using a method like ‘Retrieve a list of metafields by using query parameters’ returns an empty array. Similarly, i cannot get the metfields ids when I try to get them one by one. I saw on this forum that is a problem for other people as well, but found no answer…
Hacky way might be creating a default value for every metafield, then i could retrieve the IDs and override the values, but I do not know if that’s possible.
Hi, thanks for responding. I’ve understood I have used inaccurate names to describe my problem. What I meant is I have metafield definitions in place and I want to populate those definitions but don’t know how to grab the definitions to put my data.
Maybe I misunderstood the solution. Tried “Create Metafield” method to provide a value for existing Metafield I got an error response “Namespace and key cannot be changed for an existing record. Try creating a new one.”
Updated: My bad! It works. Just was a uppercase mistype for metafield “key”