15 Aug 2026 · 1 min read
Magento 2 B2B APIs: companies, quotes, and shared catalogs programmatically
Drive Magento 2 B2B from code — the company, quote, and shared-catalog APIs — and how to test the flows on a production-shaped local stack.
The B2B UI is just a front end over a set of APIs. This post shows how to drive companies, quotes, and shared catalogs programmatically — useful for ERP integration and custom buyer portals.
Companies API
POST /rest/all/V1/company/... manages company structures, teams, and roles. A buyer portal can provision a new company, assign a hierarchy, and set credit limits via these endpoints rather than the admin UI.
Shared catalogs
V1/sharedCatalog/... assigns products and price tiers per company. The same SKU returns different pricing based on the caller's company context — so your integration must always authenticate as the right company token.
Quotes / negotiation
Negotiable quotes expose V1/negotiableQuote/...: create, counter, accept. A middleware can sync Magento quotes with an external CPQ system, mirroring the negotiation flow from the B2B quotes post.
Auth & scopes
Every B2B call needs the right token scope — a company admin token, not a generic one. Mis-scoped tokens silently return empty catalogs; that's the #1 integration bug.
Test it locally
B2B APIs need the full stack: async company processing via the message queue, cron, and correct scopes. Stand up a production-shaped local environment with Govard so the REST flows behave like production, including the background jobs the APIs depend on.
What's next in this series
Performance and B2B are operational concerns. Next: a Govard case study — running the same Magento 2 stack in practice.
Next in this series: Running Magento 2 with Govard —
/blog/magento2-govard-case-study