I get quote id from below code it returns 6 as my quote id


I used the quote_id=6 in REST api like rest/default/V1/guest-carts/6/estimate-shipping-methods

It throws the below error in Postman

{ "message": "No such entity with %fieldName = %fieldValue", "parameters": { "fieldName": "cartId", "fieldValue": 0 } }

I have checked frontend cart page actual cart id seems encrypted rest/default/V1/guest-carts/6vf0uVP3A3RNBbTDPe4ECKxjDrJw44lO/estimate-shipping-methods

could you please anyone enlighten me? Thanks.



1 Answer 1


In the checkout session you can able to find the masked quote in js itself.

window.checkoutConfig.quoteData.entity_id for guest user.

For Examle

if window.checkoutConfig.quoteData.entity_id is digit means

  `customer is logged in` 


  `guest session` there you can find the masked quote id

For generating the Masked Quote id

inject the \Magento\Quote\Model\QuoteIdMaskFactory

$quoteIdMask = $this->quoteIdMaskFactory->create()->load(YOUR_QUOTE_ID, 'quote_id'); $id = $quoteIdMask->getMaskedId();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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