Currently I can’t seem to find a field responsible for retrieving the B2B catalogs whitin the product data in the graphql admin api.
This is the Graphql query I’m using.
https://shopify.dev/docs/api/admin-graphql/unstable/objects/Product
Currently I can’t seem to find a field responsible for retrieving the B2B catalogs whitin the product data in the graphql admin api.
This is the Graphql query I’m using.
https://shopify.dev/docs/api/admin-graphql/unstable/objects/Product
Hey @rafaelmarques , that’s a great question.
When you’re looking at the product resource, the B2B catalogues that the products are published on are going to be available in the publications.
An example query if you’re looking to see if a product is available to a specific company, you can use publishedInContext
query Product {> product(id: “gid://shopify/Product/[ID]”) {> publishedInContext(> context: { companyLocationId: “gid://shopify/CompanyLocation/[ID]” }> )> }> }
You can also use resourcePublicationsV2 to get the specific catalogs.
resourcePublicationsV2(catalogType: COMPANY_LOCATION, first: 15) {> nodes {> publication {> id> catalog {> id> }> }> }> }
Hope that helps!
Worked perfectly. Thanks Kyle