---
title: "Update Section"
method: PATCH
path: "/api/v1/configurations/{configuration_id}/sections"
tags: ["configurations"]
---

# Update Section

`PATCH /api/v1/configurations/{configuration_id}/sections`

## Request

- The document declares no server URL.
- Auth: none declared

Update a section entry for a configuration.

Args:
    configuration_id (UUID): ID of the configuration to update
    section_input (SectionUpdateInput): Updated section info
    user (DbUser): The logged-in user
    db (AsyncDatabaseConnection): Database connection

Raises:
    HTTPException: 400 if the code is not valid, code is in use,
        name is in use, the section is system-skipped
        (`DisabledSection`) and therefore not configurable, the
        narrative/action combination is unsupported (e.g.
        narrative="reconstruct" or "keep_on_match" with
        action="retain"), narrative "reconstruct" targets a
        section without a registered reconstructor, or the
        section can carry a trigger code and was sent with
        include=False
    HTTPException: 404 if configuration isn't found
    HTTPException: 409 if configuration is not a draft and therefore not editable
    HTTPException: 500 if section processing can't be updated

Returns:
    UpdateSectionProcessingResponse: The message to show the user

## Path parameters

- `configuration_id` string, uuid, required

## Request body

- SectionUpdateInput: Input model for updating a section's processing instructions.
  - `include` boolean, nullable
  - `narrative` 'retain' | 'remove' | 'reconstruct' | 'keep_on_match', nullable
  - `action` 'retain' | 'refine', nullable
  - `display_name` string, nullable
  - `current_code` string, required
  - `new_code` string, nullable

## Response `200`

Successful Response

- UpdateSectionProcessingResponse: Section with information for a custom section update.
  - `section_updated_code` string, required
  - `disabled_section` DisabledSection[], required
  - `narrative_only_section` NarrativeOnlySection[], required
  - `reconstructable_section` ReconstructableSection[], required
  - `trigger_code_section` TriggerCodeSection[], required
  - `narrative_data_labels` NarrativeDataLabels, required: Enum class to type the narrative actions possible for the frontend.
    - `retain` 'Keep original'
    - `keep_on_match` 'Keep on match'
    - `reconstruct` 'Reconstruct'
    - `remove` 'Exclude'
  - `coded_data_labels` CodedDataLabels, required: Enum class to type the coded data actions possible for the frontend.
    - `retain` 'Keep original'
    - `refine` 'Refine'

## Other responses

- `422`: Validation Error

## Changes

- **2026-12-01** `7312cd4b44ac`: 1 warning
  - added the new `11348-0` enum value to the `reconstructable_section/items/` response property for the response status `200`
- **2026-11-23** `3e1d2b45a8b2`: 1 warning
  - added the new `42346-7` enum value to the `reconstructable_section/items/` response property for the response status `200`
- **2026-11-17** `d09ecd9ebf11`: 1 warning
  - added the new `10160-0` enum value to the `reconstructable_section/items/` response property for the response status `200`
- **2026-10-23** `c710294a0d33`: 2 breaking, 1 warning, 3 info
  - removed `#/components/schemas/DbNarrativeAction` from the `narrative` request property `anyOf` list
  - removed `#/components/schemas/DbSectionAction` from the `action` request property `anyOf` list
  - removed the request property `name`
  - added the new optional request property `display_name`
  - …2 more
- **2026-09-04** `d26ad846cb1d`: 1 info
  - added the required property `trigger_code_section` to the response with the `200` status

[Operation history](https://skmtc.dev/cdcgov/apis/dibbs-ecr-refiner/changes/api/v1/configurations/:configuration_id/sections/patch.md)

---

[API](https://skmtc.dev/cdcgov/apis/dibbs-ecr-refiner.md) - [All operations](https://skmtc.dev/cdcgov/apis/dibbs-ecr-refiner/llms.txt) - [OpenAPI document](https://skmtc.dev/cdcgov/apis/dibbs-ecr-refiner/revisions/7312cd4b44ac?raw)
