curl -X GET "https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000/levels?page=1&page_size=10&search=engineer" \
-H "Authorization: Bearer YOUR_TOKEN"
{
"success": true,
"data": {
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"company_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Junior Engineer",
"hierarchy_level": 1,
"min_salary": 50000,
"max_salary": 70000,
"description": "Entry level engineer",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"company_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Senior Engineer",
"hierarchy_level": 3,
"min_salary": 80000,
"max_salary": 120000,
"description": "Senior level individual contributor",
"created_at": "2024-01-15T10:31:00Z",
"updated_at": "2024-01-15T10:31:00Z"
}
],
"total": 2,
"page": 1,
"page_size": 10,
"total_pages": 1
}
}
Levels
List Levels
Get a paginated list of organizational levels for a company
GET
/
companies
/
{company_id}
/
levels
curl -X GET "https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000/levels?page=1&page_size=10&search=engineer" \
-H "Authorization: Bearer YOUR_TOKEN"
{
"success": true,
"data": {
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"company_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Junior Engineer",
"hierarchy_level": 1,
"min_salary": 50000,
"max_salary": 70000,
"description": "Entry level engineer",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"company_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Senior Engineer",
"hierarchy_level": 3,
"min_salary": 80000,
"max_salary": 120000,
"description": "Senior level individual contributor",
"created_at": "2024-01-15T10:31:00Z",
"updated_at": "2024-01-15T10:31:00Z"
}
],
"total": 2,
"page": 1,
"page_size": 10,
"total_pages": 1
}
}
Authorization
Requires authentication with a Bearer token. Only users with the following roles can list levels:- Super Admin
- HR Manager
Path Parameters
string
required
The unique identifier of the company
Query Parameters
integer
default:"1"
Page number for pagination
integer
default:"10"
Number of items per page
string
Search by level name or code
Response
boolean
Indicates if the request was successful
object
Paginated list of levels
Show Pagination Response
Show Pagination Response
array
Array of level objects
Show Level Object
Show Level Object
string
Unique identifier for the level
string
The company this level belongs to
string
Name of the level
integer
Hierarchy level number
number
Minimum salary for this level
number
Maximum salary for this level
string
Description of the level
string
Timestamp when the level was created
string
Timestamp when the level was last updated
integer
Total number of items
integer
Current page number
integer
Number of items per page
integer
Total number of pages
curl -X GET "https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000/levels?page=1&page_size=10&search=engineer" \
-H "Authorization: Bearer YOUR_TOKEN"
{
"success": true,
"data": {
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"company_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Junior Engineer",
"hierarchy_level": 1,
"min_salary": 50000,
"max_salary": 70000,
"description": "Entry level engineer",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"company_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Senior Engineer",
"hierarchy_level": 3,
"min_salary": 80000,
"max_salary": 120000,
"description": "Senior level individual contributor",
"created_at": "2024-01-15T10:31:00Z",
"updated_at": "2024-01-15T10:31:00Z"
}
],
"total": 2,
"page": 1,
"page_size": 10,
"total_pages": 1
}
}
Error Responses
{
"success": false,
"message": "invalid company_id"
}
{
"success": false,
"message": "unauthorized"
}
{
"success": false,
"message": "internal server error"
}