Shopify metafields.json API returning "Continue" even though no cookies are stored

New Member
10 0 0



I am working on implementing the metafield.json API to assign a metafield to a product resource. Below is my URL, and request body.



  "metafield": {
    "namespace": "productId",
    "key": "productId",
    "value": 25,
    "value_type": "string"

I am using Postman to execute these requests, I saw other posts where others were instructed to clear the cookies before executing a POST request. I have done that but still receive this "Continue" response




	<script type="text/javascript">
		window.location = "https:\/\/\/services\/login\/identity?destination_uuid=836a1726-5bd4-4c97-8cfa-08cf8373bbbc\u0026merge_ignore_postponed=false\u0026prompt=merge\\u0026ui_locales=en\u0026ux=shop";



What am I doing incorrectly? Everything I've seen said clearing the cookies would work. Funny enough the POST request to retrieve a single metafield works just fine if I clear the cookies before, but for this one it still gives that result.


Any ideas????

Shopify Partner
39 1 4

There seems to be an issue with authentication. So either your credentials are not correct (obviously these are working as your single request went well) or the endpoint (link) is not addressed correctly. Try to remove the hash symbol (#) from your product-id.

New Member
10 0 0

Hey @leinaD,


Thank you for the reply, this actually seems to work and I will mark your reply as the solution. I do have one more question about the API if you might be able to help me out. This endpoint seems to create a metafield for a product, but do you know if there is a way to create a variant metafield via the API? Appreciate your time and response!

Shopify Partner
39 1 4

Sure Quinn, you can add Metafields to your variant as well. The endpoint is like this:



I prefer to add variant related data to my product metafields. I use the products EAN as metafield namespace and can simply select e.g. shipping-time by writing this with liquid:


{{ product.metafields.1234567890123.shippingttime }}

You can as well have a look at the API reference, which is nicely done.