> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/inputs/inventoryitemwhereinput.md).

# InventoryItemWhereInput

Input type for filtering InventoryItem objects with comprehensive query predicates

Input type used for filtering InventoryItem objects. It provides a comprehensive set of predicates for filtering items based on various criteria.

## Fields

| Field                     | Type                         | Description                                                           |
| ------------------------- | ---------------------------- | --------------------------------------------------------------------- |
| `not`                     | `InventoryItemWhereInput`    | Negates the provided conditions                                       |
| `and`                     | `[InventoryItemWhereInput!]` | All conditions must match (logical AND)                               |
| `or`                      | `[InventoryItemWhereInput!]` | At least one condition must match (logical OR)                        |
| `id`                      | `ID`                         | Equal to ID                                                           |
| `idNEQ`                   | `ID`                         | Not equal to ID                                                       |
| `idIn`                    | `[ID!]`                      | ID in the provided list                                               |
| `idNotIn`                 | `[ID!]`                      | ID not in the provided list                                           |
| `idGT`                    | `ID`                         | ID greater than                                                       |
| `idGTE`                   | `ID`                         | ID greater than or equal                                              |
| `idLT`                    | `ID`                         | ID less than                                                          |
| `idLTE`                   | `ID`                         | ID less than or equal                                                 |
| `tenantID`                | `UUID`                       | Equal to tenant ID                                                    |
| `tenantIDNEQ`             | `UUID`                       | Not equal to tenant ID                                                |
| `tenantIDIn`              | `[UUID!]`                    | Tenant ID in the provided list                                        |
| `tenantIDNotIn`           | `[UUID!]`                    | Tenant ID not in the provided list                                    |
| `createdAt`               | `Time`                       | Equal to creation timestamp                                           |
| `createdAtGT`             | `Time`                       | Creation timestamp greater than                                       |
| `createdAtGTE`            | `Time`                       | Creation timestamp greater than or equal                              |
| `createdAtLT`             | `Time`                       | Creation timestamp less than                                          |
| `createdAtLTE`            | `Time`                       | Creation timestamp less than or equal                                 |
| `sku`                     | `String`                     | Equal to SKU                                                          |
| `skuNEQ`                  | `String`                     | Not equal to SKU                                                      |
| `skuIn`                   | `[String!]`                  | SKU in the provided list                                              |
| `skuNotIn`                | `[String!]`                  | SKU not in the provided list                                          |
| `skuContains`             | `String`                     | SKU contains substring                                                |
| `skuHasPrefix`            | `String`                     | SKU starts with prefix                                                |
| `skuHasSuffix`            | `String`                     | SKU ends with suffix                                                  |
| `skuEqualFold`            | `String`                     | SKU equals case-insensitive                                           |
| `skuContainsFold`         | `String`                     | SKU contains substring case-insensitive                               |
| `dataTypeIDIsNil`         | `Boolean`                    | Data type ID is null                                                  |
| `dataTypeIDNotNil`        | `Boolean`                    | Data type ID is not null                                              |
| `dataTypeSlug`            | `String`                     | Equal to data type slug                                               |
| `dataTypeSlugEqualFold`   | `String`                     | Data type slug equals case-insensitive                                |
| `hasItemstock`            | `Boolean`                    | Has stock records                                                     |
| `hasItemstockWith`        | `[StockWhereInput!]`         | Has stock records matching conditions                                 |
| `hasItemmovementitem`     | `Boolean`                    | Has item movements                                                    |
| `hasItemmovementitemWith` | `[ItemMovementWhereInput!]`  | Has item movements matching conditions                                |
| `Data`                    | `[String!]`                  | Match exact value at JSON path. Format: `["path", "value"]`           |
| `DataHasKey`              | `String`                     | Check if key exists at JSON path                                      |
| `DataIn`                  | `[String!]`                  | Value at path is in list. Format: `["path", "value1", "value2", ...]` |
| `DataContains`            | `[String!]`                  | String at path contains substring. Format: `["path", "substring"]`    |

## Usage Example

```graphql
query {
  # Find items with SKU containing "PHONE" and created in the last month
  inventoryItems(
    where: {
      and: [
        { skuContainsFold: "PHONE" },
        { createdAtGTE: "2023-05-01T00:00:00Z" }
      ]
    }
  ) {
    edges {
      node {
        id
        sku
        data
      }
    }
  }
}
```

```graphql
query {
  # Find items that have stock in a specific repository
  inventoryItems(
    where: {
      hasItemstockWith: [
        { repositoryID: "warehouse-main" }
      ]
    }
  ) {
    edges {
      node {
        id
        sku
        itemstock {
          repositoryID
          quantity
        }
      }
    }
  }
}
```

```graphql
query {
  # Find items with specific data properties
  inventoryItems(
    where: {
      Data: ["color", "red"],
      DataHasKey: "size"
    }
  ) {
    edges {
      node {
        id
        sku
        data
      }
    }
  }
}
```

```graphql
query {
  # Find items with nested JSON data
  inventoryItems(
    where: {
      and: [
        { Data: ["specifications.material", "aluminum"] },
        { DataIn: ["specifications.finish", "matte", "glossy", "brushed"] },
        { DataContains: ["description", "professional"] }
      ]
    }
  ) {
    edges {
      node {
        id
        sku
        data
      }
    }
  }
}
```

## JSON Query Examples

For more comprehensive examples of JSON field queries, including complex path queries and performance tips, see [JSON Field Queries](https://github.com/pyck-ai/docs/blob/main/graphql/advanced/json-field-queries.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/inputs/inventoryitemwhereinput.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
