Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Chart of Accounts > Get All Accounting Codes

Get All Accounting Codes

This reference describes how to query all accounting codes in your chart of accounts through the REST API.

Request

  • Production: GET https://api.zuora.com/rest/v1/accounting-codes
  • API Sandbox: GET https://apisandbox-api.zuora.com/rest/v1/accounting-codes

Request Header Fields

Specify the following field in the request header.

Accept

optional

Optionally specify application/json. Only JSON is returned.

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.

accountingCodes

An array of all the accounting codes in your chart of accounts. Each accounting code has the following fields.

name

Name of the accounting code.

id ID of the accounting code.

type

Accounting code type. Possible values:

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

glAccountName

Name of the account in your general ledger.

Field only available if you have Z-Finance enabled.

glAccountNumber

Account number in your general ledger.

Field only available if you have Z-Finance enabled. 

category

The category associated with the accounting code. Possible values:

  • Assets
  • Liabilities
  • Equity
  • Revenue
  • Expenses

status

The accounting code status. Possible values:

  • Active
  • Inactive

createdOn

Date and time when the accounting code was created.

createdBy

The ID of the user who created the accounting code.

updatedOn

Date and time when the accounting code was last updated.

updatedBy The ID of the user who last updated the accounting code.

notes

Any optional notes for the accounting code.

<custom fields>

Any custom fields you have configured for the accounting code object.

nextPage URL to retrieve the next page of the response.

Example

Example Request

GET https://apisandbox-api.zuora.com/rest/v1/accounting-codes

Example Response

{
    "accountingCodes": [
        {
            "id": "e20b0747478025a10147816ba1c20097",
            "name": "Accounts Receivable",
            "type": "AccountsReceivable",
            "glAccountName": null,
            "glAccountNumber": null,
            "notes": null,
            "category": "Assets",
            "status": "Active",
            "CustomField__c": null,
            "createdOn": "2014-07-29 02:20:20",
            "createdBy": "e20b074746ec48f40147140f51e30a1a",
            "updatedOn": "2014-07-29 02:20:20",
            "updatedBy": "e20b074746ec48f40147140f51e30a1a"
        },
        {
            "id": "e20b0747478025a10147816ba21900a0",
            "name": "Discounts",
            "type": "SalesDiscounts",
            "glAccountName": null,
            "glAccountNumber": null,
            "notes": null,
            "category": "Revenue",
            "status": "Inactive",
            "CustomField__c": null,
            "createdOn": "2014-07-29 02:20:20",
            "createdBy": "e20b074746ec48f40147140f51e30a1a",
            "updatedOn": "2014-09-27 22:11:07",
            "updatedBy": "e20b074746ec48f40147140f51e30a1a"
        }
    ],
    "success": true
}
Last modified
17:50, 19 May 2016

Tags

Classifications

(not set)