Shopify B2B: create a Company and company location via Admin GraphQL
domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
In-depth guide
Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.
Steps
Use the companyCreate Admin GraphQL mutation, providing a CompanyInput with name and optionally externalId and note fields.
After creating the Company, call companyLocationCreate with the company ID and a CompanyLocationInput including name, shippingAddress, and billingAddress.
Assign a customer as a company contact via companyAssignCustomerAsContact, linking an existing customer (by customer ID) to the company with a role.
Set payment terms on the company location using companyLocationAssignTaxRegistration or by setting paymentTermsTemplate via companyLocationUpdate.
Query the company back using the company query with its ID to verify the created location and contact are correctly associated.
Consult current Shopify B2B docs for the minimum Shopify plan required to access B2B APIs; not all plans include B2B.
Known gotchas
B2B features require a Shopify plan that includes B2B; the Admin GraphQL mutations exist in the schema but will return errors on unsupported plans.
A customer used as a company contact must not have a conflicting B2C checkout context simultaneously; review how B2B and B2C sessions interact in your storefront implementation.
Give your agent this knowledge — and 15,600+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?