Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Where can I find the `publicationId`s for my sale channels?

Solved

Where can I find the `publicationId`s for my sale channels?

emiller
Shopify Partner
19 0 10

I want to use the `publishPublishable` mutation from the GraphQl Admin API, but I don't know how to acquire the `publicationId`s of my sales channels. Can anyone help?

 

https://shopify.dev/api/admin-graphql/2021-07/mutations/publishablePublish

Accepted Solution (1)

JamesG
Shopify Staff
42 10 11

This is an accepted solution.

Hey @emiller 

 

Have you tried querying the store's publications and using that to find your publication.id?

JamesG | 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 3 (3)

JamesG
Shopify Staff
42 10 11

This is an accepted solution.

Hey @emiller 

 

Have you tried querying the store's publications and using that to find your publication.id?

JamesG | 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

emiller
Shopify Partner
19 0 10

Thanks @JamesG , I just found that query. Thank you. I learned something else in addition, which is that you can only query that if you have the `read_subscriptions` permission, and that permission isn't available unless you request it (and maybe only on Plus stores). 

friendscottn
Shopify Partner
26 3 14

So... I just tried some random json paths because of other similar posts I'd seen and found this: 

https://admin.shopify.com/store/<YOUR_STORE_NAME>/publications.json

Mine looks like this:

 

{
  "publications": [
    {
      "id": 92366267715,
      "created_at": "2023-10-25T15:45:49-04:00",
      "name": "Point of Sale"
    },
    {
      "id": 92123456643,
      "created_at": "2023-10-25T15:45:44-04:00",
      "name": "Online Store"
    },
    {
      "id": 92654321947,
      "created_at": "2023-10-25T15:45:49-04:00",
      "name": "Point of Sale"
    }
  ]
}

 

Pretty convenient if you just need to grab the id to hard code in some config somewhere. I'm not sure if this is only available on Shopify Plus as mentioned in comments. I am testing this on a Plus store

 

I did confirm that he id for the Online Store matches what the GraphQL Admin API returns.

 

gid://shopify/Publication/92123456643

 

 

I have no idea why there are two Point of Sales 😃