---
title: >-
  Cart token in Ajax API response now includes key param - Shopify developer
  changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/cart-token-in-ajax-api-response-now-includes-key-param
  md: >-
    https://shopify.dev/changelog/cart-token-in-ajax-api-response-now-includes-key-param.md
metadata:
  effectiveApiVersion: ''
  affectedApi:
    - displayName: Liquid
      handle: liquid
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: New
    handle: new
  indicatesActionRequired: true
  createdAt: '2024-06-21T15:05:26-04:00'
  postedAt: '2024-06-21T14:54:00-04:00'
  updatedAt: '2024-07-02T15:01:52-04:00'
  effectiveAt: '2024-06-21T14:54:00-04:00'
---

June 21, 2024

Tags:

* Action Required
* Liquid

# Cart token in Ajax API response now includes key param

The `token` value in the JSON of the cart response now includes a key param as of 2024-06-21. This response is returned when the cart is manipulated or queried using Shopify's Ajax API for Cart.

\*\*Example Format: \*\*

* Before: token:c1-7a2abe82733a34e84aa472d57fb5c3c1
* After: token:c1-7a2abe82733a34e84aa472d57fb5c3c1\*\*?key=824bdj25mhg1242bdb385\*\*

\*\*Action Required: \*\* Ensure that your code is free from hard-coded assumptions (e.g. Using regex to identify a cart token) about the format and structure of the cart JSON response. If this value is stored as a key in an external database, ensure this change does not break the existing functionality. If storage of the cart token is required, we recommend using the complete value including the key param.
