A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We need to be able to create and update orders via API, with specific customers tied to specific locations.
For example, when creating an order via REST or GraphQL, how can I specify the Customer's Company and the Location within that company?
Solved! Go to the solution
This is an accepted solution.
Hi @kfredericks 👋
You should be able to load the B2B PurchasingCompany object to the `Order.purchasingEntity` field.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hi @kfredericks 👋
You should be able to load the B2B PurchasingCompany object to the `Order.purchasingEntity` field.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is the solution.
The PurchasingEntity can be a union on the PurchasingCompany object, which includes both the company id and the location id