cancel
Showing results for 
Search instead for 
Did you mean: 

Get Items from REST API Quote

Get Items from REST API Quote

Hi guys!

I have the following problem - using Magento REST API I create a Quote, add to it an item, billing and shipping addresses and shipping method. Then I get the Quote ID and pass it to a custom module.

And here is my problem, I load the Quote based on the provided ID, but when try to get the items the returned value is empty.

$this->quote = $this->quoteFactory->create()->load($this->quoteId);

// some of the data in the quote as json:
{
"entity_id": "68",
"store_id": "1",
"created_at": "2024-06-26 12:17:27",
"updated_at": "2024-06-26 12:17:27",
"converted_at": null,
"is_active": "1",
"is_virtual": "0",
"is_multi_shipping": "0",
"items_count": "1",
"items_qty": "1.0000",
"orig_order_id": "0",
"store_to_base_rate": "0.0000",
"store_to_quote_rate": "0.0000",
"base_currency_code": "USD",
"store_currency_code": "USD",
"quote_currency_code": "USD",
"grand_total": "59.0000",
"base_grand_total": "59.0000",
}
$this->items = $this->quote->getItems();

I am trying this on Magento 2.4.6-p1, but probably I miss something.

Any ideas?

Regards!