Developer forum

Forum » Feature requests » OrderDeleted in /dwapi/ecommerce/carts/{secret}

OrderDeleted in /dwapi/ecommerce/carts/{secret}

Martin Moen
Reply

Can you please add "Deleted" True/False in the API response for /dwapi/ecommerce/carts/{secret}
It is possible to fetch a deleted cart now as long as you have the secret, and the endpoint return the cart object.

So it should either return a "Cart is deleted" response, or at least return the "Deleted" node so that it is possible to do something with it through code.


Replies

 
Martin Moen
Reply

I see now that the deleted cart get:

"StateId": "OS4"

I can see that OS4 is "Deleted" so I guess that is enough...

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Orderstates you define youself - so the OS4 must be a state you have selected on the cart?

How did you delete the cart? If you use the delete command of the endpoint the cart is removed from database. Same should happen if you use cartcmd=empyt if you do not have 0 orderline carts enabled.

 
Martin Moen
Reply

I'm using a pre-installed Swift solution, so I guess the states have been added there?
I have not added any states my self.

Can see that the cart is fully deleted when triggering the delete cart command through the API.
But it is not if the cart is deleted through the admin panel. If you delete through admin, the cart is still in the DB but marked as "Deleted".