# Cart storefront api

**URL:** <https://community.shopify.com/t/cart-storefront-api/126355>\
**Category:** Custom Storefronts\
**Created:** [June 6, 2022, 3:11pm UTC](https://community.shopify.com/t/cart-storefront-api/126355 "2022-06-06T15:11:55Z")\
**Posts on this page:** 2\
**Page:** 1

## AI-generated summary

Cart Storefront API returns null when retrieving a cart created automatically by an application using the cart ID from a browser cookie. Creating a cart via the cartCreate mutation succeeds and returns data, but a subsequent cartBuyerIdentityUpdate mutation responds with { cart: null }.

Key details:
- Storefront API (Shopify’s customer-facing GraphQL) is used to read/update carts.
- cartCreate: creates a cart and returns a valid cart object.
- cartBuyerIdentityUpdate: intended to update buyer info on the cart, but returns a null cart in this case.

Possible cause raised: Shopify docs indicate the cart API does not work with native mobile apps (iOS/Android), which may explain the null response, though this is confusing because the iOS SDK exposes these queries.

Status: No confirmed resolution. Unanswered questions include whether platform limitations (web vs native mobile) or cookie-derived cart IDs are causing the null response, and why SDK support exists if the API is unsupported in native contexts.

<div class="post-metadata">

**Author:** ![Galia](https://avatars.discourse-cdn.com/v4/letter/g/5fc32e/32.png) [@Galia](https://community.shopify.com/u/Galia)\
**Post date:** [June 6, 2022, 3:11pm UTC](https://community.shopify.com/t/cart-storefront-api/126355/1 "2022-06-06T15:11:55Z")

</div>

Hello,

I’m trying to call the cart storefront api in order to retrieve cart data of cart created by application automatically, but unsuccessfully - cart is always null. i got the cart id from the browser cookie.

also, when i use the cartCreate mutation and then try to get cart by the id returned from the cartCreate request - i’m able to get cart data. BUT, when i try another api mutation such as - cartBuyerIdentityUpdate it’s returning the null cart object.  
like this:  
{  
“data”: {  
“cartBuyerIdentityUpdate”: {  
“cart”: null  
}  
}  
}

did someone else also faced the issue?

---

<div class="post-metadata">

**Author:** ![Ricebal2](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@Ricebal2](https://community.shopify.com/u/Ricebal2)\
**Post date:** [August 3, 2022, 4:32pm UTC](https://community.shopify.com/t/cart-storefront-api/126355/2 "2022-08-03T16:32:31Z")

</div>

According to shopify’s docs, the cart api does not work with native mobile, so perhaps that’s why. But it is pretty confusing they still provide those queries in the ios sdk
