Update Cart Metafield
API operation: Open the endpoint in Scalar
Use PUT /carts/{cart_id}/metafields/{metafield} to update a cart metafield. The operation documented here is CartMetafield.update.
Parameter:
{metafield}identifies the metafield to update on the selected cart.
The documented schema requires authentication, resolves the cart by UUID and user, and scopes the metafield by cart identity.
See Cart model and Extra attributes (Metafields).
OpenAPI reference
Operation: PUT /carts/{cart_id}/metafields/{metafield}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
cart_id | string | Yes | — |
metafield | integer | Yes | — |
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
X-SOCKET-ID-X | string | No | — |
Request body fields
| Name | Type | Required |
|---|---|---|
key | string | No |
model | any | Yes |
object_id | integer | No |
user_id | any | No |
value | any | No |
value_type | string | No |
Responses
| Code | Description |
|---|---|
| 200 | OK (Envelope) |
| 400 | Bad Request (ErrorResponse) |
| 401 | Unauthorized |
| 404 | Not Found |
| 429 | Too Many Requests (ErrorResponse) |
| 500 | Internal Server Error (ErrorResponse) |
| 503 | Service Unavailable (ErrorResponse) |