Skip to main content

Cart item custom fields returned in cart include responses

MINOR Cart item custom fields in include=items responses

Retrieving a single cart with include=items now returns each item's custom fields, the same data you get from Get Cart Items. Storefronts can read a cart and its fully described items in one request instead of two.

What's New?

  • Consistent item data - Fields defined on the cart_items flow now appear on every item under included.items in GET /v2/carts/:id?include=items, exactly as they do in GET /v2/carts/:id/items
  • Fewer requests - Storefronts that called Get Cart Items only to read item custom fields can drop that call
  • No change without a flow - Stores that have not defined a cart_items flow see no difference in the response

What's Changed?

  • Cart event payloads - cart.created and cart.updated events delivered to webhooks and message queues are built from this same cart response, so the items in those payloads now carry the same custom fields. The change is additive; existing keys are unchanged
  • Payload size - Each field on the cart_items flow adds one key to every included item, null when unset. SQS queues cap messages at 256 KiB and elide included resources above that limit, so stores with a wide cart_items flow and large carts may want to check their headroom

This applies to single-cart reads only. The cart list endpoint, orders, and quotes are unchanged.

For details see:

Ask External AI