Skip to main content

Department API

Manage departments for organizational segmentation. Departments are used to track revenue and expenses by organizational unit or business segment.

Endpoints

MethodEndpointDescription
GET/record/v1/departmentList all departments
GET/record/v1/department/{id}Get a specific department by ID
POST/record/v1/departmentCreate a new department
PATCH/record/v1/department/{id}Update an existing department
DELETE/record/v1/department/{id}Delete a department

Key Fields

Required Fields

FieldTypeDescriptionRequired
nameStringDepartment nameYes

Optional Fields

FieldTypeDescriptionRequired
subsidiaryObject/ArraySubsidiary or subsidiaries where this department is availableNo
parentObjectParent department (for department hierarchy)No
includeChildrenBooleanInclude child departments in reportsNo
isInactiveBooleanWhether the department is inactiveNo

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

  1. Classification Feature: Departments are part of NetSuite's classification feature. This must be enabled in Setup > Company > Enable Features > Classification.

  2. Subsidiary Association: In OneWorld accounts, assign departments to specific subsidiaries to control where they can be used.

  3. Department Hierarchy: Use parent departments to create organizational hierarchies for better reporting and analysis.

  4. Include Children: When includeChildren is true, reports will aggregate child department data into the parent.

  5. Transaction Tagging: Departments can be assigned to transactions, journal entries, and items to track financial data by organizational unit.

  6. Required on Transactions: Administrators can make department selection mandatory on transactions via Setup > Accounting > Accounting Preferences.

  7. Deletion Restrictions: Departments used in transactions or assigned to records cannot be deleted. Mark them as inactive instead.

  8. Permissions: Requires "Lists > Departments" permission in NetSuite.

  9. Reporting: Departments are commonly used in financial reports, saved searches, and analytics to segment performance by business unit.

  10. Multiple Classifications: NetSuite supports multiple classification dimensions (Department, Class, Location) for multi-dimensional reporting.