Department API
Manage departments for organizational segmentation. Departments are used to track revenue and expenses by organizational unit or business segment.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /record/v1/department | List all departments |
| GET | /record/v1/department/{id} | Get a specific department by ID |
| POST | /record/v1/department | Create a new department |
| PATCH | /record/v1/department/{id} | Update an existing department |
| DELETE | /record/v1/department/{id} | Delete a department |
Key Fields
Required Fields
| Field | Type | Description | Required |
|---|---|---|---|
name | String | Department name | Yes |
Optional Fields
| Field | Type | Description | Required |
|---|---|---|---|
subsidiary | Object/Array | Subsidiary or subsidiaries where this department is available | No |
parent | Object | Parent department (for department hierarchy) | No |
includeChildren | Boolean | Include child departments in reports | No |
isInactive | Boolean | Whether the department is inactive | No |
Example: Create Department
Request
POST /record/v1/department
Content-Type: application/json
{
"name": "Sales",
"subsidiary": [
{"id": "1"},
{"id": "2"}
],
"parent": {
"id": "10"
},
"includeChildren": true,
"isInactive": false
}
Response
{
"id": "25",
"name": "Sales",
"subsidiary": [
{
"id": "1",
"refName": "Parent Company"
},
{
"id": "2",
"refName": "US Subsidiary"
}
],
"parent": {
"id": "10",
"refName": "Revenue Departments"
},
"includeChildren": true,
"isInactive": false,
"links": [
{
"rel": "self",
"href": "https://{accountId}.suitetalk.api.netsuite.com/services/rest/record/v1/department/25"
}
]
}
Example: Update Department
Request
PATCH /record/v1/department/25
Content-Type: application/json
{
"name": "Sales & Marketing",
"includeChildren": false
}
Response
{
"id": "25",
"name": "Sales & Marketing",
"includeChildren": false,
"links": [
{
"rel": "self",
"href": "https://{accountId}.suitetalk.api.netsuite.com/services/rest/record/v1/department/25"
}
]
}
Query Filters
You can filter departments using query parameters:
Filter by Subsidiary
GET /record/v1/department?q=subsidiary.id ANYOF 1,2
Filter by Active Status
GET /record/v1/department?q=isInactive IS false
Filter by Parent Department
GET /record/v1/department?q=parent.id IS 10
Search by Name
GET /record/v1/department?q=name CONTAINS Sales
Get Top-Level Departments
GET /record/v1/department?q=parent.id IS EMPTY
Complex Filter Example
GET /record/v1/department?q=subsidiary.id ANYOF 1 AND isInactive IS false AND parent.id IS NOTEMPTY
Pagination and Sorting
GET /record/v1/department?limit=50&offset=0&orderby=name ASC
Important Notes
-
Classification Feature: Departments are part of NetSuite's classification feature. This must be enabled in Setup > Company > Enable Features > Classification.
-
Subsidiary Association: In OneWorld accounts, assign departments to specific subsidiaries to control where they can be used.
-
Department Hierarchy: Use parent departments to create organizational hierarchies for better reporting and analysis.
-
Include Children: When
includeChildrenis true, reports will aggregate child department data into the parent. -
Transaction Tagging: Departments can be assigned to transactions, journal entries, and items to track financial data by organizational unit.
-
Required on Transactions: Administrators can make department selection mandatory on transactions via Setup > Accounting > Accounting Preferences.
-
Deletion Restrictions: Departments used in transactions or assigned to records cannot be deleted. Mark them as inactive instead.
-
Permissions: Requires "Lists > Departments" permission in NetSuite.
-
Reporting: Departments are commonly used in financial reports, saved searches, and analytics to segment performance by business unit.
-
Multiple Classifications: NetSuite supports multiple classification dimensions (Department, Class, Location) for multi-dimensional reporting.