If you’re new to the GraphQL explorer, it’s a great tool for experimenting with and exploring various GraphQL queries. You can access it here: Shopify GraphiQL Admin Explorer.
Thank you for your reply. Sorry that my question might have been confusing.
I am looking for an API that can add historical order to company locations. Do you know if there’s such a Graphql mutation to do so?
The customer accounts made purchases on the store before switching to to B2B, there are Graphql API for creating the companies, company locations, company contacts, is there API for add historical orders to company locations?
As far as I know, there’s currently no direct API option to include a customer’s order history when assigning them to a company. However, you can migrate the order history via the admin UI. You can find more details here: Migrating Customers - Shopify Help Center.
This migration feature was released in March 2024, so given that it’s relatively new, corresponding API support might be in the pipeline.
When adding a customer to a company, there’s an option to include order history: