---
name: "inventory_import"
area: "inventory"
title: "Import items from CSV"
price: "$0.001 per row imported"
method: "POST"
url: "https://api.conecto.chat/v1/tools/inventory_import"
mcp_server: "https://api.conecto.chat/mcp/inventory"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/inventory/inventory_import"
---

# Import items from CSV (`inventory_import`)

Creates or changes items from a CSV in the file store, with optional quantities per location; all rows or none.

Items from a CSV in the file store, created or changed by SKU. Columns: sku, name, description, unit, barcode, cost, price, reorder_point, quantity, location (sku and, for new items, name). A quantity sets what is held at the row's location (default Main, made if new): the difference becomes an adjustment, in at the row's cost. All rows or none. Charged per row.

Price: $0.001 per row imported. A call that fails costs nothing.

## Use it when

A whole stock list arrives as a spreadsheet.

## Say this to your agent

> Here's the spreadsheet of everything in the warehouse. Load it into our stock.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `file_id` | string | yes | Exactly 36 characters. |  |  |
| `max_rows` | integer | no | The most rows this call may import (and hold the price for). 1 to 5,000. |  | `1000` |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `inventory_import` on the MCP server `https://api.conecto.chat/mcp/inventory` with these arguments:

```json
{
  "file_id": "5e8a1c3d-2b4f-4d6a-9c0e-7f1b3d5a8c2e"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/inventory_import \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id": "5e8a1c3d-2b4f-4d6a-9c0e-7f1b3d5a8c2e"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "inventory_import",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.002",
  "balance_usd": "$19.75",
  "result": {
    "created": 2,
    "changed": 0,
    "stock_adjusted": 2,
    "ignored_columns": []
  }
}
```

`result`: How many items were created and changed, how many stock levels were adjusted, and the columns that were ignored.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `invalid_input` | 400 | A quantity, cost or date is not valid. | Send numbers like 140.00 (a dot for decimals) and dates that have passed, like 2026-10-14. |
| `not_enough_stock` | 409 | Stock would go below 0 at a location. | Ship or move less; the message says how much there is. |
| `not_found` | 404 | No location has that name. | Call inventory_locations, or add it with inventory_save_location. |
| `archived` | 409 | The item or location is archived. | Use another one, or name a location that is in use. |
| `not_found` | 404 | The file is not in the store. | Upload it with files_upload first. |
| `too_many_rows` | 413 | The CSV has more rows than max_rows. | Pass a higher max_rows (up to 5,000). |
| `sku_taken` | 409 | A new SKU is used already. | Fix the row the message names. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [inventory_save_items](https://conecto.chat/tools/inventory/inventory_save_items.md): Adds stock items or changes them by SKU: name, unit, barcode, cost, price and reorder point. $0.005 per item saved.
- [inventory_list_items](https://conecto.chat/tools/inventory/inventory_list_items.md): Items with their stock in total and per location, the moving-average cost and the value. Free up to 1,000,000 reads a month.
- [inventory_move](https://conecto.chat/tools/inventory/inventory_move.md): Changes stock, all moves or none: receive, ship, transfer between locations, or adjust. $0.005 per move.
- [inventory_stocktake](https://conecto.chat/tools/inventory/inventory_stocktake.md): Records a count of one location; each difference from the books becomes a count move. $0.002 per line counted.
- [inventory_history](https://conecto.chat/tools/inventory/inventory_history.md): Stock moves, newest first, of one item, at one location, of one kind, or in a period. Free up to 1,000,000 reads a month.
- [inventory_locations](https://conecto.chat/tools/inventory/inventory_locations.md): Every location with how many items it holds and their value. Free up to 1,000,000 reads a month.
- [inventory_save_location](https://conecto.chat/tools/inventory/inventory_save_location.md): Adds a location (a warehouse, a shop, a van), or renames, describes or archives one. $0.001 a call.
- [inventory_report](https://conecto.chat/tools/inventory/inventory_report.md): Valuation (what was held on a day and its value), movement (per item in a period, with the cost of goods shipped) or low stock. Free up to 1,000,000 reads a month.
- [inventory_export](https://conecto.chat/tools/inventory/inventory_export.md): A CSV of the items (per location, with quantities and value) or of the moves in a period, with a download link. $0.001 a call.
