Skip to main content

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

NameTypeRequiredDescription
cart_idstringYes—
metafieldintegerYes—

Header parameters

NameTypeRequiredDescription
X-SOCKET-ID-XstringNo—

Request body fields

NameTypeRequired
keystringNo
modelanyYes
object_idintegerNo
user_idanyNo
valueanyNo
value_typestringNo

Responses

CodeDescription
200OK (Envelope)
400Bad Request (ErrorResponse)
401Unauthorized
404Not Found
429Too Many Requests (ErrorResponse)
500Internal Server Error (ErrorResponse)
503Service Unavailable (ErrorResponse)
Open this operation in the API reference