# \#ajax-api

**URL:** https://community.shopify.dev/tag/ajax-api/59.md

[Latest](https://community.shopify.dev/latest.md) · [Categories](https://community.shopify.dev/categories.md) · [Tags](https://community.shopify.dev/tags.md)

---

## [Feature request: Batch variant pricing endpoint for contextual pricing in Online Store](https://community.shopify.dev/t/feature-request-batch-variant-pricing-endpoint-for-contextual-pricing-in-online-store/40068)

<div class="topic-metadata">

**Author:** [@mise](https://community.shopify.dev/u/mise)\
**Replies:** 2\
**Last updated:** [November 25, 2026, 1:34pm UTC](https://community.shopify.dev/t/feature-request-batch-variant-pricing-endpoint-for-contextual-pricing-in-online-store/40068 "2026-11-25T13:34:04Z")

</div>

Short description of issue Contextual pricing fetching is uneffiecient Reproduction steps Fetch multiple products from product\_handle.js Additional info Fetching contextual pricing for multiple variants in the Online S…

---

## [Order confirmation email shows nested cart line items twice](https://community.shopify.dev/t/order-confirmation-email-shows-nested-cart-line-items-twice/32137)

<div class="topic-metadata">

**Author:** [@dostu](https://community.shopify.dev/u/dostu)\
**Replies:** 15\
**Last updated:** [November 21, 2026, 11:24am UTC](https://community.shopify.dev/t/order-confirmation-email-shows-nested-cart-line-items-twice/32137 "2026-11-21T11:24:41Z")

</div>

When using parent\_id in /cart/add.js to create nested cart lines (e.g., a main product with a free gift nested underneath), the default order confirmation email renders the parent line item twice: Once as a standalone …

---

## [Can a deal aggregator register for Web Bot Auth under the API terms?](https://community.shopify.dev/t/can-a-deal-aggregator-register-for-web-bot-auth-under-the-api-terms/39291)

<div class="topic-metadata">

**Author:** [@DailyLaxDeals](https://community.shopify.dev/u/DailyLaxDeals)\
**Replies:** 3\
**Last updated:** [November 11, 2026, 5:15pm UTC](https://community.shopify.dev/t/can-a-deal-aggregator-register-for-web-bot-auth-under-the-api-terms/39291 "2026-11-11T17:15:59Z")

</div>

Short description of issue Store public product.json requests returning HTTP 429 Reproduction steps Send a GET request to a store’s public collection URL: /collections//products.json?limit=250, using a bot User-Agent th…

---

## [Third-party Web Bot Auth crawler (KozmetiketBot): registration submitted, still 429 local\_rate\_limited](https://community.shopify.dev/t/third-party-web-bot-auth-crawler-kozmetiketbot-registration-submitted-still-429-local-rate-limited/39007)

<div class="topic-metadata">

**Author:** [@Murat\_Yolalan](https://community.shopify.dev/u/Murat_Yolalan)\
**Replies:** 4\
**Last updated:** [November 4, 2026, 9:16pm UTC](https://community.shopify.dev/t/third-party-web-bot-auth-crawler-kozmetiketbot-registration-submitted-still-429-local-rate-limited/39007 "2026-11-04T21:16:22Z")

</div>

Short description of issue Third-party Web Bot Auth crawler (KozmetiketBot): registration form submitted, but every storefront request still returns 429 local\_rate\_limited Link to Shopify Store https://www.eveshop.com.t…

---

## [500+ Line Items Wipes Cart](https://community.shopify.dev/t/500-line-items-wipes-cart/36536)

<div class="topic-metadata">

**Author:** [@ceri\_waters](https://community.shopify.dev/u/ceri_waters)\
**Replies:** 14\
**Last updated:** [October 21, 2026, 5:54pm UTC](https://community.shopify.dev/t/500-line-items-wipes-cart/36536 "2026-10-21T17:54:53Z")

</div>

Short description of issue Adding items to your cart to push it over 500 unique lines simply wipes the cart rather than reporting back a Cart API error.. Link to Shopify Store N/A Reproduction steps Add 499 Line Items …

---

## [Shop\_events\_listener.js drops add-to-cart analytics when a Cart Transform function merges line items](https://community.shopify.dev/t/shop-events-listener-js-drops-add-to-cart-analytics-when-a-cart-transform-function-merges-line-items/35573)

<div class="topic-metadata">

**Author:** [@Anton](https://community.shopify.dev/u/Anton)\
**Replies:** 19\
**Last updated:** [October 19, 2026, 2:22pm UTC](https://community.shopify.dev/t/shop-events-listener-js-drops-add-to-cart-analytics-when-a-cart-transform-function-merges-line-items/35573 "2026-10-19T14:22:10Z")

</div>

Short description of issue A /cart/add request whose line items get merged by a Cart Transform function makes shop\_events\_listener.js throw Payload body and response have different number of items, so no product\_added\_to…

---

## [The selected\_or\_first\_available\_variant can return an unavailable variant](https://community.shopify.dev/t/the-selected-or-first-available-variant-can-return-an-unavailable-variant/36105)

<div class="topic-metadata">

**Author:** [@Gideon](https://community.shopify.dev/u/Gideon)\
**Replies:** 4\
**Last updated:** [October 16, 2026, 9:56pm UTC](https://community.shopify.dev/t/the-selected-or-first-available-variant-can-return-an-unavailable-variant/36105 "2026-10-16T21:56:57Z")

</div>

Imagine you have a product like this randomly selected Nike shoe that comes in both “Regular” and “Wide”, and you want to hide the unavailable Colors for the “Wide” fit and include 15-18 shoe sizes for the “Wide” fit: …

---

## [Ajax Cart API applies a customer-segment discount code to guest carts](https://community.shopify.dev/t/ajax-cart-api-applies-a-customer-segment-discount-code-to-guest-carts/38514)

<div class="topic-metadata">

**Author:** [@Steve\_Jiang](https://community.shopify.dev/u/Steve_Jiang)\
**Replies:** 1\
**Last updated:** [October 12, 2026, 11:30am UTC](https://community.shopify.dev/t/ajax-cart-api-applies-a-customer-segment-discount-code-to-guest-carts/38514 "2026-10-12T11:30:59Z")

</div>

Short description of issue A customer-segment discount code shows as applied in guest carts. Checkout removes it only after the buyer enters an email. Reproduction steps Reproduced 2026-10-11 14:59 UTC. Open a new bro…

---

## [Getting 422 error from /cart/add.js even though product is in stock](https://community.shopify.dev/t/getting-422-error-from-cart-add-js-even-though-product-is-in-stock/16764)

<div class="topic-metadata">

**Author:** [@KaalTechGeeks](https://community.shopify.dev/u/KaalTechGeeks)\
**Replies:** 11\
**Last updated:** [September 29, 2026, 8:11pm UTC](https://community.shopify.dev/t/getting-422-error-from-cart-add-js-even-though-product-is-in-stock/16764 "2026-09-29T20:11:44Z")

</div>

Hey everyone, I came across this post on the Shopify Community where a merchant mentioned that customers weren’t able to add products to their cart. When I looked into it, I saw they were using the /cart/update.js endp…

---

## [Aggressive bot detection with 429 errors AJAX Cart API](https://community.shopify.dev/t/aggressive-bot-detection-with-429-errors-ajax-cart-api/28900)

<div class="topic-metadata">

**Author:** [@Zak](https://community.shopify.dev/u/Zak)\
**Replies:** 112\
**Last updated:** [September 29, 2026, 2:24am UTC](https://community.shopify.dev/t/aggressive-bot-detection-with-429-errors-ajax-cart-api/28900 "2026-09-29T02:24:13Z")

</div>

We have been receiving more and more complaints of merchants seeing their cart crash due to 429 errors, not only on the /cart/add.js and other mutation endpoints, but on the /cart.js endpoint as well. The issue is parti…

---

## [Can the Storefront API reuse an existing B2B customer session in a theme?](https://community.shopify.dev/t/can-the-storefront-api-reuse-an-existing-b2b-customer-session-in-a-theme/37084)

<div class="topic-metadata">

**Author:** [@Robin\_Sch](https://community.shopify.dev/u/Robin_Sch)\
**Replies:** 1\
**Last updated:** [August 24, 2026, 6:31pm UTC](https://community.shopify.dev/t/can-the-storefront-api-reuse-an-existing-b2b-customer-session-in-a-theme/37084 "2026-08-24T18:31:19Z")

</div>

Short description of issue Use existing Online Store B2B session with Storefront API in a theme? Reproduction steps Log in to an Online Store as a B2B customer with company-specific pricing. Open a product page. Liquid…

---

## [Synchronous XHR deprecation warning in shop\_events\_listener.js (confirmed not theme/app related)](https://community.shopify.dev/t/synchronous-xhr-deprecation-warning-in-shop-events-listener-js-confirmed-not-theme-app-related/35374)

<div class="topic-metadata">

**Author:** [@NB1](https://community.shopify.dev/u/NB1)\
**Replies:** 1\
**Last updated:** [June 19, 2026, 8:20am UTC](https://community.shopify.dev/t/synchronous-xhr-deprecation-warning-in-shop-events-listener-js-confirmed-not-theme-app-related/35374 "2026-06-19T08:20:33Z")

</div>

Short description of issue Synchronous XHR deprecation warning in core Shopify script shop\_events\_listener.js Link to Shopify Store northbyone.com.au Reproduction steps Run any page of the store through Google PageSpe…

---

## [Fetch section in context of primary market](https://community.shopify.dev/t/fetch-section-in-context-of-primary-market/34830)

<div class="topic-metadata">

**Author:** [@Nic\_Oliver](https://community.shopify.dev/u/Nic_Oliver)\
**Replies:** 1\
**Last updated:** [June 3, 2026, 8:26pm UTC](https://community.shopify.dev/t/fetch-section-in-context-of-primary-market/34830 "2026-06-03T20:26:17Z")

</div>

Short description of issue We need to fetch a section in the context of the primary market, regardless of what market the user is currently browsing from Reproduction steps Use section rendering API to fetch a section w…

---

## [Random 400 errors on line item removal](https://community.shopify.dev/t/random-400-errors-on-line-item-removal/33971)

<div class="topic-metadata">

**Author:** [@yvony](https://community.shopify.dev/u/yvony)\
**Replies:** 4\
**Last updated:** [June 3, 2026, 10:52am UTC](https://community.shopify.dev/t/random-400-errors-on-line-item-removal/33971 "2026-06-03T10:52:30Z")

</div>

Short description of issue Random 400 errors on line item removal Reproduction steps Add items to the cart Remove item from the cart Additional info In my cart, I remove items by using the cart/change function and I r…

---

## [Shopify-additional-items\[i\]\[id\] not applied in standard add-to-cart flow](https://community.shopify.dev/t/shopify-additional-items-i-id-not-applied-in-standard-add-to-cart-flow/33514)

<div class="topic-metadata">

**Author:** [@Robin\_Sch](https://community.shopify.dev/u/Robin_Sch)\
**Replies:** 1\
**Last updated:** [May 18, 2026, 7:16am UTC](https://community.shopify.dev/t/shopify-additional-items-i-id-not-applied-in-standard-add-to-cart-flow/33514 "2026-05-18T07:16:17Z")

</div>

Short description of issue shopify-additional-items\[i\]\[id\] is ignored in the standard add-to-cart flow and only the primary variant is added to the cart Reproduction steps Create a standard product form with a valid pr…

---

## [Line\_item.key mismatch between Liquid and cart/change.js response when cart discount level automatic discount is applied](https://community.shopify.dev/t/line-item-key-mismatch-between-liquid-and-cart-change-js-response-when-cart-discount-level-automatic-discount-is-applied/33470)

<div class="topic-metadata">

**Author:** [@Ilan\_Zerdoun](https://community.shopify.dev/u/Ilan_Zerdoun)\
**Replies:** 0\
**Last updated:** [April 20, 2026, 3:48pm UTC](https://community.shopify.dev/t/line-item-key-mismatch-between-liquid-and-cart-change-js-response-when-cart-discount-level-automatic-discount-is-applied/33470 "2026-04-20T15:48:27Z")

</div>

Short description of issue Inconsistency between Liquid line\_item.key and the Ajax API cart/change.js response items\[‘key’\] Link to Shopify Store Reproduction steps Add a product to the cart. Open the mini cart. Upda…

---

## [Shop\_events\_listener.js — add-to-cart analytics broken when same variant appears twice with different properties](https://community.shopify.dev/t/shop-events-listener-js-add-to-cart-analytics-broken-when-same-variant-appears-twice-with-different-properties/32338)

<div class="topic-metadata">

**Author:** [@dostu](https://community.shopify.dev/u/dostu)\
**Replies:** 1\
**Last updated:** [March 23, 2026, 8:33pm UTC](https://community.shopify.dev/t/shop-events-listener-js-add-to-cart-analytics-broken-when-same-variant-appears-twice-with-different-properties/32338 "2026-03-23T20:33:56Z")

</div>

Short description of issue parseFormData in shop\_events\_listener.js deduplicates items by variant ID, causing a mismatch when the same variant appears twice with different properties (e.g. BXGY deals). Results in “Payloa…

---

## [Ajax API returning 422 even when items are in stock. Works fine in incognito](https://community.shopify.dev/t/ajax-api-returning-422-even-when-items-are-in-stock-works-fine-in-incognito/3659)

<div class="topic-metadata">

**Author:** [@Ashfaq](https://community.shopify.dev/u/Ashfaq)\
**Replies:** 33\
**Last updated:** [March 13, 2026, 8:22pm UTC](https://community.shopify.dev/t/ajax-api-returning-422-even-when-items-are-in-stock-works-fine-in-incognito/3659 "2026-03-13T20:22:27Z")

</div>

Many merchants are having a problem where the add.js endpoint shows an “Out of Stock” error, even though the product is available. The issue doesn’t happen in incognito mode and works fine after clearing the cache. How…

---

## [Mobile App Cloudflare Issue](https://community.shopify.dev/t/mobile-app-cloudflare-issue/32154)

<div class="topic-metadata">

**Author:** [@Michele\_Longoria](https://community.shopify.dev/u/Michele_Longoria)\
**Replies:** 2\
**Last updated:** [March 12, 2026, 12:50pm UTC](https://community.shopify.dev/t/mobile-app-cloudflare-issue/32154 "2026-03-12T12:50:42Z")

</div>

Short description of issue Cloudflare Issue on Mobile App Link to Shopify Store https://lawson-products.myshopify.com Reproduction steps Steps to Reproduce: 1. Open Kent Mobile app in Android Device. 2.Click on Login …

---

## [Seeking Opinions on Using Section Rendering API for Custom Data Retrieval](https://community.shopify.dev/t/seeking-opinions-on-using-section-rendering-api-for-custom-data-retrieval/9356)

<div class="topic-metadata">

**Author:** [@user37](https://community.shopify.dev/u/user37)\
**Replies:** 2\
**Last updated:** [March 7, 2026, 7:15am UTC](https://community.shopify.dev/t/seeking-opinions-on-using-section-rendering-api-for-custom-data-retrieval/9356 "2026-03-07T07:15:01Z")

</div>

Hello Shopify Community, I hope you’re all doing well. I have come up with a way to retrieve custom data using the Section Rendering API, but I would like to hear your thoughts on whether there might be any unexpected …

---

## [Potential race conditions with cart update ajax call to just update cart attributes?](https://community.shopify.dev/t/potential-race-conditions-with-cart-update-ajax-call-to-just-update-cart-attributes/21061)

<div class="topic-metadata">

**Author:** [@Andrew\_Jaanuu](https://community.shopify.dev/u/Andrew_Jaanuu)\
**Replies:** 3\
**Last updated:** [March 3, 2026, 8:31pm UTC](https://community.shopify.dev/t/potential-race-conditions-with-cart-update-ajax-call-to-just-update-cart-attributes/21061 "2026-03-03T20:31:10Z")

</div>

Hi, I have been noticing that there are times when I use the cart update ajax api to update attribute A, while there are another similar call from another app to update attribute B at the same time, my update might not g…

---

## [Nested cart lines for addons now works 🔥](https://community.shopify.dev/t/nested-cart-lines-for-addons-now-works/20784)

<div class="topic-metadata">

**Author:** [@curzey](https://community.shopify.dev/u/curzey)\
**Replies:** 36\
**Last updated:** [February 26, 2026, 10:04pm UTC](https://community.shopify.dev/t/nested-cart-lines-for-addons-now-works/20784 "2026-02-26T22:04:34Z")

</div>

The purpose of this post is to contain information, usecases, examples and discussions of the newly released Nested cart lines. It’s still very early on, and I’m just testing the new things myself. Feel free to add u…

---

## [Shipping rates by Ajax API cart problem](https://community.shopify.dev/t/shipping-rates-by-ajax-api-cart-problem/31699)

<div class="topic-metadata">

**Author:** [@TuanKiet](https://community.shopify.dev/u/TuanKiet)\
**Replies:** 0\
**Last updated:** [February 26, 2026, 8:00am UTC](https://community.shopify.dev/t/shipping-rates-by-ajax-api-cart-problem/31699 "2026-02-26T08:00:24Z")

</div>

Short description of issue Shipping rates are not returned when a valid address (Bloomington, MN 55431) is entered for the first time. Changing the city to another value still returns no rates, but changing it back to th…

---

## [Ajax API aggresive 429 status responses when running theme locally](https://community.shopify.dev/t/ajax-api-aggresive-429-status-responses-when-running-theme-locally/29722)

<div class="topic-metadata">

**Author:** [@Pridentt](https://community.shopify.dev/u/Pridentt)\
**Replies:** 2\
**Last updated:** [February 18, 2026, 8:30pm UTC](https://community.shopify.dev/t/ajax-api-aggresive-429-status-responses-when-running-theme-locally/29722 "2026-02-18T20:30:04Z")

</div>

I have an app that has a theme extension. This extension makes a /cart.js request each time the customer navigates to a new page. I was reported by a developer from a merchant that my extension was throwing errors when …

---

## [Pass mobile app consent to Shopify Cookie Banner (WebView)](https://community.shopify.dev/t/pass-mobile-app-consent-to-shopify-cookie-banner-webview/29590)

<div class="topic-metadata">

**Author:** [@Patrik\_Majercik](https://community.shopify.dev/u/Patrik_Majercik)\
**Replies:** 0\
**Last updated:** [February 13, 2026, 2:11pm UTC](https://community.shopify.dev/t/pass-mobile-app-consent-to-shopify-cookie-banner-webview/29590 "2026-02-13T14:11:18Z")

</div>

Short description of issue Pass mobile app consent to Shopify Cookie Banner (WebView) Reproduction steps User opens a Mobile App and accepts Privacy Policy. User navigates to the store via an in-app WebView. The Shopif…

---

## [Issue with ajax cart API async\_shipping\_rates.json](https://community.shopify.dev/t/issue-with-ajax-cart-api-async-shipping-rates-json/28780)

<div class="topic-metadata">

**Author:** [@Min\_Liu](https://community.shopify.dev/u/Min_Liu)\
**Replies:** 17\
**Last updated:** [February 6, 2026, 11:06am UTC](https://community.shopify.dev/t/issue-with-ajax-cart-api-async-shipping-rates-json/28780 "2026-02-06T11:06:43Z")

</div>

Short description of issue async\_shipping\_rates throws error Reproduction steps call prepare\_shipping\_rates → 202 accepted call async\_shipping\_rates → error Additional info started sometime today What type of topic i…

---

## [Cart/add.js, using FormData, never returns 422 out of stock response](https://community.shopify.dev/t/cart-add-js-using-formdata-never-returns-422-out-of-stock-response/28999)

<div class="topic-metadata">

**Author:** [@andyxmas](https://community.shopify.dev/u/andyxmas)\
**Replies:** 1\
**Last updated:** [January 30, 2026, 3:04pm UTC](https://community.shopify.dev/t/cart-add-js-using-formdata-never-returns-422-out-of-stock-response/28999 "2026-01-30T15:04:14Z")

</div>

Short description of issue cart/add.js, using FormData, never returns 422 out of stock response Reproduction steps Following the FormData constructor approach in the Ajax Cart API docs here Cart API reference works, and…

---

## [Nested cart items: can\_remove & can\_update\_quantity via Cart AJAX API](https://community.shopify.dev/t/nested-cart-items-can-remove-can-update-quantity-via-cart-ajax-api/28275)

<div class="topic-metadata">

**Author:** [@Paul\_Holmes](https://community.shopify.dev/u/Paul_Holmes)\
**Replies:** 2\
**Last updated:** [January 23, 2026, 4:54am UTC](https://community.shopify.dev/t/nested-cart-items-can-remove-can-update-quantity-via-cart-ajax-api/28275 "2026-01-23T04:54:59Z")

</div>

Short description of issue Setting ‘can\_remove’ and ‘can\_update\_quantity’ on nested cart items Reproduction steps NA Additional info Is it possible to set these ‘instructions’ (as they’re called in Liquid) when adding …

---

## [Shopify Ajax API (/cart.js) does not update cart state immediately after add/change requests.](https://community.shopify.dev/t/shopify-ajax-api-cart-js-does-not-update-cart-state-immediately-after-add-change-requests/28228)

<div class="topic-metadata">

**Author:** [@Yasuo](https://community.shopify.dev/u/Yasuo)\
**Replies:** 2\
**Last updated:** [January 13, 2026, 10:15am UTC](https://community.shopify.dev/t/shopify-ajax-api-cart-js-does-not-update-cart-state-immediately-after-add-change-requests/28228 "2026-01-13T10:15:40Z")

</div>

Short description of issue Shopify Ajax API (/cart.js) does not update cart state immediately after add/change requests. Reproduction steps Open an Online Store storefront (no checkout). Add a product to cart using POS…

---

## [Dropped Cart Ajax API requests](https://community.shopify.dev/t/dropped-cart-ajax-api-requests/27747)

<div class="topic-metadata">

**Author:** [@bakura10](https://community.shopify.dev/u/bakura10)\
**Replies:** 3\
**Last updated:** [December 28, 2025, 10:48pm UTC](https://community.shopify.dev/t/dropped-cart-ajax-api-requests/27747 "2025-12-28T22:48:34Z")

</div>

Short description of issue Ajax API requests being dropped Reproduction steps Hello, As per this changelog (Improved concurrency handling in the Cart AJAX API and Storefront Cart GraphQL API - Shopify developer changel…

[Next page](https://community.shopify.dev/tag/ajax-api/59.md?match_all_tags=true&page=1&tags%5B%5D=ajax-api)
