Skip to main content

Create Cart Metafield

API operation: Open the endpoint in the API reference

Use POST /carts/{cart_id}/metafields to create a cart metafield. The current public operation is CartMetafield.register.

If available, the operation allows authenticated roles 0, 2, and 5; ordinary cross-user access is rejected, and the cart UUID is resolved for the selected user. This is broader than administrator-only access.

Keys beginning with extra_value are included in cart-total calculation when their value type is numeric; the extra_value_ prefix is a narrower naming convention. Consult the API reference and Extra attributes (Metafields) for current fields and value types.