> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.gitiho.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.gitiho.com/_mcp/server.

# Department list

GET https://example.gitiho.com/api/department

## Danh sách phòng ban

Trả về danh sách phòng ban của doanh nghiệp.

**Params**

| **Param** | **Kiểu dữ liệu** | **Default** | **Mô tả** |
| --- | --- | --- | --- |
| page | integer | 1 | Số trang của dữ liệu trả về |
| limit | integer | 15 | Giới hạn phân trang |

Response(Xem example response)

Reference: https://developer.gitiho.com/gitiho-business-api/admin/department-quản-ly-phong-ban/department-list

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/department:
    get:
      operationId: Department list
      summary: Department list
      description: |-
        ## Danh sách phòng ban

        Trả về danh sách phòng ban của doanh nghiệp.

        **Params**

        | **Param** | **Kiểu dữ liệu** | **Default** | **Mô tả** |
        | --- | --- | --- | --- |
        | page | integer | 1 | Số trang của dữ liệu trả về |
        | limit | integer | 15 | Giới hạn phân trang |

        Response(Xem example response)
      tags:
        - departmentQuảnLyPhongBan
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/type_admin/departmentQuảnLyPhongBan:DepartmentListDepartmentQuảnLyPhongBanResponse
servers:
  - url: https://example.gitiho.com
    description: Default
components:
  schemas:
    type_admin/departmentQuảnLyPhongBan:DepartmentListDepartmentQuảnLyPhongBanResponseDataDataItem:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        parent_id:
          oneOf:
            - description: Any type
            - type: 'null'
        created_at:
          type: string
        updated_at:
          type: string
        employer_count:
          type: integer
      required:
        - id
        - name
        - created_at
        - updated_at
        - employer_count
      title: DepartmentListDepartmentQuảnLyPhongBanResponseDataDataItem
    type_admin/departmentQuảnLyPhongBan:DepartmentListDepartmentQuảnLyPhongBanResponseDataLinksItem:
      type: object
      properties:
        url:
          oneOf:
            - description: Any type
            - type: 'null'
        label:
          type: string
        active:
          type: boolean
      required:
        - label
        - active
      title: DepartmentListDepartmentQuảnLyPhongBanResponseDataLinksItem
    type_admin/departmentQuảnLyPhongBan:DepartmentListDepartmentQuảnLyPhongBanResponseData:
      type: object
      properties:
        to:
          type: integer
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/type_admin/departmentQuảnLyPhongBan:DepartmentListDepartmentQuảnLyPhongBanResponseDataDataItem
        from:
          type: integer
        path:
          type: string
          format: uri
        links:
          type: array
          items:
            $ref: >-
              #/components/schemas/type_admin/departmentQuảnLyPhongBan:DepartmentListDepartmentQuảnLyPhongBanResponseDataLinksItem
        total:
          type: integer
        per_page:
          type: integer
        last_page:
          type: integer
        current_page:
          type: integer
        last_page_url:
          type: string
          format: uri
        next_page_url:
          oneOf:
            - description: Any type
            - type: 'null'
        prev_page_url:
          oneOf:
            - description: Any type
            - type: 'null'
        first_page_url:
          type: string
          format: uri
      required:
        - to
        - data
        - from
        - path
        - links
        - total
        - per_page
        - last_page
        - current_page
        - last_page_url
        - first_page_url
      title: DepartmentListDepartmentQuảnLyPhongBanResponseData
    type_admin/departmentQuảnLyPhongBan:DepartmentListDepartmentQuảnLyPhongBanResponse:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/type_admin/departmentQuảnLyPhongBan:DepartmentListDepartmentQuảnLyPhongBanResponseData
        status:
          type: string
      required:
        - data
        - status
      title: DepartmentListDepartmentQuảnLyPhongBanResponse

```

## Examples

**Response**

```json
{
  "data": {
    "to": 15,
    "data": [
      {
        "id": 1852,
        "name": "CRD-Phần mềm",
        "created_at": "2024-12-26 11:57:02",
        "updated_at": "2025-07-09 13:50:41",
        "employer_count": 3
      },
      {
        "id": 1853,
        "name": "Kiểm thử",
        "created_at": "2024-12-26 11:57:49",
        "updated_at": "2024-12-26 17:17:06",
        "employer_count": 0,
        "parent_id": 1852
      },
      {
        "id": 1854,
        "name": "Trí tuệ nhân tạo",
        "created_at": "2024-12-26 12:02:27",
        "updated_at": "2025-06-04 16:54:44",
        "employer_count": 1,
        "parent_id": 1852
      },
      {
        "id": 1856,
        "name": "Developer",
        "created_at": "2024-12-26 17:17:48",
        "updated_at": "2025-05-27 16:20:51",
        "employer_count": 0,
        "parent_id": 1852
      },
      {
        "id": 1857,
        "name": "Back_end",
        "created_at": "2024-12-26 17:18:12",
        "updated_at": "2024-12-26 17:25:26",
        "employer_count": 0,
        "parent_id": 1856
      },
      {
        "id": 1858,
        "name": "Front_end",
        "created_at": "2024-12-26 17:18:50",
        "updated_at": "2024-12-26 17:22:58",
        "employer_count": 0,
        "parent_id": 1856
      },
      {
        "id": 1863,
        "name": "Hành chính",
        "created_at": "2025-03-26 09:04:45",
        "updated_at": "2025-03-26 09:04:45",
        "employer_count": 0
      },
      {
        "id": 1864,
        "name": "Nhân sự",
        "created_at": "2025-03-31 10:11:58",
        "updated_at": "2025-03-31 10:11:58",
        "employer_count": 0
      },
      {
        "id": 1910,
        "name": "HN",
        "created_at": "2025-04-09 11:51:57",
        "updated_at": "2025-04-09 11:51:57",
        "employer_count": 0
      },
      {
        "id": 1911,
        "name": "Kế toán",
        "created_at": "2025-04-09 11:51:57",
        "updated_at": "2025-04-09 11:51:57",
        "employer_count": 0
      },
      {
        "id": 1913,
        "name": "HCM",
        "created_at": "2025-04-09 11:51:57",
        "updated_at": "2025-04-09 11:51:57",
        "employer_count": 0
      },
      {
        "id": 1915,
        "name": "HC",
        "created_at": "2025-04-21 13:48:21",
        "updated_at": "2025-04-21 13:54:44",
        "employer_count": 0,
        "parent_id": 1911
      },
      {
        "id": 1933,
        "name": "1",
        "created_at": "2025-05-23 17:59:14",
        "updated_at": "2025-05-24 17:16:42",
        "employer_count": 4
      },
      {
        "id": 1934,
        "name": "2",
        "created_at": "2025-05-23 17:59:23",
        "updated_at": "2025-05-24 08:59:38",
        "employer_count": 2,
        "parent_id": 1933
      },
      {
        "id": 1936,
        "name": "Phòng Ban Phát Triển Sản Phẩm 11",
        "created_at": "2025-10-27 11:48:35",
        "updated_at": "2025-10-27 11:49:37",
        "employer_count": 0
      }
    ],
    "from": 1,
    "path": "https://sub2.gitihov1.com/api/department",
    "links": [
      {
        "label": "&laquo; Trang trước",
        "active": false
      },
      {
        "label": "1",
        "active": true,
        "url": "https://sub2.gitihov1.com/api/department?page=1"
      },
      {
        "label": "Trang sau &raquo;",
        "active": false
      }
    ],
    "total": 15,
    "per_page": 15,
    "last_page": 1,
    "current_page": 1,
    "last_page_url": "https://sub2.gitihov1.com/api/department?page=1",
    "first_page_url": "https://sub2.gitihov1.com/api/department?page=1"
  },
  "status": "success"
}
```

**SDK Code**

```python
import requests

url = "https://example.gitiho.com/api/department"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://example.gitiho.com/api/department';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://example.gitiho.com/api/department"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://example.gitiho.com/api/department")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://example.gitiho.com/api/department")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://example.gitiho.com/api/department');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://example.gitiho.com/api/department");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://example.gitiho.com/api/department")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```