Skip to content

businessUnits

Queryin Business units

Get all business units accessible to the current user

Returns

[BusinessUnit!]!

FieldTypeDescription
idID!Unique identifier for the business unit
nameString!Name of the business unit
cocNumberStringChamber-of-commerce registration of the company. Null where the project does not record one.
vatNumberStringVAT registration of the company. Null where the project does not record one.
vatNumbers[String!]!Every VAT registration of the company, vatNumber among them: one per member state it is registered in. A delivery to a member state the company is registered in, other than the seller's, is reverse-charged. Empty where the project records none.
eoriNumberStringThe company's EORI number, which customs need to clear its exports. Null where the project does not record one.
creditBusinessUnitCreditWhat the company may buy on account and how much of that it has used. Null where the project records no credit limit for the company.
oneOffShippingAddressesAllowedBoolean!Whether a checkout may ship to an address outside the company's address book, typed in for one order. True unless a company administrator turned one-off addresses off; a cart is then shipped to one of the book's addresses only, and any other is refused.
paymentTermsBusinessUnitPaymentTermsWhen the company pays for what it buys on account, for a checkout to state beside the price. Null where the project records no payment terms for the company.
stores[Store!]Stores assigned to the business unit
addressAddressAddress of the business unitArguments: id
billingAddressAddressBilling address of the business unit
defaultShippingAddressAddressThe address the unit ships to unless told otherwise. Null where nobody has chosen one. Never simply the first entry of a book that holds several: with dozens of addresses in no meaningful order, that is a guess a checkout would present as the company's decision.
addressesAddressResult!Addresses of the business unit. A search term narrows the book by name, company, street, postal code, city or region; every word must appear, in any order.Arguments: page, pageSize, searchTerm
associateBusinessUnitAssociateAn associate of the business unitArguments: id
currentAssociateBusinessUnitAssociateThe associate the signed-in caller is within this business unit. Null when the caller is not an associate of the unit. Answering this by reading the associate list is unreliable as well as slow: that collection is paginated and cannot be filtered to the caller, so beyond the first page the caller finds no capabilities and every gated control disappears without an error.
associatesBusinessUnitAssociateResult!Associates of the business unit. A search term narrows the list by email address, given name or family name; every word must appear, in any order.Arguments: page, pageSize, searchTerm
availableRoles[BusinessUnitRole!]!Available roles that can be assigned to customers in this business unit
pendingInvitationsBusinessUnitInvitationResult!Invitations whose invitee has not yet set up their account, the most recent first. An invitation to someone who already had an account is accepted at once and is never pending. Empty where the engine adds associates without an invitation step.Arguments: page, pageSize
shoppingListShoppingListA shopping list of the business unitArguments: id
shoppingListsShoppingListResultShopping lists of the business unitArguments: page, pageSize
invoiceInvoiceOne invoice of this company, by idArguments: id
invoicesInvoiceResult!Invoices billed to this company, newest first. Visible to whoever may see the company's orders: a standalone invoice belongs to no order, so whether it is the caller's own cannot be asked of it.Arguments: page, pageSize, searchTerm, status, invoiceDateFrom, invoiceDateUntil
cartsCartResult!Every cart in this business unit the caller is allowed to see, which includes colleagues' carts where their role permits it, most recently touched first. Active carts only unless status asks for archived ones too.Arguments: page, pageSize, status
orderB2BOrderOne order, by the number a buyer quotes or by its id. Give exactly one -- giving both, or neither, is an error rather than a silent preference. The id is what a payment provider hands back on its return URL, so it is the key a buyer arrives with after paying. The order number is the one they read off a confirmation.Arguments: orderNumber, id
ordersB2BOrderResultThis business unit's orders, newest first. Cancelled ones are left out unless asked for by name: a cancelled order is not something that was bought, and reopening an unpaid order for editing cancels it, so the list would otherwise fill with twins. A search term matches the order number, the purchase-order reference, or the SKU of a line item. All three are matched in full rather than as a prefix: they are codes read off a confirmation, a purchase order or a packing slip and pasted in, not phrases to type part of. Product names are deliberately not searched. Free text over what an order contains needs a separate search index, and an order history that quietly stops finding anything the day that index is rebuilt is worse than one that never claimed to.Arguments: page, pageSize, searchTerm, status, createdFrom, createdUntil, placedByMe
orderApprovalsOrderApprovalResult!Approval queue for the business unit, optionally filtered by statusArguments: status, page, pageSize
orderApprovalRuleOrderApprovalRuleOne approval rule of the business unit, or null when it has none by that idArguments: id
orderApprovalRulesOrderApprovalRuleResult!Approval rules configured for the business unit, optionally by statusArguments: status, page, pageSize
quoteRequestQuoteRequestGet a specific quote request by its IDArguments: id
quoteRequestsQuoteRequestResultGet a paginated list of quote requestsArguments: page, pageSize
quoteQuoteGet a specific quote by its IDArguments: id
quotesQuoteResultGet a paginated list of quotesArguments: page, pageSize, sort, status
returnsReturnResult!Returns for the unit's orders the associate can see, newest firstArguments: page, pageSize, status
returnReturnOne of the unit's returns the associate can see; null otherwiseArguments: id

Example

query {
businessUnits {
id
name
stores {
id
name
}
}
}

The query is the example the schema documents. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved
@evolve-framework/medusaResolved
@evolve-framework/sfccResolved

Used by

The storefront packages that send it, in these GraphQL documents: