How can I remove product from cart REST API. I searched on


and could not find any help from above reference.

4 Answers 4


There is one API under quoteCartItemRepositoryV1

DELETE /V1/carts/mine/items/{itemId}
  • anyway we can pass multiple itemIds in this?
    – Fokker
    May 14, 2019 at 6:52

There is no API call to remove products from cart.

You have to implement it.

See \Magento\Checkout\Controller\Cart\Delete::execute for a code example.

  • Thanks for your answer but how can I implement. Please give more details.
    – Jsparo30
    Mar 14, 2017 at 11:37

I have got a nice tutorial for you. Which explains about how to create a custom REST APIs for Magento 2.x. It has all the detailed process. Please check this.

If you have any doubts please reach me out via comments.

  • Like the updateCart() function in the example try to create for deleteCart() function. Mar 14, 2017 at 11:43
  • Hi @Asheem Patro Sep 5, 2018 at 9:04
  • I wants to remove an item from after order placed. Sep 5, 2018 at 9:04
  • Is there any way to remove an item after place order in magento2 Sep 5, 2018 at 9:04

The docs are very unclear on how this works.
Here is how i did it.

  $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 
  $quoteId = $objectManager->get('Magento\Checkout\Model\Session')->getQuoteId();

<script>window.quoteId = <?= $quoteId ?></script>

$('.thing').on('click', function (){
     url: '/rest/V1/carts/' + window.quoteId + '/items/' + $(this).attr('data-productid'),
     type: 'DELETE',
     headers: { "Authorization": "Bearer <AUTH_TOKEN>"},
     success: function(result) {console.log('Done')}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.