Account API
Chart of accounts management. The Account record type is used to manage the chart of accounts in NetSuite.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /record/v1/account | List all accounts |
| GET | /record/v1/account/{id} | Get a specific account by ID |
| POST | /record/v1/account | Create a new account |
| PATCH | /record/v1/account/{id} | Update an existing account |
| DELETE | /record/v1/account/{id} | Delete an account |
Key Fields
Required Fields
| Field | Type | Description | Required |
|---|---|---|---|
acctName | String | Account name | Yes |
acctType | Object | Account type (e.g., Bank, Accounts Receivable, Income) | Yes |
acctNumber | String | Account number | No (auto-generated if not provided) |
Optional Fields
| Field | Type | Description | Required |
|---|---|---|---|
subsidiary | Object/Array | Subsidiary or subsidiaries where this account is available | No |
parent | Object | Parent account for sub-accounts | No |
description | String | Account description | No |
currency | Object | Currency for this account | No |
openingBalance | Number | Opening balance for the account | No |
exchangeRate | Number | Exchange rate (for foreign currency accounts) | No |
generalRateType | Object | General rate type for currency conversion | No |
cashFlowRate | Object | Cash flow rate type | No |
includeChildren | Boolean | Include child accounts in reports | No |
isInactive | Boolean | Whether the account is inactive | No |
eliminate | Boolean | Eliminate intercompany transactions | No |
inventory | Boolean | Inventory account flag | No |
revalue | Boolean | Revalue currency account | No |
Account Types
Common account type IDs:
Bank- Bank accountsAcctRec- Accounts ReceivableOthCurrAsset- Other Current AssetFixedAsset- Fixed AssetOthAsset- Other AssetAcctPay- Accounts PayableCredCard- Credit CardOthCurrLiab- Other Current LiabilityLongTermLiab- Long Term LiabilityEquity- EquityIncome- IncomeCOGS- Cost of Goods SoldExpense- ExpenseOthIncome- Other IncomeOthExpense- 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
-
Account Numbers: While account numbers are optional, it's best practice to provide them for better organization and reporting.
-
Subsidiaries: In OneWorld accounts, you must specify which subsidiaries can use each account. Without subsidiary assignments, the account won't be available for transactions.
-
Account Types: Account types cannot be changed after creation. You must create a new account if you need a different type.
-
Deletion Restrictions: Accounts with transactions cannot be deleted. Instead, mark them as inactive using
isInactive: true. -
Parent Accounts: When creating sub-accounts, ensure the parent account exists and is of a compatible type.
-
Currency: For multi-currency environments, specify the currency when creating accounts. Bank and A/R accounts typically require a specific currency.
-
Permissions: Requires the "Lists > Accounts" permission in NetSuite.
-
Opening Balances: Setting opening balances via API may require additional permissions and should be done carefully to maintain accounting integrity.