Cart token in Ajax API response now includes key param
API
Effective June 21, 2024
Action required
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.