Skip to main content

Updated B2B location access in the Customer Account API

We've changed what B2B customers can read on all versions of the Customer Account API. Customers now read only the company data and the orders for companies that they belong to.

Company location access

The schema doesn't change. Some fields now return null, an empty list, or fewer results.

CompanyContact.locations returns an empty list unless the contact belongs to the current customer. The current customer reads the locations that they have a role in from their contact's locations field, from Company.locations, and from companyLocation(id:).

On a CompanyLocation where the current customer has no role, the following fields return null or an empty list:

  • Tax field: taxIdentifier.
  • Contact fields: contacts and roleAssignments.

Orders after a customer is removed from a company

When a merchant removes a customer from a company, order(id:) and draftOrder(id:) refuse that company's orders and draft orders. customer.orders and customer.draftOrders exclude the orders and draft orders for that company. The customer's personal orders are still listed.

What you need to do

If your app reads a location's tax or contact data through another contact's locations or through an order's purchasingEntity, then expect null or an empty list for locations where the customer has no role. If your app shows a customer's order history, then the history omits the orders that the customer placed for a company that they no longer belong to. You don't need to change your queries.

Was this page helpful?