Unable to Update Product Metafield Using Shopify REST Admin API

Unable to Update Product Metafield Using Shopify REST Admin API

pc_propero98
Shopify Partner
16 0 0

I’m trying to update a product metafield using the Shopify REST Admin API, but I’m encountering an error. Here’s the current setup:

Metafield Details:
{
"metafields": [
{
"id": 44534555355,
"namespace": "custom",
"key": "entries",
"value": 5,
"description": null,
"owner_id": 24244536956,
"created_at": "2024-08-23T05:02:10-06:00",
"updated_at": "2024-09-16T06:44:44-06:00",
"owner_resource": "product",
"type": "number_integer",
}
]
}

update payload:
{
"metafield": {
"product_id": 24244536956,
"id": 44534555355,
"key": "entries",
"namespace": "custom",
"value": 10,
"type": "number_integer"
}
}

Error Message:
{
"errors": {
"metafield": "Required parameter missing or invalid"
}
}

I’ve checked the API documentation and my payload, but it seems like I’m missing something. Can someone help me identify what’s causing this error and how to properly format the update payload?

Replies 0 (0)