# Data types
Source: https://docs.file.ai/extract/data-types

> The field types a schema can use, and the shape each value takes in the API.

AI Schemas

# Data types

Copy pageCopy page

The field types a schema can use, and the shape each value takes in the API.

Copy pageCopy page

Every field in an [AI Schema](/extract/ai-schemas) has a `type`, plus an optional `format`. The type tells fileAI what to look for and decides how the value comes back from `GET /v1/files/{fileId}/values`. Pick the narrowest type that fits: an `enum` beats a free-text `string` when the answer is one of a known set.

## 

[​

](#types)

Types

`type`

Holds

Extra properties

Example value

`string`

Free text.

`"Bachelor of Mathematics"`

`string` with `format: "date-time"`

A date or date and time.

`format`

`"2025-06-12T14:30:00Z"`

`number`

A decimal or whole number.

`1250.5`

`integer`

A whole number. Returned with `type: "number"`.

`42`

`boolean`

Yes or no.

`"true"`

`enum`

One value from a fixed list.

`enumValues`

`"approved"`

`list`

A table: rows of named columns.

`items` (the columns)

See [Tables](#tables)

Other `format` values on `string` fields are `latitude` and `longitude`.

### 

[​

](#how-values-come-back)

How values come back

*   `number` and `integer` values are JSON numbers. Grouped text such as `"199,612.89"` is read as `199612.89`.
*   Every other scalar value is a string, including `boolean` (`"true"` or `"false"`).
*   An empty value is `null`.
*   **A number or table cell whose value is `0` also comes back as `null`.** If your system needs to tell zero from empty, treat `null` on a `number` field as “no value or zero”.

## 

[​

](#tables)

Tables

A `list` field is a table. Its `items` define the columns, and each column has its own `type`. In the values response, rows are in `valueArray`: an array of rows, each row an array of cells.

```
{
  "title": "Line items",
  "type": "list",
  "value": null,
  "valueArray": [
    [
      { "title": "Description", "type": "string", "value": "Consulting, March" },
      { "title": "Amount", "type": "number", "value": 1200 }
    ]
  ]
}
```

Two other field shapes are stored and returned as `list`:

Defined as

Returned as

An object (`dict`) with named properties

A `list` with one row; each property is a column.

An inline list (`inline-list`) of single values, item type in `inlineListType`

A `list` with one column.

Tables over 100 rows are truncated unless you pass `includeFullTableData=true`. To change a cell, use `PATCH /v1/files/{fileId}/values` with `cells`. See [Correct a value](/extract/ai-schemas#correct-a-value).

## 

[​

](#enums)

Enums

An `enum` field lists its allowed values in `enumValues`. fileAI returns one of them as a string.

```
{
  "title": "Status",
  "type": "enum",
  "enumValues": ["pending", "approved", "rejected"],
  "value": "pending"
}
```

## 

[​

](#field-properties)

Field properties

These properties appear on each field in `GET /v1/schemas` and can be set with `PATCH /v1/files/schema`:

Property

Meaning

`title`

The field name you see in the app. Any text, e.g. `Receipt Number`.

`description`

What to extract. fileAI uses it as the field’s prompt. See [Extraction prompts](/extract/extraction-prompts).

`type`, `format`

As above.

`enumValues`

Allowed values for an `enum`.

`items`

Columns of a `list`.

`hidden`

Hide the field in the app.

`internet_context`

Enrich the field with online data.

## 

[​

](#related)

Related

## AI Schemas

Define fields and read values.

## Extraction prompts

Write descriptions that extract reliably.

[Previous](/extract/extraction-prompts)[

Overview

Run every forensic check on a file at once, and find out whether to trust it before you act on it.

Next

](/forensics/overview)

⌘I

## On this page

*   [Types](#types)
    *   [How values come back](#how-values-come-back)
*   [Tables](#tables)
*   [Enums](#enums)
*   [Field properties](#field-properties)
*   [Related](#related)
