---
title: "Import a payments 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 payments 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/payments/imports</code>
</div>
</div>

Marks every `new` row's invoice paid, in one step: its history gets `api:paid` once, with the row's `paidDate`. Invalid rows are not imported; the answer names them again. Refused with 409 `list_changed` when an invoice was marked paid since the preview. Preview the file again. Any credential may call this, as for `POST /v1/invoice-events`.

## Request body

`application/json`, required

## Response

A `200` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `200` | What was written. |
| `400` | The body was refused, or the file is no payments file (`invalid_data_file`, `invalid_json`). Nothing was written. |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `409` | The paid invoices changed since the preview (`list_changed`). Nothing was written. |
| `501` |  |
| `502` | The engine could not run, so nothing was written (`engine_unavailable`). |

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

</div>
</div>

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