# Retrieve department Retrieve a single department by its ID. Returns the full details of a specific department within an organization. The authenticated user must be a member of the organization. #### Path Parameters **`organization_id`** string required The unique identifier of the organization (format: `org_*`). **`department_id`** string required The unique identifier of the department (format: `dept_*`). ## Returns A department object. Request ```bash cURL curl https://api.aitronos.com/v1/organizations/org_xyz789/departments/dept_abc123 \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") # Department endpoints coming to SDK soon # result = client.departments.retrieve( # organization_id="org_xyz789", # department_id="dept_abc123", # ) ``` ```python Python import requests org_id = "org_xyz789" dept_id = "dept_abc123" url = f"https://api.aitronos.com/v1/organizations/{org_id}/departments/{dept_id}" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"} response = requests.get(url, headers=headers) department = response.json() print(department) ``` ```javascript JavaScript const orgId = "org_xyz789"; const deptId = "dept_abc123"; const response = await fetch( `https://api.aitronos.com/v1/organizations/${orgId}/departments/${deptId}`, { headers: { "Authorization": `Bearer ${accessToken}` }, } ); const department = await response.json(); console.log(department); ``` Response ```json 200 OK { "id": "dept_abc123", "name": "Engineering", "description": "Software development team", "parent_id": null, "path": "/dept_abc123", "depth": 0, "organization_id": "org_xyz789", "member_count": 5, "is_active": true, "is_default": false, "color": null, "created_by": "usr_owner1", "created_at": "2025-01-15T10:00:00Z" } ``` ```json 404 Error { "success": false, "error": { "code": "DEPARTMENT_NOT_FOUND", "message": "The requested department could not be found.", "system_message": "Department not found", "type": "client_error", "status": 404, "details": { "department_id": "dept_xyz" }, "trace_id": "abc-123-def", "timestamp": "2025-11-02T08:21:45Z" } } ``` ## Related Resources - [Get Department Tree](/docs/api-reference/departments/tree) - [List Departments](/docs/api-reference/departments/list) - [Create Department](/docs/api-reference/departments/create) - [Update Department](/docs/api-reference/departments/update) - [Reparent Department](/docs/api-reference/departments/reparent) - [Delete Department](/docs/api-reference/departments/delete) - [List Department Members](/docs/api-reference/departments/list-members) - [Add Department Member](/docs/api-reference/departments/add-member) - [Remove Department Member](/docs/api-reference/departments/remove-member) - [Department Object](/docs/api-reference/objects/department-object)