---
title: "Get department by ID"
method: GET
path: "/departments/{departmentId}"
tags: ["Departments"]
---

# Get department by ID

`GET /departments/{departmentId}`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/departments/{departmentId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/ducin-public/apis/itcorpo-api/docs/departments/:departmentId/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `departmentId` integer, required

## Response `200`

Successful operation

- Department
  - `id` integer, required
  - `name` string, required

## Other responses

- `404`: Department not found
- `500`: An internal server error occurred.
- `503`: The service is temporarily unavailable. Maybe there is maintenance?

## Changes

- **2025-01-17** `4573748c6338`: 3 info
  - added the optional property `errorGUID` to the response with the `404` status
  - added the optional property `errorGUID` to the response with the `500` status
  - added the optional property `errorGUID` to the response with the `503` status
- **2025-01-09** `a59b7402c514`: 3 breaking
  - the response property `code` became optional for the status `404`
  - the response property `code` became optional for the status `500`
  - the response property `code` became optional for the status `503`
- **2025-01-09** `29074eeb2bb5`: 3 info
  - added the media type `application/json` for the response with the status `404`
  - added the non-success response with the status `500`
  - added the non-success response with the status `503`
- **2025-01-07** `659ddbe31a58`: 1 breaking, 2 info
  - removed the media type `application/json` for the response with the status `404`
  - removed the non-success response with the status `500`
  - removed the non-success response with the status `503`

[Operation history](https://skmtc.dev/ducin-public/apis/itcorpo-api/changes/departments/:departmentId/get.md)

---

[API](https://skmtc.dev/ducin-public/apis/itcorpo-api.md) - [All operations](https://skmtc.dev/ducin-public/apis/itcorpo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ducin-public/apis/itcorpo-api/revisions/80675117301b?raw)
