Skip to main content
Preview an import file

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Body

application/json
dataDelimiter
string

Character separating the columns of a CSV file. Ignored for JSON.

Example:

","

enumName
string

Enumeration the file is meant to be imported into. Named, the previewed values come back parsed into that enumeration's field types and narrowed to the fields it declares, which shows the data as it would actually be stored. Left out, the file is previewed exactly as parsed - what a client needs while the enumeration is still being designed from the file itself.

Example:

"priorities"

escapeChar
string

Character that escapes a quote inside a quoted CSV field. Ignored for JSON.

Example:

"\""

fileEncoding
string

Character encoding the file is written in. Wrong encoding shows up as mangled accented characters rather than as an error.

Example:

"utf8"

fileHash
string | null

Hash of the file to read, as returned when the file was uploaded.

Minimum string length: 1
Pattern: ^[a-z0-9]+$
Example:

"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"

mapping
object

Translation from the field names the file uses to the property names of the imported records - key is the name in the file, value the target property. Needed only where the two differ; run the matching preview endpoint to see what the file actually carries.

Example:

Response

Returns the parsed rows, the column names of the file, and those of them that cannot be used as fields.

data
object[]

Opening rows of the file, at most twenty of them, each keyed by the column names of the header row. Named an enumeration, the values come back parsed into that enumeration's field types and narrowed to the fields it declares, which is what makes the preview show the data as it would be stored.

Example:
fields
string[]

Column names read from the header row of the file, in the order they appear there.

Example:
invalidFields
string[]

Those of the file's column names that collide with the reserved record properties and therefore cannot be taken as enumeration fields.

Example: