---
title: "Merge one mapping into another"
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.

# Merge one mapping into another

{/* 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/merges</code>
</div>
</div>

Merges the mapping `from` into the mapping `into`. Every decision of `from` that `into` does not contradict is kept in `version`, the next version of `into`: a field `into` does not fill, another column read for the same field (kept as a second name of it, `aliases`), a column left out, its system, its code answers. Then `from` is retired into `into`. When `from` adds nothing, no version is saved and `from` is retired as a copy. A decision of `from` that contradicts one of `into`'s is a question for a person: the merge is refused, naming each place, and nothing is saved or retired. Two mappings of different file formats are never merged; give them one `system` instead.

## Request body

`application/json`, required

## Status codes

| Status | Meaning |
|---|---|
| `200` | `{version, existing: true, retired}`: `from` added nothing, so no version was saved; `version` is the newest of `into`. |
| `201` | `{version, confirmedBy, confirmedAt, retired}`: the version saved, and the retirement of `from`. |
| `400` | The body is not a merge (`invalid_merge`, `invalid_json`), the merged mapping does not load (`invalid_mapping_config`), or no person who may act here was named (`unknown_confirming_user`). |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `404` | You have no saved mapping of one of those names (`unknown_mapping_config`). |
| `409` | `from` contradicts `into` (`merge_conflict`, `detail.conflicts` names each place and why), one of them is retired (`mapping_retired`), or that version is saved already (`mapping_config_exists`). Nothing was saved or retired. |

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

</div>
</div>

Source: https://docs.certinvo.com/reference/api/mappings/merge-one-mapping-into-another/index.mdx
