Development discussions around Shopify APIs
I don't see documentation about this endpoint, but if I pull it up in my browser (logged into my store first), it does produce a list of all my collections in my store as expected.
https://MYSTORE.myshopify.com/admin/api/2021-07/collections.json
My question is, why is this not documented, and why can I not do the same thing, with the x-shopify-access-token header, so I can do this programatically?
Solved! Go to the solution
This is an accepted solution.
Ended up the only real solution is to use GraphQL here. Very easy to use if you already are using REST API.
$body = '{"query":"{ collections(first: 10) { edges { node { id handle title } } }}","variables":{}}';
//post that using curl to https://{shop_id}.myshopify.com/admin/api/2021-10/graphql.json
//include your x-shopify-access-token header
This is an accepted solution.
Ended up the only real solution is to use GraphQL here. Very easy to use if you already are using REST API.
$body = '{"query":"{ collections(first: 10) { edges { node { id handle title } } }}","variables":{}}';
//post that using curl to https://{shop_id}.myshopify.com/admin/api/2021-10/graphql.json
//include your x-shopify-access-token header
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...
By Imogen Apr 26, 2023