---
title: 'B2B GraphQL'
url: 'https://info.srv.kowal.co/docs/magento/modules/b2b/b2b-graphql'
markdown: 'https://info.srv.kowal.co/docs/magento/modules/b2b/b2b-graphql.md'
lang: en
date: '2026-11-30'
description: 'Use a buyer token and store view header to query the signed-in buyer’s company and prices. Create quote requests and add items or comments with mutations.'
taxonomy:
  category:
    - docs
    - Magento
    - B2B
---

# B2B GraphQL

## Product page

[B2B Suite — kowal.co](https://kowal.co/professional-b2b-system-for-magento-2-open-source)

## Description

The suite adds wholesale queries and mutations to Magento’s /graphql endpoint. A signed-in buyer can use b2bMyCompany to read the company linked to their account on a specified website.

## For whom

For developers connecting a storefront or buyer portal to Magento B2B.

## Features

- Read company records and shopping lists.
- Query a product price for a company, website, currency and quantity.
- Create quote requests and add items or comments using mutations.

## Installation

Install B2B Suite and check that `Kowal_B2BGraphQl` and `Magento_GraphQl` are enabled. [B2B Suite installation](https://info.srv.kowal.co/docs/magento/modules/b2b)

## Configuration

1. Enable B2B for the wholesale website and link a test buyer to an active company.
2. Send a POST request to `/graphql` with the customer’s bearer token. Set the `Store` header to the store-view code and pass the numeric website ID as the query variable.

## Requirements / notes

The store-view code and website ID are different identifiers. For b2bMyCompany the token must represent a customer.

## FAQ

**Why does b2bMyCompany return null?**

Check the buyer’s company assignment on the supplied website and the company’s active status. A missing customer token produces an authorization error.

## Verify the installation

Run the query below with the variable `website` set to the wholesale website ID. Compare the returned name and status with the company record in Admin.

```graphql
query BuyerCompany($website: Int!) {
  b2bMyCompany(website_id: $website) { id name status }
}
```

---

## Navigation

- Parent: [B2B Suite](https://info.srv.kowal.co/docs/magento/modules/b2b.md)
- Previous: [B2B Integration](https://info.srv.kowal.co/docs/magento/modules/b2b/b2b-integration.md)
- Next: [B2B Hyvä Account Pages](https://info.srv.kowal.co/docs/magento/modules/b2b/b2b-hyva.md)
