> 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/types/inventoryitem.md).

# InventoryItem

Inventory Item Type

Represents an inventory item in the system.

## Fields

| Field               | Type                  | Description                                                                  |
| ------------------- | --------------------- | ---------------------------------------------------------------------------- |
| `id`                | `ID!`                 | Unique identifier of the inventory item                                      |
| `tenantID`          | `UUID!`               | Tenant identifier                                                            |
| `createdAt`         | `Time!`               | Creation timestamp                                                           |
| `createdBy`         | `UUID!`               | User identifier who created the item                                         |
| `updatedAt`         | `Time`                | Last update timestamp                                                        |
| `updatedBy`         | `UUID!`               | User identifier who last updated the item                                    |
| `deletedAt`         | `Time`                | Deletion timestamp                                                           |
| `deletedBy`         | `UUID!`               | User identifier who deleted the item                                         |
| `dataTypeID`        | `UUID`                | Data type identifier                                                         |
| `dataTypeSlug`      | `String`              | Data type slug                                                               |
| `data`              | `Map`                 | Custom data associated with the item (replaces deprecated inventoryJSONData) |
| `sku`               | `String!`             | Stock keeping unit - unique identifier for the item                          |
| `itemmovementitems` | `[ItemMovementItem!]` | Movement items associated with this item                                     |
| `itemtransactions`  | `[Transaction!]`      | Transactions associated with this item                                       |
| `itemstocks`        | `[Stock!]`            | Stock records associated with this item                                      |
| `itemset`           | `[InventoryItemSet!]` | Item sets this item belongs to                                               |

## Interfaces

* `Node`
* `WithCustomData` - Provides the `data` field for storing custom JSON attributes

## Migration Note

**BREAKING CHANGE**: The `inventoryJSONData` field has been removed. Use the `data` field instead.

If you were previously using `inventoryJSONData`, update your queries and mutations to use `data`. All data previously stored in `inventoryJSONData` has been automatically migrated to the `data` field.

See the [InventoryItem Data Field Migration Guide](/development/migrations/inventory-item-data-field.md) for detailed migration instructions.

## Usage Example

```graphql
query {
  inventoryItems(
    where: { sku: "ITEM-123" }
  ) {
    edges {
      node {
        id
        sku
        data
        itemstocks {
          repositoryID
          quantity
          ownQuantity
          incomingStock
          outgoingStock
        }
      }
    }
  }
}
```

```graphql
mutation {
  createInventoryItem(
    input: {
      sku: "ITEM-456",
      dataTypeSlug: "physical_product",
      data: {
        "name": "Premium Headphones",
        "description": "Noise-cancelling wireless headphones",
        "weight": 0.3,
        "dimensions": {
          "length": 18,
          "width": 15,
          "height": 8
        },
        "category": "Electronics",
        "subcategory": "Audio"
      }
    }
  ) {
    inventoryItem {
      id
      sku
      data
    }
    workflows {
      id
      name
    }
  }
}
```


---

# 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/types/inventoryitem.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.
