Vendor Category API
Vendor categories allow you to segment and organize vendors for reporting and analysis.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /record/v1/vendorCategory | List all vendor categories |
GET | /record/v1/vendorCategory/{id} | Get specific category |
POST | /record/v1/vendorCategory | Create new category |
PATCH | /record/v1/vendorCategory/{id} | Update category |
DELETE | /record/v1/vendorCategory/{id} | Delete category |
Base URL
https://{account_id}.suitetalk.api.netsuite.com/services/rest/record/v1/vendorCategory
Key Fields
| Field | Type | Description | Required |
|---|---|---|---|
id | string | Internal ID (read-only) | - |
name | string | Category name | Yes |
isInactive | boolean | Inactive flag | No |
Example: Create Vendor Category
POST /record/v1/vendorCategory
Content-Type: application/json
Authorization: Bearer {access_token}
{
"name": "Office Supplies"
}
Response
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/services/rest/record/v1/vendorCategory/8"
}
],
"id": "8",
"name": "Office Supplies",
"isInactive": false
}
Example: Update Vendor Category
PATCH /record/v1/vendorCategory/8
Content-Type: application/json
Authorization: Bearer {access_token}
{
"name": "Office Supplies & Equipment",
"isInactive": false
}
Response
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/services/rest/record/v1/vendorCategory/8"
}
],
"id": "8",
"name": "Office Supplies & Equipment",
"isInactive": false
}
Query Filters
List All Active Categories
GET /record/v1/vendorCategory?q=isInactive=false&limit=100
Find Category by Name
GET /record/v1/vendorCategory?q=name='Office Supplies'
Find Categories by Partial Name
GET /record/v1/vendorCategory?q=name LIKE 'Office%'
List Inactive Categories
GET /record/v1/vendorCategory?q=isInactive=true
Common Use Cases
1. Segment Vendors by Type
Create categories to organize vendors by their business type:
// Create service categories
await createVendorCategory({ name: "Professional Services" });
await createVendorCategory({ name: "IT Services" });
await createVendorCategory({ name: "Consulting" });
// Create product categories
await createVendorCategory({ name: "Raw Materials" });
await createVendorCategory({ name: "Office Supplies" });
await createVendorCategory({ name: "Equipment & Machinery" });
// Create operational categories
await createVendorCategory({ name: "Utilities" });
await createVendorCategory({ name: "Shipping & Logistics" });
await createVendorCategory({ name: "Marketing & Advertising" });
2. Assign Category to Vendor
await patchVendor(vendorId, {
category: { id: "8" } // Office Supplies
});
3. Report by Vendor Category
Use categories to filter vendors in reports and queries:
GET /record/v1/vendor?q=category='8'
4. Spend Analysis by Category
// Get all vendors in a category
const vendors = await getVendors("category='8'");
// Sum up vendor balances for spend analysis
const totalSpend = vendors.reduce((sum, vendor) => {
return sum + vendor.balance;
}, 0);
console.log(`Total spend on Office Supplies: $${totalSpend}`);
5. Deactivate Unused Category
await patchVendorCategory(categoryId, {
isInactive: true
});
Important Notes
Required Fields
- name: The category name is required and must be unique
Category Usage
- Categories can be used for vendor segmentation and reporting
- Vendors can have zero or one category assigned
- Categories are typically used to group vendors by:
- Product/service type (Office Supplies, Raw Materials, etc.)
- Vendor role (Supplier, Service Provider, Contractor)
- Spend category for procurement analysis
- Industry vertical
Deleting Categories
- You cannot delete a category that is assigned to active vendors
- Either remove the category from all vendors first, or mark it as inactive
Best Practices
- Keep category names clear and consistent
- Use categories that align with your procurement and reporting needs
- Consider aligning categories with your chart of accounts expense categories
- Create categories that support spend analysis and vendor management
Common Category Examples
By Product/Service Type
- Raw Materials
- Finished Goods
- Office Supplies
- Equipment & Machinery
- Software & Licenses
- Marketing Services
- Professional Services
- IT Services
- Consulting
By Business Function
- Operations
- Sales & Marketing
- IT & Technology
- Finance & Accounting
- Human Resources
- Facilities & Maintenance
By Vendor Role
- Primary Supplier
- Backup Supplier
- Contract Manufacturer
- Distributor
- Reseller
- Service Provider
- Contractor
- Consultant
By Spend Category
- Direct Materials
- Indirect Materials
- Capital Equipment
- MRO (Maintenance, Repair, Operations)
- Services
- Utilities
- Travel & Entertainment
- Marketing & Advertising
By Industry
- Manufacturing
- Technology
- Logistics
- Healthcare
- Financial Services
- Utilities
Vendor Category vs Customer Category
While similar in structure, vendor and customer categories serve different purposes:
| Aspect | Vendor Category | Customer Category |
|---|---|---|
| Purpose | Organize suppliers and service providers | Organize customers and prospects |
| Usage | Procurement analysis, spend management | Sales reporting, customer segmentation |
| Common Types | Product/service types, spend categories | Business size, industry, lifecycle stage |
| Reporting | A/P aging, spend analysis | A/R aging, sales pipeline |
Integration with Procurement Workflows
1. Supplier Onboarding
// Automatically categorize new vendors based on business type
const vendorData = {
companyName: "ABC Office Supply Co",
category: { id: "8" }, // Office Supplies
terms: { id: "2" } // Net 30
};
await createVendor(vendorData);
2. Spend Management
// Generate spend report by category
const categories = await getVendorCategories();
for (const category of categories) {
const vendors = await getVendors(`category='${category.id}'`);
const categorySpend = vendors.reduce((sum, v) => sum + v.balance, 0);
console.log(`${category.name}: $${categorySpend}`);
}
3. Vendor Segmentation for Negotiations
// Identify high-spend categories for contract negotiations
const highSpendCategories = await identifyHighSpendCategories();
// Focus procurement team on these categories
highSpendCategories.forEach(cat => {
console.log(`Priority category: ${cat.name} - $${cat.totalSpend}`);
});
See Also
- Vendor - Assign categories to vendors
- Customer Category - Similar concept for customers
- Vendor Bill - Track vendor expenses
- Purchase Order - Create purchase orders