Hi.
We use the web api to create orders from a mobile applikation. When we try to add the same product twice, to the shopping cart, it creates two orderlines instead of combining them.
POST:
/dwapi/ecommerce/carts/{SECRET}/items
Hi.
We use the web api to create orders from a mobile applikation. When we try to add the same product twice, to the shopping cart, it creates two orderlines instead of combining them.
POST:
/dwapi/ecommerce/carts/{SECRET}/items
But would that not be a PATCH on that orderline and not a POST = Create?
To keep the api clean - doing a POST and actually do a PATCH would be kind of a bug.
But maybe as an additional parameter merge=true to explicitly control that?
BR Nicolai
Hi Nicolai.
In theory, I don't know if an orderline (with the same data) exist, so I would expect the request to be a POST and not a PATCH.
I can't come up with a scenario where you wouldn't want to merge your orderlines. Of cause if the data is different, but shouldn't the api could figure that out by itself?
You must be logged in to post in the forum