Ajax Cart API missing item_components data - not unified with liquid cart object

Topic summary

Issue Identified:
The AJAX Cart API lacks item_components data that exists in the Liquid cart object, creating inconsistency between the two data sources. This prevents AJAX-based carts from displaying component items within native bundles.

Technical Details:

  • AJAX Cart API returns has_components: false but no item_components array
  • Liquid cart.line_items object includes item_components data
  • An image demonstrates the missing data in the API response

Feature Request:
Unify the Cart API response to include item_components matching the Liquid object structure, enabling consistent bundle rendering across both cart implementation methods.

Current Status:

  • Liam confirmed understanding the issue and escalated to internal dev team
  • No resolution timeline provided yet
  • Teams are currently using workarounds (parsing Liquid cart object as JSON in templates), which is not ideal

Discussion remains open awaiting updates from Shopify’s development team.

Summarized with AI on October 23. AI used: claude-sonnet-4-5-20250929.

The Cart API doesn’t support the same item_components data as the liquid cart, which creates a mismatch between the two data sources - and also means ajax specific carts can’t show component items.

Cart.js
https://shopify.dev/docs/api/ajax/reference/cart#get-locale-cart-js

{
	...
	"items": {
		...
			"has_components": false,
		...
	}
	...
}

cart.line_items liquid object

https://shopify.dev/docs/api/liquid/objects/line_item#line_item-item_components

{
...
	"item_components": null,
...
}

Can we have a feature request to unify the Cart API response to include item_components similar to the liquid object for line_items?

Thanks!

Hi - just to confirm, the Cart API is working as expected but the AJAX API isn’t showing the contents of the bundles, is this correct?

Yep - that’s correct. Thanks @Liam

It is working as expected but the data isn’t helpful, so this is more of a feature request to ensure both sources of cart data (from the AJAX API, and from Liquid) present the same item_components data.

This way displaying native bundle component items can be supported through both methods of rendering carts

I understand the issue how - it does seem that AJAX API may need to be updated ton accommodate for bundles, I’m connecting with our internal dev team on this.

Thanks so much for your time @Liam Appreciate it!

Hey @Liam Any updates here on this was?

Our team is currently having to parse the cart liquid object as JSON in a template and then using JS parse it as a workaround which is not ideal.

Having the AJAX Cart API reflect the latest state of play and being in parity with liquid API is really important.