Cart management over the API

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
matish
Posts: 27
Joined: 04 Nov 2025, 11:52

Cart management over the API

Post by matish » 12 Dec 2025, 18:20

I am writing with yet another issue.
Cart management:

Code: Select all

https://aimeos.org/docs/2024.x/frontend/jsonapi/baskets/
It works, but if I open up incognito browser window, try to add product to the cart, then I get an error:

Code: Select all

POST https://aimeos.priit.yt.lan/jsonapi/basket?id=default&related=product&_token=O8BHTPewAqsViaopHq9IDZqQ2BU5FXsPVLYSTRKa` resulted in a `409 Conflict` response: { "meta": { "total": 0, "prefix
After I have gotten the error and then I try to add another product to the cart in an original browser window, I get this HTTP 409 error again and now both sessions are in an invalid state.

How should I manage the carts, so they would work fine in different sessions over the same IP address?
Image

There are no errors in the log, so I have little to look into.

User avatar
matish
Posts: 27
Joined: 04 Nov 2025, 11:52

Re: Cart management over the API

Post by matish » 12 Dec 2025, 18:29

Maybe I already got over it. It turned out the products were not in stock.
I added some in stock and error went away for now.

Post Reply