Hi,
Is it possible to get the company location of a sales order using the Graph Admin Api?
B2B orders have a Company and a Company Location associated.
I can get the orders associated with at company location but I cant figure out how to get company locations for an order:
query Customers {
companyLocations (first: 10){
nodes {
id
name
orders(first:10){
nodes{
id
name
}
}
company {
id
name
}
}
}
}
Any help would be very much appreciated.
\Kresten
Would the companyLocation query work better for this scenario Kresten?
eg:
query GetCompanyLocation($id: ID!) {
companyLocation(id: $id) {
id
name
company {
id
name
}
orders(first: 10) {
nodes {
id
name
}
}
}
}
- Input Parameter:
$id
: The ID of the company location you want to query.
- Fields Selected:
id
and name
: Basic details of the company location.
company
: Information about the company associated with the location.
orders
: Fetches the orders associated with this company location, including their id
and name
.
I found it.
It’s called PurchasingEntity