<!-- Quelle: https://docs.onegrid.captron.com/de/api/files -->
<!-- Zuletzt aktualisiert: 2026-10-12 -->

# File formats

The file-based endpoints — and the manual [work order import](../workflows/import-work-orders) and [item import](../workflows/manage-items) — accept **JSON** and **CSV** files. Files are transmitted as Base64-encoded content in a JSON body with `fileType` `0` (JSON) or `1` (CSV); uploads are never multipart.

## Work order files

### JSON

A JSON **array of work order objects** in the shape of the [`WorkOrder` object](./work-orders.md#workorder-object). Per order, `number`, `dueDate`, and per request line `itemNumber` and `requestedAmount` are required; a file violating this fails the import.

```json title="work-orders.json"
[
  {
    "number": "WO-2026-0417",
    "description": "Assembly kit, line 3",
    "dueDate": "2026-07-15T12:00:00Z",
    "workOrderTypeName": "Picking",
    "designatedStorageName": "Main warehouse",
    "requests": [
      { "itemNumber": "100-4711", "itemName": "Hex bolt M8", "requestedAmount": 12 },
      { "itemNumber": "100-4712", "itemName": "Washer M8", "requestedAmount": 12 }
    ]
  }
]
```

### CSV

Comma-delimited, quoted fields supported, first line is a **header**. The header is name-driven: every header cell must exactly match one of the recognized column names — an unknown header aborts parsing.

One CSV row is one **request line**; rows with the same `Number` are grouped into one work order. The first row of a group supplies the order-level fields, and its `DueDate` must be set.

```csv title="work-orders.csv — two orders, the first with two request lines"
Number,ItemNumber,DueDate,RequestedAmount,ItemName,DesignatedStorageName
WO-2026-0417,100-4711,2026-07-15,12,Hex bolt M8,Main warehouse
WO-2026-0417,100-4712,2026-07-15,12,Washer M8,Main warehouse
WO-2026-0418,100-4720,2026-07-16,3,Bracket left,Main warehouse
```

<table>
  <thead>
    <tr><th>Column</th><th>Required</th></tr>
  </thead>
  <tbody>
    <tr><td><code>Number</code></td><td><strong>yes</strong></td></tr>
    <tr><td><code>ItemNumber</code></td><td><strong>yes</strong></td></tr>
    <tr><td><code>DueDate</code></td><td><strong>yes</strong></td></tr>
    <tr><td><code>RequestedAmount</code></td><td><strong>yes</strong></td></tr>
    <tr><td><code>Description</code>, <code>CustomerRequiredDeliveryDate</code>, <code>ItemName</code>, <code>ItemDescription</code>, <code>LanguageIsoCode</code>, <code>UnitOfMeasure</code>, <code>LotNumber</code>, <code>ExternalIdentifier</code>, <code>WorkOrderTypeName</code>, <code>DesignatedStorageName</code>, <code>DeliveryNumber</code>, <code>ExternalData</code>, <code>ItemExternalIdentifier</code>, <code>RequestExternalIdentifier</code>, <code>RequestExternalData</code>, <code>RequestType</code>, <code>Order</code>, <code>DesignatedLocationName</code>, <code>AlternativeStartNumber</code></td><td>no</td></tr>
  </tbody>
</table>

### Request type

In both formats, `RequestType` takes the number or the name of a request type, the name in any letter case: `0` / `Ignored`, `1` / `PickItem`, `2` / `PlaceItem`. `3` / `RelocateItem` is reserved for oneGRID Cloud's own Relocate Item process — a work order file that uses it fails the import, like any other invalid value.

## Item files

### JSON

A JSON **array of item objects** in the shape of the [`Item` object](./items.md#item-object). An unparseable file returns `FileNotSupported`.

```json title="items.json"
[
  {
    "number": "100-4711",
    "name": "Hex bolt M8",
    "description": "Galvanized, 40 mm",
    "minimumStockQuantity": 100,
    "manufacturer": "Muster GmbH",
    "unitOfMeasure": 0
  }
]
```

### CSV

Comma-delimited, quoted fields supported. Unlike work order CSVs, item CSVs are **positional**: the header row is skipped, and the columns must appear in exactly this order:

```csv title="items.csv — header text is ignored, column ORDER matters"
Number,Name,Description,LanguageIsoCode,MinimumStockQuantity,Weight,Height,Width,Length,Volume,Manufacturer,UnitOfMeasure,ExternalIdentifier
100-4711,Hex bolt M8,"Galvanized, 40 mm",en,100,0.012,,,0.04,,Muster GmbH,0,ERP-ITEM-4711
```

<table>
  <thead>
    <tr><th>#</th><th>Column</th></tr>
  </thead>
  <tbody>
    <tr><td>1</td><td><code>Number</code></td></tr>
    <tr><td>2</td><td><code>Name</code></td></tr>
    <tr><td>3</td><td><code>Description</code></td></tr>
    <tr><td>4</td><td><code>LanguageIsoCode</code></td></tr>
    <tr><td>5</td><td><code>MinimumStockQuantity</code></td></tr>
    <tr><td>6</td><td><code>Weight</code></td></tr>
    <tr><td>7</td><td><code>Height</code></td></tr>
    <tr><td>8</td><td><code>Width</code></td></tr>
    <tr><td>9</td><td><code>Length</code></td></tr>
    <tr><td>10</td><td><code>Volume</code></td></tr>
    <tr><td>11</td><td><code>Manufacturer</code></td></tr>
    <tr><td>12</td><td><code>UnitOfMeasure</code></td></tr>
    <tr><td>13</td><td><code>ExternalIdentifier</code> (may be omitted)</td></tr>
  </tbody>
</table>

Any row that fails validation aborts the whole file.
