All things Shopify and commerce
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?
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024