We have a use case where we’d like to update a customers cart after they’ve engaged with an app. This requires two way integration between the app and the users cart. The user may or may not be logged in when that interaction happens.
There is also a graphQL cart functionality: https://shopify.dev/api/examples/cart but is there something similar with REST or is graphQL the only way?
Just wanted to help clarify here based on the link shared. The Cart API is one of our Storefront APIs, which is only available in GraphQL. There are some great resources for getting started with GraphQL and the Storefront API that I have linked below.
While not directly related to the question - is there ways to query carts that are active? I can see a get cart query but that requires supplying a cartid. What ways are there to query all ‘‘active’’ carts? Happy to be pointed in the right direction and read, I just can’t see this in the documentation.
Honestly, I kinda abandoned this project lol but just finished learning & upgrading from REST to graph.
having another quick look it doesn’t look like there is a way to poll existing carts with the storefront API and I guess this makes sense because if your using the storefront API you want to create a storefront right and in that case a cart “shouldn’t” magically be created which might mean it gets created from a button or something in which case the mutation starts.
But again, I am very far from a dev so someone else might have different experiences!