---
title: "Update a customer accounting class"
method: PATCH
path: "/accountant/companies/{customerId}/classes/{classId}"
tags: ["Accounting Classes"]
---

# Update a customer accounting class

`PATCH /accountant/companies/{customerId}/classes/{classId}`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/classes/{classId}`
- Auth: HTTP bearer

## Request body

- UpdateAccountingClassInput
  - `name` string
  - `description` string, nullable
  - `isActive` boolean
  - `status` 'draft' | 'active' | 'inactive'

## Response `200`

Accounting class updated

- AccountingClassResponse
  - `success` boolean
  - `data` AccountingClass
    - `id` string, uuid
    - `companyId` string, uuid
    - `name` string
    - `description` string, nullable
    - `status` 'draft' | 'active' | 'inactive'
    - `source` 'accountant' | 'bookkeeping_engine' | 'import'
    - `isActive` boolean
    - `approvedAt` string, date-time, nullable
    - `approvedByUserId` string, uuid, nullable
    - `metadata` object
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Accounting class not found
- `409`: Class name already exists for customer
- `422`: Validation error

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
