---
title: "Change the code or name of one of the company's facility-process mappings"
method: PATCH
path: "/api/constants-mapping/facility-processes/{id}"
tags: ["Constants Mapping/Facility processes"]
---

# Change the code or name of one of the company's facility-process mappings

`PATCH /api/constants-mapping/facility-processes/{id}`

## 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/{id}`
- Auth: none declared

Sets the mapping's `externalId` and, when given, its `externalName` (`null` or `''` clears it). Answers 404 `constant_mapping_not_found` when the company has no such facility-process mapping, 409 `constant_mapping_already_exists` when another of its facility-process mappings already uses the code, and 409 `constant_mapping_code_is_retraced_id` when the code is itself a Retraced facility-process ID. `data` is the updated mapping.

## Path parameters

- `id` string, required

## Request body

- object
  - `externalId` string, required
  - `externalName` string, nullable

## Response `200`

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/:id/patch.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)
