> ## 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.

# billsOfMaterials

> List bills of materials, newest first, optionally filtered by status, tag, a product they use or make, or date. Filters combine with AND. This reads the database directly, so it is always current: sync from it with `updatedAtAfter`.

**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.

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

Only bills of materials created at or after this instant.

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

Only bills of materials created 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`.

**inputProductId** `ID`

Only bills of materials that consume this product. List products with `products`.

**last** `Int`

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

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

Which key to sort by (defaults to the first key, newest-first). Combine with `reverse` to flip direction.

**outputProductId** `ID`

Only bills of materials that make this product. List products with `products`.

**reverse** `Boolean`

Reverses the sort direction selected by `orderBy` (or its default).

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

Only bills of materials in one of these statuses. Omit or leave empty for every status.

**tags** `[String!]`

Only bills of materials with at least one of these tags. A tag matches exactly, including its case. Omit or leave empty for every bill of materials.

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

Only bills of materials updated at or after this instant.

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

Only bills of materials updated before this instant.

## Returns

**billsOfMaterials** `[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 {
  billsOfMaterials(after: "...", before: "...", createdAtAfter: "...", createdAtBefore: "...", first: 10, inputProductId: "...", last: 10, orderBy: CREATED_AT, outputProductId: "...", reverse: true, status: ACTIVE, tags: "...", updatedAtAfter: "...", updatedAtBefore: "...") {
    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.