---
title: "Map the company's own facility-process codes to Retraced facility processes"
method: POST
path: "/api/constants-mapping/facility-processes/"
tags: ["Constants Mapping/Facility processes"]
---

# Map the company's own facility-process codes to Retraced facility processes

`POST /api/constants-mapping/facility-processes/`

## Request

- Base URL: `https://api.retraced.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.retraced.com/api/constants-mapping/facility-processes/`
- Auth: none declared

Maps each `externalId` (and `externalName`) to the Retraced facility process `retracedFacilityProcessId`, in one statement. A code the company has already mapped is skipped, not overwritten, and so is a repeat of a code earlier in the same body. Answers 404 `facility_process_not_found` when a facility process does not exist and 409 `constant_mapping_code_is_retraced_id` when a code is itself a Retraced facility-process ID, without mapping anything. `data` is every facility-process mapping the company has on the given facility processes.

## Request body

- object[]
  - `retracedFacilityProcessId` string, required
  - `externalId` string, required
  - `externalName` string, nullable

## Response `201`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required: True when the request succeeded.
  - `data` object[], required
    - `id` string, required
    - `retracedFacilityProcessId` string, required
    - `name` string, nullable, required
    - `productionProcessName` string, nullable, required
    - `externalId` string, nullable, required
    - `externalName` string, nullable, required
    - `updatedAt` union, required
      - string
      - string, date-time
    - `updatedByUserName` string, nullable, required
    - `updatedByCompanyName` string, nullable, required

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response
- `409`: Default Response

## Changes

> 108 revisions in range; 2 not diffed.

- **2026-10-21** `e6e038468a94`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/retraced/apis/api-reference/changes/api/constants-mapping/facility-processes/post.md)

---

[API](https://skmtc.dev/retraced/apis/api-reference.md) - [All operations](https://skmtc.dev/retraced/apis/api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/retraced/apis/api-reference/revisions/83309c4abd20?raw)
