REST Admin API > Cart

Highlighted
New Member
1 0 0

I'm building a custom checkout and I need a REST API to access Cart by cart-token. I haven't found that anywhere in the documentation. However, I found a working endpoint:

 

https://{my-store}.myshopify.com/admin/api/2019-04/carts/{cart-token}.json

 

It seems to be quasi supported, as this resource is available in official Python and Ruby clients. Is there any documentation for that? Is that supported? What are the other supported operations?

0 Likes
Shopify Staff
Shopify Staff
1206 32 170

There is no supported means of getting and maintaining carts outside of the Ajax API: https://help.shopify.com/en/themes/development/getting-started/using-ajax-api

 

These requests however would need to be made from the storefront, as it uses the storefront session to identity the current cart. The endpoint you've discovered, though it may work, should not be depended upon to be supported. A good rule of thumb as you probably already know is that if it's not documented, it's not supported.

 

Sorry I couldn't perhaps provide the answer you were looking for.

 

Cheers.

0 Likes