---
title: "Update classification (partial)"
method: PATCH
path: "/public/v1/classifications/{classification_id}/"
tags: ["Classifications"]
---

# Update classification (partial)

`PATCH /public/v1/classifications/{classification_id}/`

Update specific fields on a classification. Send only the fields you want to change — anything you don't send stays as it is. Use `null` on `parent_id` to remove a parent.

Example — rename and deactivate a classification:

```json
{"name": "Department (legacy)", "is_active": false}
```

**Selections (classification lines)**

Omitting `selections` preserves the existing lines. Sending the field applies it as-is: lines whose `id` you include are kept (and updated with whatever values you send), and lines whose `id` you omit are deleted. Sending `[]` removes every line. Adding a new line means sending it without an `id`:

```json
{"selections": [
  {"id": 42, "name": "Engineering", "is_active": true, "parent_id": null},
  {"name": "Operations", "is_active": true, "parent_id": null}
]}
```

**Required-for-records**

Omitting `required_for_records` preserves existing associations. Sending the field replaces the full set; sending `[]` removes them all:

```json
{"required_for_records": ["invoice", "bill"]}
```

Lines that are in use elsewhere can't be deleted; you'll get a 422 back listing which ones.

## Path parameters

- `classification_id` integer, required

## Request body

- PublicClassificationSchemaPatchIn — Partial update payload for PATCH /public/classifications/{id}/. Every field is optional: send only the fields you want to change. Unset fields are left untouched on the existing record. Note on list fields: - `selections` absent → existing classification lines are preserved. Sending `[]` deletes all existing lines. - `required_for_records` absent → existing record-type associations are preserved. Sending `[]` removes them all.
  - `name` string, nullable
  - `is_active` boolean, nullable
  - `selections` PublicSelectionItemIn[], nullable
    - `id` integer, nullable
    - `name` string, required
    - `is_active` boolean, required
    - `parent_id` integer, nullable, required
  - `required_for_records` PublicClassifiableRecords[], nullable
  - `parent_id` integer, nullable

## Response `200`

OK

- PublicClassificationSchemaOut
  - `created_by` AuditActorSchemaOut — Schema for audit actor information.
    - `actor_type` string, nullable
    - `email` string, nullable
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `timestamp` string, date-time, nullable
  - `updated_by` AuditActorSchemaOut — Schema for audit actor information.
    - `actor_type` string, nullable
    - `email` string, nullable
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `timestamp` string, date-time, nullable
  - `id` integer, required
  - `selections` PublicSelectionItemOut[], required
    - `id` integer, required
    - `name` string, required
    - `is_active` boolean, required
    - `parent_id` integer, nullable, required
    - `parent_name` string, nullable, required
  - `required_for_records` PublicClassifiableRecords[], required
  - `parent_id` integer, nullable, required
  - `parent_name` string, nullable, required
  - `name` string, required
  - `is_active` boolean

## Other responses

- `422` — Unprocessable Content
- `500` — Internal Server Error

---

[API](https://skmtc.net/dualentry/apis/dualentry-public-api-2.md) · [All operations](https://skmtc.net/dualentry/apis/dualentry-public-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dualentry/dualentry-public-api-2/versions/77cd3c6ec719/schema)
