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.
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 .
On a where the current customer has no role, the following fields return null or an empty list:
- Tax field:
. - Contact fields:
contactsand.
Orders after a customer is removed from a company
When a merchant removes a customer from a company, order(id:) and refuse that company's orders and draft orders. customer.orders and 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 , 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.