Organizational unit within a company representing a functional division such as Sales, Engineering, Marketing, or HR. Contains department structure, staffing, budget allocation, and management information.
https://api.mockly.codes/departments?page=1&limit=10&count=10Configure your request and click Send Request to see the response here.
/departmentsGet a collection of departments
/business/departments/departments/:idGet a single department by ID
/business/departments/:id/departments/metaGet resource metadata and schema
/business/departments/metaThe search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.
Search across all text fields:
GET https://api.mockly.codes/departments?q=laptopGET https://api.mockly.codes/departments?q=laptop&search_fields=name,descriptionsearch_fields, all text fields are searched// Get 10 departments
fetch('https://api.mockly.codes/departments?count=10')
.then(res => res.json())
.then(data => console.log(data));import requests
response = requests.get(
'https://api.mockly.codes/departments?count=10'
)
data = response.json()curl "https://api.mockly.codes/departments?count=10"fetch('https://api.mockly.codes/departments?nocache=true')idintegerUnique identifier for the department record
random_intnamestringOfficial name of the department (e.g., Engineering, Sales, Human Resources)
departmentcodestringShort alphanumeric code used internally to identify the department
wordmanager_idintegerEmployee ID of the department manager or head
random_intemployee_countintegerTotal number of employees currently assigned to this department
random_intbudgetnumberAnnual budget allocation for the department in the company's primary currency
random_intlocationstringCity or office location where the department is primarily based
citydescriptionstringDetailed description of the department's responsibilities, functions, and objectives
paragraphestablishedstringDate when the department was created or established within the organization
past_datedatecountintegerNumber of items to return (default: 10, max: 100)
seedintegerSeed for reproducible data generation
nocachebooleanBypass cache and generate fresh data on every request