Skip to main content

Journal Entry API

Create, read, update, and delete general ledger journal entries using the NetSuite REST API.


Endpoints

MethodEndpointDescription
GET/record/v1/journalEntryList all journal entries
GET/record/v1/journalEntry/{id}Get specific journal entry
POST/record/v1/journalEntryCreate new journal entry
PATCH/record/v1/journalEntry/{id}Update journal entry
DELETE/record/v1/journalEntry/{id}Delete journal entry

Key Fields

Header Fields

FieldTypeDescriptionRequired
idstringInternal ID (read-only)-
tranIdstringJournal entry numberAuto-generated
tranDatestringTransaction date (ISO 8601)Yes
postingPeriodobjectAccounting periodAuto-calculated
subsidiaryobjectSubsidiaryYes (OneWorld)
currencyobjectTransaction currencyYes
exchangeRatenumberExchange rateAuto-calculated
approvedbooleanApproval statusRead-only
reversalDatestringReversal dateNo
reversalDeferbooleanDefer reversalNo
memostringMemo/descriptionNo
tranStatusobjectTransaction statusRead-only

Classification Fields

FieldTypeDescriptionRequired
departmentobjectDefault departmentNo
classobjectDefault classificationNo
locationobjectDefault locationNo

Sublists

FieldTypeDescriptionRequired
linecollectionJournal entry linesYes (min 2)

Example: Create Journal Entry

POST /record/v1/journalEntry
Content-Type: application/json
{
"tranDate": "2025-12-25",
"subsidiary": {
"id": "1"
},
"currency": {
"id": "1"
},
"memo": "Accrual adjustment for December expenses",
"line": {
"items": [
{
"account": {
"id": "150"
},
"debit": 1000.00,
"memo": "Accrued expense",
"department": {
"id": "5"
},
"class": {
"id": "3"
}
},
{
"account": {
"id": "400"
},
"credit": 1000.00,
"memo": "Accrued liability"
}
]
}
}

Response

{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/services/rest/record/v1/journalEntry/9001"
}
],
"id": "9001",
"refName": "Journal Entry #JE-9001",
"tranId": "JE-9001",
"tranDate": "2025-12-25",
"postingPeriod": {
"id": "12",
"refName": "Dec 2025"
},
"subsidiary": {
"id": "1",
"refName": "Parent Company"
},
"currency": {
"id": "1",
"refName": "USA"
},
"memo": "Accrual adjustment for December expenses",
"approved": false,
"tranStatus": {
"id": "APPROVED",
"refName": "Approved"
}
}

Example: Update Journal Entry

PATCH /record/v1/journalEntry/9001
Content-Type: application/json
{
"memo": "Updated: December accrual adjustment - corrected",
"reversalDate": "2026-01-01"
}

Line Item Fields

Each item in the line.items array supports:

FieldTypeDescriptionRequired
accountobjectGL account referenceYes
debitnumberDebit amountConditional
creditnumberCredit amountConditional
memostringLine memoNo
entityobjectCustomer/Vendor/EmployeeNo
departmentobjectDepartmentNo
classobjectClassificationNo
locationobjectLocationNo
subsidiaryobjectLine-level subsidiaryNo
Debit or Credit

Each line must have either a debit OR a credit amount, not both. The line cannot have both fields populated.


Balancing Requirements

Must Balance

The journal entry must balance:

Total Debits = Total Credits

If the journal entry does not balance, NetSuite will reject the transaction with an error.

Example: Balanced Entry

{
"line": {
"items": [
{"account": {"id": "150"}, "debit": 1000.00},
{"account": {"id": "250"}, "debit": 500.00},
{"account": {"id": "400"}, "credit": 1500.00}
]
}
}

Total Debits: 1,500.00 Total Credits: 1,500.00 Status: Balanced


Query Filters

Find by Date Range

GET /record/v1/journalEntry?q=tranDate BETWEEN '2025-01-01' AND '2025-12-31'

Find by Subsidiary

GET /record/v1/journalEntry?q=subsidiary='1'

Find Unapproved Entries

GET /record/v1/journalEntry?q=approved=false

Find by Account

GET /record/v1/journalEntry?q=line.account='150'

Find by Department

GET /record/v1/journalEntry?q=line.department='5'

Find Reversal Entries

GET /record/v1/journalEntry?q=reversalDate IS NOT NULL

Important Notes

Accounting Impact

Journal entries directly impact the general ledger:

  • Debits increase asset and expense accounts
  • Credits increase liability, equity, and revenue accounts
  • All entries are posted to the accounting period based on tranDate

Approval Workflow

  • If approval workflow is enabled, entries require approval before posting
  • Unapproved entries do not impact financial statements
  • Use the approved field to check approval status (read-only)

Reversing Entries

To create auto-reversing entries:

  1. Set reversalDate to the reversal date
  2. NetSuite automatically creates the reversing entry on that date
  3. Use reversalDefer to defer the reversal if needed

Period Locking

  • Cannot create/modify entries in closed periods
  • Cannot delete entries in locked periods
  • Period must be unlocked by administrator

Multi-Currency

  • Base currency entries: Set currency to base currency
  • Foreign currency entries: NetSuite calculates exchange rate automatically
  • Exchange rate can be overridden if needed

Subsidiary Restrictions

In OneWorld accounts:

  • Header subsidiary is required
  • Line-level subsidiary can differ for elimination entries
  • Must have access rights to all subsidiaries used

Common Use Cases

1. Accrual Entries

Record expenses in the correct period:

{
"tranDate": "2025-12-31",
"memo": "Accrued rent for December",
"line": {
"items": [
{"account": {"id": "620"}, "debit": 5000.00, "memo": "Rent expense"},
{"account": {"id": "200"}, "credit": 5000.00, "memo": "Accrued expenses"}
]
}
}

2. Reclassification Entries

Correct account coding errors:

{
"tranDate": "2025-12-25",
"memo": "Reclassify office supplies to equipment",
"line": {
"items": [
{"account": {"id": "150"}, "debit": 2500.00, "memo": "Equipment"},
{"account": {"id": "620"}, "credit": 2500.00, "memo": "Office supplies"}
]
}
}

3. Auto-Reversing Entry

Accrual that reverses next period:

{
"tranDate": "2025-12-31",
"reversalDate": "2026-01-01",
"memo": "Accrue December bonus - reverses Jan 1",
"line": {
"items": [
{"account": {"id": "700"}, "debit": 10000.00, "memo": "Bonus expense"},
{"account": {"id": "250"}, "credit": 10000.00, "memo": "Bonus payable"}
]
}
}

See Also