---
title: "Preview a customers file"
description: "Other routes API"
---

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

# Preview a customers file

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="post">POST</span>
<code class="cvo-op-path-code">/v1/data-files/customers/previews</code>
</div>
</div>

Reads a customers file (CSV, Excel or JSON) and says what importing it would do, row by row. Nothing is saved. A row with an `id` is that customer. A row with no `id` is the one customer of its `name`, or a new customer whose id is made from its name. Each row is `new`, `changed`, `same` or `invalid`; an invalid row names its column and why, and is not imported. A column the file has sets that field, and an empty cell clears it. A column the file lacks keeps what is saved. A customer the file leaves out is kept: an import never removes one. A file with a column no customer has is refused whole, naming the column. `basedOn` is the version of the list the preview was made against. Send it with the import.

## Request body

`application/json`, required

## Response

A `200` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `200` | What the file would do. |
| `400` | The body was refused, or the file is no customers file (`invalid_data_file`, `invalid_json`). Nothing was read. |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `502` | The engine could not run, so nothing was read (`engine_unavailable`). |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/other/preview-a-customers-file/index.mdx
