Create category
Create a new job category for an organization.Parameters
The name of the category (e.g., “Engineering”, “Marketing”, “Sales”)
Response
Indicates if an error occurred
The created category object
Error message if creation fails
Automatic ordering
When creating a category:- The system finds the category with the highest
ordervalue - Sets the new category’s order to
maxOrder + 1 - If no categories exist, sets order to
1
List categories
Get all categories for the current organization.Response
Array of category objects ordered by their order field (ascending)
Indicates if an error occurred
Error message if request fails
Update category order
Reorder categories by updating their order values.Parameters
The organization ID
Array of objects with category ID and new order values
Response
Indicates if an error occurred
“Updated Successfully” on success, or error message on failure
Transaction safety
The order update operation uses a database transaction to ensure all categories are updated atomically. If any update fails, all changes are rolled back.Default categories
When creating a new organization, these default categories are automatically created:Legacy system (web)
- Software Development (order: 1)
- Finance (order: 2)
- Operations (order: 3)
- HR & Recruiting (order: 4)
- Security (order: 5)
New system (www)
- Software Development
- Finance
- Operations
- HR & Recruiting
- Security
- Marketing
- Sales
- Customer Success
- Product Management
- Data & Analytics
- Legal & Compliance
- Design & Creative
- Quality Assurance
- IT Support
- Public Relations
- Administration
- Logistics & Supply Chain
- Research & Development
- Customer Support
- Project Management
- Health & Safety
- Facilities & Real Estate
- Strategy
- Engineering
- Manufacturing
- Purchasing & Procurement
- Risk Management
- Training & Development
- Executive Leadership
- Content & Copywriting
- Social Media
- Advertising
- Business Development
- Event Planning
- Sustainability & ESG
Assigning categories to jobs
Categories are assigned to jobs using the job’scategoryId field:
categoryId set to null (onDelete: SetNull in schema).
Reordering example
To swap the order of two categories:You must include all categories in the
newOrder array, not just the ones being reordered. Each category should have its final desired order value.