Metafields are an experimental feature to Smart Wishlist REST API. The purpose of this API is to enable customization of the Wishlist based on certain metafield values.
However, this API allows you to fetch any metafield value from Shopify, (including those unrelated to our app).
This API is read only as of now. Only GET requests are supported. Below is the documentation.
There are 3 parameters to the passed along with request.
resource: It could be product.metafields or product.metafields.namespace.key.
parentid: Corresponding product ID
The response would be in JSON, with the result parameter containing the value. If the resource is product.metafields.namespace.key, the result would simply contain the value. If resource is product.metafields, it would return all public metafields for that product. The result would contain another JSON with id,namespace,key,value and description.
We strongly recommend that you cache the metafield values on the browser for at least 7 days, either as cookies or in local storage. This would reduce the amount of requests the app makes to the Shopify API on behalf of your store. Since Shopify imposes a rate limit on its API, a high traffic on the store can disrupt the process. Therefore a conservative usage is recommended.