> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# billsOfMaterialsSearch

> Search bills of materials by text and filters, with the same matching as the Redo app's search box: the name, the tags, and the names and SKUs of the products they use or make. A SKU matches exactly. Results come from a search index and can trail writes by a few seconds; to sync changes, use `billsOfMaterials` with `updatedAtAfter` instead. To filter by tag, use `billsOfMaterials(tags:)`.

**Required scopes:** [`products_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-products_read)

## Arguments

**after** `String`

Forward pagination cursor — returns bills of materials after it.

**before** `String`

Backward pagination cursor — returns bills of materials before it.

**filter** `[BillOfMaterialsFilter](/docs/api-reference/v3/reference/inventory/bill-of-materials-filter)`

Which bills of materials to include.

**fields**

**and** `[\[BillOfMaterialsFilter!\]](/docs/api-reference/v3/reference/inventory/bill-of-materials-filter)`

Every one of these filters matches.

**createdAt** `[DateTimeFilter](/docs/api-reference/v3/reference/common/date-time-filter)`

When the bill of materials was created.

**fields**

**gt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

After this instant.

**gte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or after this instant.

**lt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Before this instant.

**lte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or before this instant.

**inputProduct** `[IdFilter](/docs/api-reference/v3/reference/common/id-filter)`

A product the bill of materials consumes, by product id.

**fields**

**anyOf** `[ID!]`

One of these ids (at most 100).

**noneOf** `[ID!]`

None of these ids (at most 100).

**not** `[BillOfMaterialsFilter](/docs/api-reference/v3/reference/inventory/bill-of-materials-filter)`

This filter does not match.

**or** `[\[BillOfMaterialsFilter!\]](/docs/api-reference/v3/reference/inventory/bill-of-materials-filter)`

At least one of these filters matches.

**outputProduct** `[IdFilter](/docs/api-reference/v3/reference/common/id-filter)`

A product the bill of materials makes, by product id.

**fields**

**anyOf** `[ID!]`

One of these ids (at most 100).

**noneOf** `[ID!]`

None of these ids (at most 100).

**status** `[BillOfMaterialsStatusFilter](/docs/api-reference/v3/reference/common/bill-of-materials-status-filter)`

The bill of materials' status.

**fields**

**anyOf** `[\[BillOfMaterialsStatus!\]](/docs/api-reference/v3/reference/inventory/bill-of-materials-status)`

One of these values.

**noneOf** `[\[BillOfMaterialsStatus!\]](/docs/api-reference/v3/reference/inventory/bill-of-materials-status)`

None of these values.

**updatedAt** `[DateTimeFilter](/docs/api-reference/v3/reference/common/date-time-filter)`

When the bill of materials was last updated.

**fields**

**gt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

After this instant.

**gte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or after this instant.

**lt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Before this instant.

**lte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or before this instant.

**first** `Int`

Forward pagination: returns the first N bills of materials (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N bills of materials (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**reverse** `Boolean`

Flips the order: weakest match, or oldest, first.

**sort** `[BillOfMaterialsSearchSortKey](/docs/api-reference/v3/reference/inventory/bill-of-materials-search-sort-key)`

Defaults to RELEVANCE with `text`, CREATED\_AT without. Relevance order can shift as bills of materials change; use a date sort to page through every match stably.

**text** `String`

What to search for, at most 200 characters. Omit to page through the filter's matches.

## Returns

**billsOfMaterialsSearch** `[BillOfMaterialsConnection!](/docs/api-reference/v3/pagination)` *required*

A paginated list of BillOfMaterials items.

**fields**

**edges** `[\[BillOfMaterialsEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[BillOfMaterials!](/docs/api-reference/v3/reference/inventory/bill-of-materials)` *required*

The item at this edge.

**fields**

**buildable** `Int!` *required*

How many units the bill of materials can build across its enabled locations from the stock there, as last calculated. It is recalculated after stock or the recipe changes, so it can trail them briefly. Requires the `inventory_read` scope.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the bill of materials was created.

**id** `ID!` *required*

The id of this bill of materials.

**inputs** `[BillOfMaterialsLineItemConnection!](/docs/api-reference/v3/pagination)` *required*

The products one build consumes, and how many of each, in the order the recipe lists them.

**Requires:** [`products_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-products_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns inputs after it.

**before** `String`

Backward pagination cursor — returns inputs before it.

**first** `Int`

Forward pagination: returns the first N inputs (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N inputs (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**locations** `[BillOfMaterialsLocationConnection!](/docs/api-reference/v3/pagination)` *required*

The locations the bill of materials can be built at, each with how many units it can build there.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns locations after it.

**before** `String`

Backward pagination cursor — returns locations before it.

**first** `Int`

Forward pagination: returns the first N locations (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N locations (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**name** `String!` *required*

The name of the bill of materials.

**outputs** `[BillOfMaterialsLineItemConnection!](/docs/api-reference/v3/pagination)` *required*

The products one build makes, and how many of each, in the order the recipe lists them.

**Requires:** [`products_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-products_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns outputs after it.

**before** `String`

Backward pagination cursor — returns outputs before it.

**first** `Int`

Forward pagination: returns the first N outputs (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N outputs (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**status** `[BillOfMaterialsStatus!](/docs/api-reference/v3/reference/inventory/bill-of-materials-status)` *required*

Whether the bill of materials is in use.

**tags** `[String!]!` *required*

The tags on the bill of materials. Empty when it has none.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the bill of materials was last updated.

**nodes** `[\[BillOfMaterials!\]!](/docs/api-reference/v3/reference/inventory/bill-of-materials)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**buildable** `Int!` *required*

How many units the bill of materials can build across its enabled locations from the stock there, as last calculated. It is recalculated after stock or the recipe changes, so it can trail them briefly. Requires the `inventory_read` scope.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the bill of materials was created.

**id** `ID!` *required*

The id of this bill of materials.

**inputs** `[BillOfMaterialsLineItemConnection!](/docs/api-reference/v3/pagination)` *required*

The products one build consumes, and how many of each, in the order the recipe lists them.

**Requires:** [`products_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-products_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns inputs after it.

**before** `String`

Backward pagination cursor — returns inputs before it.

**first** `Int`

Forward pagination: returns the first N inputs (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N inputs (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[BillOfMaterialsLineItemEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[BillOfMaterialsLineItem!\]!](/docs/api-reference/v3/reference/inventory/bill-of-materials-line-item)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**locations** `[BillOfMaterialsLocationConnection!](/docs/api-reference/v3/pagination)` *required*

The locations the bill of materials can be built at, each with how many units it can build there.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns locations after it.

**before** `String`

Backward pagination cursor — returns locations before it.

**first** `Int`

Forward pagination: returns the first N locations (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N locations (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[BillOfMaterialsLocationEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[BillOfMaterialsLocation!\]!](/docs/api-reference/v3/reference/inventory/bill-of-materials-location)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**name** `String!` *required*

The name of the bill of materials.

**outputs** `[BillOfMaterialsLineItemConnection!](/docs/api-reference/v3/pagination)` *required*

The products one build makes, and how many of each, in the order the recipe lists them.

**Requires:** [`products_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-products_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns outputs after it.

**before** `String`

Backward pagination cursor — returns outputs before it.

**first** `Int`

Forward pagination: returns the first N outputs (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N outputs (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[BillOfMaterialsLineItemEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[BillOfMaterialsLineItem!\]!](/docs/api-reference/v3/reference/inventory/bill-of-materials-line-item)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**status** `[BillOfMaterialsStatus!](/docs/api-reference/v3/reference/inventory/bill-of-materials-status)` *required*

Whether the bill of materials is in use.

**tags** `[String!]!` *required*

The tags on the bill of materials. Empty when it has none.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the bill of materials was last updated.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

## Example

```graphql theme={null}
query {
  billsOfMaterialsSearch(after: "...", before: "...", filter: { ... }, first: 10, last: 10, reverse: true, sort: CREATED_AT, text: "...") {
    nodes {
      buildable
      createdAt
      id
      name
      status
      tags
      updatedAt
    }
    pageInfo { hasNextPage endCursor }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.