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

# Get Inventory Item

> This endpoint gets or creates a new inventory item.

### Body

<ParamField body="id" type="string">
  This is the unique identifier for the inventory item.
</ParamField>

### Response

<ResponseField name="id" type="string">
  This is the unique identifier for the inventory item.
</ResponseField>

<ResponseField name="sku" type="string">
  This is the stock keeping unit (SKU) for the inventory item.
</ResponseField>

<ResponseField name="description" type="string">
  This is the description for the inventory item.
</ResponseField>

<ResponseField name="size" type="string">
  This is the size for the inventory item.
</ResponseField>

<ResponseField name="incoming" type="number">
  This is the number of items incoming for the inventory item.
</ResponseField>

<ResponseField name="color" type="string">
  This is the color for the inventory item.
</ResponseField>

<ResponseField name="warehouse" type="number">
  This is the identifier for the warehouse for the inventory item.
</ResponseField>

<ResponseField name="available" type="number">
  This is the number of items available for the inventory item.
</ResponseField>

<ResponseField name="arriving" type="date">
  This is the date when the items are expected to arrive for the inventory item.
</ResponseField>

<ResponseField name="purchase_order_id" type="string">
  This is the identifier for the purchase order associated with the inventory item.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request GET 'https://api.stateset.com/v1/inventory_items/:id' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": "0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
  }'
  ```

  ```graphQL GraphQL theme={null}

  query {
      inventory_item {
        id
        sku
        upc
        description
        size
        color
        incoming
        available
        warehouse
        arrivalDate
        deliveryDate
      }
    }
  ```

  ```javascript Node.js theme={null}

  var inventoryItems = await stateset.inventoryItems.retreive({
      id: "0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
  });

  ```

  ```python Python theme={null}

  inventoryItems = stateset.inventoryItems.retreive({
      id: "0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
  })

  ```

  ```ruby Ruby theme={null}

  inventoryItems = Stateset::InventoryItems.retreive({
      id: "0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
  })

  ```

  ```php PHP theme={null}

  $inventoryItems = $stateset->inventoryItems->retreive([
      "id" => "0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
  ]);

  ```

  ```go Go theme={null}

  inventoryItems, err := stateset.InventoryItems.Retreive(
      "0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
  )

  ```

  ```java Java theme={null}

  InventoryItems inventoryItems = stateset.inventoryItems.retreive(
      "0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
  );

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "inventory_item": [
          {
              "id": "0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
              "sku": "SKU-123",
              "description": "This is a description",
              "size": "Large",
              "incoming": 10,
              "color": "Red",
              "warehouse": 1,
              "available": 10,
              "arriving": "2021-01-01",
              "purchase_order_id": "0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
          },
      ]
  }
  ```

  ```json Error Response (404 Not Found) theme={null}
  {
    "error": {
      "code": "RESOURCE_NOT_FOUND",
      "message": "Inventory item not found",
      "details": {
        "resource": "inventory_item",
        "id": "inv_abc123"
      },
      "request_id": "req_abc123def456"
    }
  }
  ```

  ```json Error Response (401 Unauthorized) theme={null}
  {
    "error": {
      "code": "INVALID_API_KEY",
      "message": "The API key provided is invalid or has been revoked",
      "request_id": "req_abc123def456"
    }
  }
  ```
</ResponseExample>

### Inventory Item

| Name                | Type                       | Description                                                 |
| ------------------- | -------------------------- | ----------------------------------------------------------- |
| id                  | Text (Primary Key, Unique) | Unique identifier for the entry                             |
| sku                 | Text (Nullable)            | Stock Keeping Unit (SKU) for the entry                      |
| description         | Text (Nullable)            | Description or additional details about the entry           |
| size                | Text (Nullable)            | Size of the item                                            |
| incoming            | Integer (Nullable)         | Number of items incoming                                    |
| color               | Text (Nullable)            | Color of the item                                           |
| warehouse           | Integer (Nullable)         | Identifier for the warehouse                                |
| available           | Integer (Nullable)         | Number of items available                                   |
| arriving            | Date (Nullable)            | Date when the items are expected to arrive                  |
| purchase\_order\_id | Text (Nullable)            | Identifier for the purchase order associated with the entry |
