B2B Company endpoint GraphQL, Python

Topic summary

A developer is attempting to set up B2B/wholesale functionality and needs access to Shopify’s Company API endpoint using GraphQL with the official Python module.

Technical Issue:

  • Encountering an AttributeError: module 'shopify' has no attribute 'Company'
  • The error occurs when trying to access shopify.Company after establishing a session

Code Context:

  • Using the official Shopify Python library
  • Attempting to activate a session with shop domain, API version (2023-10), and access token
  • The Company resource appears unavailable or not properly exposed in the Python module

Status: The issue remains unresolved with no responses yet. The developer may need to verify API version compatibility, check if the Company resource requires different access methods, or confirm that their app has the necessary scopes for B2B functionality.

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

We are trying to get this site setup for wholesale, B2B. We need access to the Company API endpoint and I can not seem to get it to work. I am trying to use GraphQL using the official Python Module and I am getting the following error…

AttributeError: module ‘shopify’ has no attribute ‘Company’

Here is the code we are tying to run…

#!/usr/bin/python3

import shopify

session = shopify.Session(‘berne-distributor.myshopify.com’, ‘2023-01’, ‘XXXXXTOKENXXXX’)
shopify.ShopifyResource.activate_session(session)

output = shopify.Company

print(output)