---
title: "Import 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.

# Import 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/imports</code>
</div>
</div>

Saves what the preview of the same file said: every new and changed customer, as one new version of the whole list. Invalid rows are not imported; the answer names them again. Refused with 409 `list_changed` when the list has a newer version than `basedOn`. Preview the file again. A file that changes nothing saves nothing, and the answer's `version` is the current one. Only a signed-in person may call this, as for `PUT /v1/customers`. An API key is refused with 401 `session_required`.

## Request body

`application/json`, required

## Response

A `200` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `200` | What was saved. |
| `400` | The body was refused, or the file is no customers file (`invalid_data_file`, `invalid_json`). Nothing was saved. |
| `401` | No usable credential was sent (`invalid_credentials`), or an API key was used (`session_required`). |
| `409` | The list changed since the preview (`list_changed`). Nothing was saved. |
| `502` | The engine could not run, so nothing was saved (`engine_unavailable`). |

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

</div>
</div>

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