# Add cart items via API to storefront cart

**URL:** <https://forum.shopware.com/t/add-cart-items-via-api-to-storefront-cart/95570>\
**Category:** Shopware 6 (English)\
**Tags:** programming\
**Created:** [31. Juli 2022 um 15:40 UTC](https://forum.shopware.com/t/add-cart-items-via-api-to-storefront-cart/95570 "2022-07-31T15:40:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shopwaredev\_lukas](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@shopwaredev\_lukas](https://forum.shopware.com/u/shopwaredev_lukas)\
**Post date:** [31. Juli 2022 um 15:40 UTC](https://forum.shopware.com/t/add-cart-items-via-api-to-storefront-cart/95570/1 "2022-07-31T15:40:31Z")

</div>

Hi, I am building an Angular integration in Shopware 6, the whole store relies on the storefront theme, but the JS application can add products via the store-api as well. Now how can I add the item to the storefront cart?  
I post the data to the /store-api/checkout/cart/line-item API and even with context-token which I fetched from the /store-api/context API before, it doesn’t work. Is there any way I can add items to the storefront cart with the current session via the API? Or maybe I can get the current context output somewhere to then take the token and update the current cart?

---

<div class="post-metadata">

**Author:** ![pad](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@pad](https://forum.shopware.com/u/pad)\
**Post date:** [3. Februar 2023 um 07:49 UTC](https://forum.shopware.com/t/add-cart-items-via-api-to-storefront-cart/95570/2 "2023-02-03T07:49:52Z")

</div>

Hey, did you find a way to solve you problem? I have nearly the same Problem and im really baffled. I try to make an external Shop configurator with Vue and Laravel.

---

<div class="post-metadata">

**Author:** ![slowhand](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@slowhand](https://forum.shopware.com/u/slowhand)\
**Post date:** [20. November 2023 um 16:27 UTC](https://forum.shopware.com/t/add-cart-items-via-api-to-storefront-cart/95570/3 "2023-11-20T16:27:28Z")

</div>

I have a similar problem. Were you able to solve that?

---

<div class="post-metadata">

**Author:** ![g.ismaili](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@g.ismaili](https://forum.shopware.com/u/g.ismaili)\
**Post date:** [19. August 2024 um 12:53 UTC](https://forum.shopware.com/t/add-cart-items-via-api-to-storefront-cart/95570/4 "2024-08-19T12:53:06Z")

</div>

Hi, same problem here, I’d apprecoate if someone posts a solution.  
Thanks,

---

<div class="post-metadata">

**Author:** ![10alaato](https://avatars.discourse-cdn.com/v4/letter/1/41988e/32.png) [@10alaato](https://forum.shopware.com/u/10alaato)\
**Post date:** [12. Dezember 2024 um 12:14 UTC](https://forum.shopware.com/t/add-cart-items-via-api-to-storefront-cart/95570/5 "2024-12-12T12:14:21Z")

</div>

perhaps someone from the shopware team could answer this?

I really hate how the shopware team provide shit documentations and even shittier support.
