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 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp