Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Chart of Accounts > Update Accounting Code

Update Accounting Code

This reference describes how to update an existing accounting code through the REST API.

Prerequisites

If you have Z-Finance enabled on your tenant, you must have the Z-Finance Manage Accounting Code permission. See Z-Finance Roles.

Limitations

You can only update accounting codes that are not already associated with any transactions.

Request

  • Production: PUT https://api.zuora.com/rest/v1/accounting-codes/{ac-id}
  • API Sandbox: PUT https://apisandbox-api.zuora.com/rest/v1/accounting-codes/{ac-id}

Request Header Fields

Specify the following field in the request header.

Accept

optional

Optionally specify application/json. Only JSON is returned.

Request Path Fields

Specify the following field in the path of the request URL.

ac-id

required

ID of the accounting code you want to update.

 

Request Body Fields

Specify the following fields in the body of the request. Only specify fields that you want to update.

name

optional

Name of the accounting code.

Accounting code name must be unique. Maximum of 100 characters.

type

optional

Accounting code type. Valid values are as follows:

  • AccountsReceivable
  • Cash
  • OtherAssets
  • CustomerCashOnAccount
  • DeferredRevenue
  • SalesTaxPayable
  • OtherLiabilities
  • SalesRevenue
  • SalesDiscounts
  • OtherRevenue
  • OtherEquity
  • BadDebt
  • OtherExpenses

You cannot change the type of an accounting code from AccountsReceivable to a different type.

glAccountName

optional

Name of the account in your general ledger.

Field only available if you have Z-Finance enabled. Maximum of 255 characters.

glAccountNumber

optional

Account number in your general ledger.

Field only available if you have Z-Finance enabled. Maximum of 255 characters.

notes

optional

Maximum of 2,000 characters.

<custom fields>

optional

Custom fields you have configured for the accounting code object.

You must use the API Name of the custom field.

Response

Response Body Fields

The following fields are returned in the body of the response.

success

Returns true if the request is successful. Otherwise, returns false.

reasons

Information describing the reason for the result. Returned only if success is false.

code

An eight-digit numeric error code.

message

A description of the error.

Example

Example Request

PUT https://apisandbox-api.zuora.com/rest/v1/accounting-codes/8a8081ae547aac1e01547efb61f20140

{
    "name": "CASH",
    "type": "Cash"
}

Example Response

{
    "success": true
}

 

Last modified
17:51, 19 May 2016

Tags

Classifications

(not set)