Skip to main content
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

company_id
string
required
The unique identifier of the company

Query Parameters

page
integer
default:"1"
Page number for pagination
page_size
integer
default:"10"
Number of items per page
Search by level name or code

Response

success
boolean
Indicates if the request was successful
data
object
Paginated list of 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
  }
}

Error Responses

{
  "success": false,
  "message": "invalid company_id"
}
{
  "success": false,
  "message": "unauthorized"
}
{
  "success": false,
  "message": "internal server error"
}

Build docs developers (and LLMs) love