B2b Stores Queries

Manage B2B e-commerce storefronts and their configuration.

B2bStore — Returns the current company's B2B store

query GetB2bStore {
  B2bStore {
    id
    active
    label
    url
    location { id label }
    price_level { id label }
    tax_codes { id label }
    logo { id url }
  }
}

Available fields

FieldTypeDescription
idIDUnique identifier.
company_idIDCompany ID.
activeBooleanWhether the store is active.
labelStringStore name.
urlStringStore URL.
location_idIDDefault location ID.
price_level_idIDPrice level ID.
recommended_price_level_idIDRecommended price level ID.
settingsJSONStore settings.
locationLocationDefault location.
price_levelPriceLevelPrice level.
recommended_price_levelPriceLevelRecommended price level.
tax_codes[TaxCode]Tax codes.
logoFileStore logo.
bannerFileStore banner.
login_backgroundFileLogin background image.
about_us_files[File]About us files.

B2bStoreProducts — Returns the products published to the B2B store

Returns the products available in the B2B store (restricted to published products). Requires the products.view permission.

Example Query:

query B2bStoreProducts(
  $where: QueryB2bStoreProductsWhereWhereConditions,
  $search: String,
  $first: Int,
  $page: Int
) {
  B2bStoreProducts(
    where: $where,
    search: $search,
    first: $first,
    page: $page
  ) {
    paginatorInfo { total }
    data {
      id
      label
      active
      first_variant { id label sku }
    }
  }
}

B2bStoreOrders — Returns the orders placed through the B2B store

Returns the orders linked to the B2B store (published only). Requires the orders.view permission.

Example Query:

query B2bStoreOrders(
  $where: QueryB2bStoreOrdersWhereWhereConditions,
  $first: Int,
  $page: Int
) {
  B2bStoreOrders(
    where: $where,
    first: $first,
    page: $page
  ) {
    paginatorInfo { total }
    data {
      id
      label
      status
      total
      dated_at
      customer { id label }
    }
  }
}

B2bStoreInvoices — Returns the invoices generated for the B2B store

Returns the invoices linked to the B2B store (published only). Requires the invoices.view permission.

Example Query:

query B2bStoreInvoices(
  $where: QueryB2bStoreInvoicesWhereWhereConditions,
  $first: Int,
  $page: Int
) {
  B2bStoreInvoices(
    where: $where,
    first: $first,
    page: $page
  ) {
    paginatorInfo { total }
    data {
      id
      label
      status
      total
      dated_at
      customer { id label }
    }
  }
}