Skip to main content

Account API

Chart of accounts management. The Account record type is used to manage the chart of accounts in NetSuite.

Endpoints

MethodEndpointDescription
GET/record/v1/accountList all accounts
GET/record/v1/account/{id}Get a specific account by ID
POST/record/v1/accountCreate a new account
PATCH/record/v1/account/{id}Update an existing account
DELETE/record/v1/account/{id}Delete an account

Key Fields

Required Fields

FieldTypeDescriptionRequired
acctNameStringAccount nameYes
acctTypeObjectAccount type (e.g., Bank, Accounts Receivable, Income)Yes
acctNumberStringAccount numberNo (auto-generated if not provided)

Optional Fields

FieldTypeDescriptionRequired
subsidiaryObject/ArraySubsidiary or subsidiaries where this account is availableNo
parentObjectParent account for sub-accountsNo
descriptionStringAccount descriptionNo
currencyObjectCurrency for this accountNo
openingBalanceNumberOpening balance for the accountNo
exchangeRateNumberExchange rate (for foreign currency accounts)No
generalRateTypeObjectGeneral rate type for currency conversionNo
cashFlowRateObjectCash flow rate typeNo
includeChildrenBooleanInclude child accounts in reportsNo
isInactiveBooleanWhether the account is inactiveNo
eliminateBooleanEliminate intercompany transactionsNo
inventoryBooleanInventory account flagNo
revalueBooleanRevalue currency accountNo

Account Types

Common account type IDs:

  • Bank - Bank accounts
  • AcctRec - Accounts Receivable
  • OthCurrAsset - Other Current Asset
  • FixedAsset - Fixed Asset
  • OthAsset - Other Asset
  • AcctPay - Accounts Payable
  • CredCard - Credit Card
  • OthCurrLiab - Other Current Liability
  • LongTermLiab - Long Term Liability
  • Equity - Equity
  • Income - Income
  • COGS - Cost of Goods Sold
  • Expense - Expense
  • OthIncome - Other Income
  • OthExpense - Other Expense

Example: Create Account

Request

POST /record/v1/account
Content-Type: application/json
{
"acctNumber": "1100",
"acctName": "Cash - Operating",
"acctType": {
"id": "Bank"
},
"description": "Primary operating cash account",
"subsidiary": [
{"id": "1"},
{"id": "2"}
],
"currency": {
"id": "1"
},
"isInactive": false
}

Response

{
"id": "123",
"acctNumber": "1100",
"acctName": "Cash - Operating",
"acctType": {
"id": "Bank",
"refName": "Bank"
},
"description": "Primary operating cash account",
"subsidiary": [
{
"id": "1",
"refName": "Parent Company"
},
{
"id": "2",
"refName": "US Subsidiary"
}
],
"currency": {
"id": "1",
"refName": "USA"
},
"isInactive": false,
"links": [
{
"rel": "self",
"href": "https://{accountId}.suitetalk.api.netsuite.com/services/rest/record/v1/account/123"
}
]
}

Example: Update Account

Request

PATCH /record/v1/account/123
Content-Type: application/json
{
"description": "Updated primary operating cash account",
"isInactive": false
}

Response

{
"id": "123",
"acctNumber": "1100",
"acctName": "Cash - Operating",
"description": "Updated primary operating cash account",
"isInactive": false,
"links": [
{
"rel": "self",
"href": "https://{accountId}.suitetalk.api.netsuite.com/services/rest/record/v1/account/123"
}
]
}

Query Filters

You can filter accounts using query parameters:

Filter by Account Type

GET /record/v1/account?q=acctType.id IS Bank

Filter by Subsidiary

GET /record/v1/account?q=subsidiary.id ANYOF 1,2

Filter by Active Status

GET /record/v1/account?q=isInactive IS false

Filter by Account Number Range

GET /record/v1/account?q=acctNumber BETWEEN 1000 AND 1999

Complex Filter Example

GET /record/v1/account?q=acctType.id IS Bank AND isInactive IS false AND subsidiary.id ANYOF 1

Pagination

GET /record/v1/account?limit=100&offset=0

Important Notes

  1. Account Numbers: While account numbers are optional, it's best practice to provide them for better organization and reporting.

  2. Subsidiaries: In OneWorld accounts, you must specify which subsidiaries can use each account. Without subsidiary assignments, the account won't be available for transactions.

  3. Account Types: Account types cannot be changed after creation. You must create a new account if you need a different type.

  4. Deletion Restrictions: Accounts with transactions cannot be deleted. Instead, mark them as inactive using isInactive: true.

  5. Parent Accounts: When creating sub-accounts, ensure the parent account exists and is of a compatible type.

  6. Currency: For multi-currency environments, specify the currency when creating accounts. Bank and A/R accounts typically require a specific currency.

  7. Permissions: Requires the "Lists > Accounts" permission in NetSuite.

  8. Opening Balances: Setting opening balances via API may require additional permissions and should be done carefully to maintain accounting integrity.