Stay up to date

Developer changelog

API

Additional cart item properties available in Shopify's AJAX API response

Effective July 08, 2019

New

We've added new properties on cart items listed in the JSON response of Shopify's AJAX API. Each cart item listed in the items array has the following additional properties.

  • featured_image: an object with the varaint image's alt text, aspect_ratio and url.
  • options_with_values: an array of objects with each product option's name and value.
  • product_has_only_default_variant: a boolean describing if the product only has a default variant.

This gives theme developers more information about cart items when working with the AJAX API to build storefront designs.

To learn more about interacting with the cart through AJAX calls, read about the Shopify's AJAX API in the Shopify Help Center.

You can also read about these new properties' Liquid equivalent in the line_item object in the Shopify Help Center.