Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi, I am trying to retrieve a cart by its ID using below mentioned API:
https://shopify.dev/custom-storefronts/cart#retrieve-a-cart
This is how I am trying to access it using postman. But below is the error I am getting.
Please let me know if I am making any mistake here.
Hi,
You can simple query your cart by cartId as following:
{
node(id:"YOUR_CART_AND_ALSO_YOUR_CHECKOUT_ID"){
id
...on Checkout{
id
currencyCode
createdAt
totalPriceV2{
amount
}
}
}
}
Of course, you can specify which field you would like to retrieve into the query.
Regards.
And I think the problem is that you have not defined the query for your retrieving request in the "QUERY" section.