---
title: "Update an accounting code"
method: PUT
path: "/v1/accounting-codes/{ac-id}"
tags: ["Accounting Codes"]
---

# Update an accounting code

`PUT /v1/accounting-codes/{ac-id}`

This reference describes how to update an existing accounting code through the REST API.
### Prerequisites
  If you have Zuora Finance enabled on your tenant, you must have the  Manage Accounting Code permission. 
### Limitations
You can only update accounting codes that are not already associated with any transactions.

## Path parameters

- `ac-id` string, required

## Headers

- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string
- `Zuora-Version` string

## Request body

- PUTAccountingCodeType — Container for custom fields of an Accounting Code object.
  - `glAccountName` string — Name of the account in your general ledger. Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
  - `glAccountNumber` string — Account number in your general ledger. Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
  - `name` string — Name of the accounting code. Accounting code name must be unique. Maximum of 100 characters.
  - `notes` string — Maximum of 2,000 characters.
  - `type` 'AccountsReceivable' | 'OnAccountReceivable' | 'Cash' | 'OtherAssets' | 'CustomerCashOnAccount' | 'DeferredRevenue' | 'SalesTaxPayable' | 'OtherLiabilities' | 'SalesRevenue' | 'SalesDiscounts' | 'OtherRevenue' | 'OtherEquity' | 'BadDebt' | 'OtherExpenses' — Accounting code type. You cannot change the type of an accounting code from `AccountsReceivable` to a different type. Note that `OnAccountReceivable` is only available if you enable the Invoice Settlement feature.
  - `segmentConstantValues` SegmentConstantValuesCustomFields — Segment constant values. The field is available only if you have GL Segmentation 2.0 enabled. This field is additional property.

## Response `200`

OK

- CommonResponse
  - `processId` string — The ID of the process that handles the operation.
  - `reasons` object[] — The container of the error code and message. This field is available only if the `success` field is `false`.
    - `code` string — The error code of response.
    - `message` string — The detail information of the error response
  - `requestId` string, uuid — Unique identifier of the request.
  - `success` boolean — Indicates whether the call succeeded.

## Other responses

- `500` — Internal Server Error
- `4XX` — Request Errors

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
