---
title: "Listing departments"
method: GET
path: "/departments"
tags: ["Company Departments"]
---

# Listing departments

`GET /departments`

## Request

- Base URL: `https://api.gupy.io/api/v1`
- URL: `https://api.gupy.io/api/v1/departments`
- Auth: HTTP bearer

Returns a list of company departments.

## Query parameters

- `id` number
- `name` string
- `code` string
- `fields` string
- `perPage` integer
- `page` integer

## Response `200`

An array of departments

- PaginatedDepartment: An array of departments
  - `results` Department[], required
    - `id` integer, required: Department ID
    - `name` string: Name of the department
    - `code` string: External code of the department
    - `similarTo` 'financial_management' | 'agronomy' | 'architecture' | 'audit_or_quality' | 'attendance' | 'sales' | 'purchases' | 'communication_or_design_or_marketing' | 'accounting_or_controlling' | 'engineering_or_maintenance_or_technical_services' | 'legal' | 'innovation_or_product' | 'logistics' | 'operations' | 'project_or_processes' | 'human_resources' | 'security' | 'technology': Department is similar to
    - `createdAt` string, date-time, required: Department creation date
    - `updatedAt` string, date-time, required: Department update date
  - `totalResults` integer
  - `page` integer
  - `totalPages` integer

## Other responses

- `400`: BadRequest / Invalid Input
- `401`: Unauthorized
- `403`: Forbidden

---

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