Value can't be blank error for list.single_line_text_field

Solved

Value can't be blank error for list.single_line_text_field

carlgilbert
Visitor
2 1 0

Hi

 

I am trying to post a metafield value for a field with the type list.single_line_text_field however I get an error.

 

I am testing this in Postman. This is the body of the message:

 

{
  "metafield": {
    "namespace""specifications",
    "key""models",
    "value": ["Ford""BMW""Fiat"],
    "type""list.single_line_text_field"
  }
}
 
This is the response:
 
{
    "errors": {
        "value": [
            "can't be blank."
        ]
    }
}
 
This is my URL: https://[my API key]:[my API token]@[my_shop].myshopify.com/admin/api/2023-04/products/[product id]/metafields.json
I am using a POST request.  My headers include:
 - Content-Type = application/json
 - X-Shopify-Access-Token = My API token
 
What am I doing wrong here?
Accepted Solution (1)

carlgilbert
Visitor
2 1 0

This is an accepted solution.

This issue has been solved with the help of @tyler-rowsell 

 

"[\"Red\",\"Blue\",\"Green\"]"

 

View solution in original post

Reply 1 (1)

carlgilbert
Visitor
2 1 0

This is an accepted solution.

This issue has been solved with the help of @tyler-rowsell 

 

"[\"Red\",\"Blue\",\"Green\"]"