How to get all sales channels via the REST API ?

Solved
BLC-Nicolas
New Member
11 0 0

I need to get all the sales channels but I can't find the endpoint to retrieve them.

Can you help me please ?

I also need to create a product and associate it with a sales channel.

Accepted Solution (1)

Accepted Solutions
csam
Shopify Staff
154 24 25

This is an accepted solution.

Hi @BLC-Nicolas 

No, it's not possible via our REST API. In general some features will be added to GraphQL and may not be included on the REST version. Your application can make both types of calls - there's no need to switch the entire application over all at once to GraphQL in order to use these features. 

Kind regards,

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 4 (4)
csam
Shopify Staff
154 24 25

Hi @BLC-Nicolas 

You can retrieve active sales channels via the channels object in GraphQL - https://shopify.dev/api/admin-graphql/2021-10/queries/channels

Regarding creating a product and associating it with a channel - you can publish a product to a channel as described here: https://shopify.dev/api/admin-graphql/2021-10/mutations/publishablepublish

Regards,

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

BLC-Nicolas
New Member
11 0 0

Thanks @csam ,

For now, I am working with the REST API, is it possible to do that with it ? 

csam
Shopify Staff
154 24 25

This is an accepted solution.

Hi @BLC-Nicolas 

No, it's not possible via our REST API. In general some features will be added to GraphQL and may not be included on the REST version. Your application can make both types of calls - there's no need to switch the entire application over all at once to GraphQL in order to use these features. 

Kind regards,

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

juan3211
Shopify Partner
80 0 16

Hi, Shopify experts .... any news after lots of months and years? Thanks