---
title: "Decide columns and fields of a kept draft"
description: "Mappings 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.

# Decide columns and fields of a kept draft

{/* 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/mappings/drafts/&#123;id&#125;/decisions</code>
</div>
</div>

`{decisions: [...]}`, applied in order after the ones already kept. A decision is one of: `{column, to, format?}` (read the column into that field), `{column, ignore}` (`true`: not carried over; `false`: open again), `{field, from}` (the field reads that column), `{field, path}` (the field reads a place of the file typed by hand, a whole path; a field of a list reads inside that list), `{field, format}` (the converter of a field that reads the file, of the field's kind), `{field, const}` (a fixed value), `{field, remove: true}`, `{field, code, means}` (one of your own codes and the official code it means, or `null` for no value), `{field, code, remove: true}` (one of your own codes taken out of the field's table), `{field, alias, remove: true}` (one of the field's other names taken out), `{input: {encoding?, recordsAt?}}` (how the file is read), `{list, from}` (where a list of the model sits in the file; placed again, it moves with its fields), or `{list, from, where?, fields}` (a list inside a line, whole, as a new version carries it from the live card; `list` and `from` are whole paths). Either all of them apply and are kept, or none is.

## Path parameters

## Request body

`application/json`, required

## Status codes

| Status | Meaning |
|---|---|
| `200` | The draft, as `GET /v1/mappings/drafts/{id}` answers it. |
| `400` | The body is not JSON (`invalid_json`), or `decisions` is not a list of objects (`invalid_decisions`). |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `404` | This company has no such draft (`unknown_mapping_draft`). |
| `409` | `mapping_draft_finalized`: the draft is finalized and never changes. |
| `422` | A decision does not apply (`decision_not_applicable`, `detail` gives its `index` and the decision): its column or field is not in the draft or the catalogue, or another column already writes that field. Nothing was kept. |

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

</div>
</div>

Source: https://docs.certinvo.com/reference/api/mappings/decide-columns-and-fields-of-a-kept-draft/index.mdx
