REST Admin API Article put returns 200 but fails

Topic summary

A developer encountered an issue where a PUT request to update a blog article via the Shopify Admin REST API (version 2023-10) returns a 200 success status but fails to actually update the data.

Root Cause Identified:

  • When updating an existing metafield on a blog article, the metafield’s id must be included in the request body—not just the key
  • Without the metafield id, the request fails silently: it returns 200 and a response suggesting success, even though no update occurs

Suggested Improvements:

  • The API should return a proper error status (e.g., 400 Bad Request) with a validation message instead of silently failing
  • Documentation at shopify.dev/docs/api/admin-rest/2023-10/resources/article should include an example demonstrating how to update existing metafield values

Resolution: Including the metafield id in the request body resolves the issue and allows successful updates.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

The following PUT request to the Admin REST API results in a 200 but does not actually update the article data

URL:

https://{{shopify_store_name}}.myshopify.com/admin/api/2023-10/blogs/{{shopify_blog_id}}/articles/{{article_id}}.json

Body:

{
    "article":{
        "id": {{article_id}},
        "title": "Updated title",
        "body_html": "Updated content",
        "metafields":[
            {
                "key":"author_name",
                "value":"Updated Author Name",
                "type":"single_line_text_field",
                "namespace":"global"
            }
        ]
    }
}

Hey @Shopify_77 ,

It turns out that if you need to update an existing metafield value, at least on a blog article, then you need to include the id of the metafield (not just the key). Otherwise the entire request fails silently, returns a 200 and the response indicates the request worked even though it did not. It seems like this case should instead return a bad request and a validation message.

It would also be helpful to add an example of updating a metafield value here:

https://shopify.dev/docs/api/admin-rest/2023-10/resources/article#Addametafieldtoanexistingarticle

This Body works:

{
    "article":{
        "id": {{article_id}},
        "title": "Updated title",
        "body_html": "Updated content",
        "metafields":[
            {
                "key":"author_name",
                "value":"Updated Author Name",
                "id": {{metafield_id}},
                "type":"single_line_text_field",
                "namespace":"global"
            }
        ]
    }
}

Thanks