> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplifi.work/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a department

> Returns details about a single department by its ID.



## OpenAPI

````yaml /simplifi_openapi.json get /departments/{department_id}
openapi: 3.0.3
info:
  title: Simplifi API
  version: 1.0.0
  description: Workforce management API
  termsOfService: >-
    https://apps.staffsync.co.nz/static/StaffSyncUserTermsOfService.pdf?openexternal=true
  contact:
    name: Simplifi
    email: support@simplifi.work
    url: https://simplifi.work
servers:
  - url: https://{base_url}/api/v1
    description: Simplifi API Server
    variables:
      base_url:
        description: Your Simplifi instance base URL
        default: example.com
security:
  - BearerAuth: []
externalDocs:
  url: https://docs.simplifi.work/authentication
  description: The Simplifi API Documentation
paths:
  /departments/{department_id}:
    get:
      tags:
        - Departments
      summary: Get a department
      description: Returns details about a single department by its ID.
      operationId: getDepartment
      parameters:
        - name: department_id
          in: path
          description: The unique identifier of the department to retrieve
          required: true
          schema:
            type: string
            example: '2784_118'
      responses:
        '200':
          description: Department details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Department'
              example:
                id: '2784_118'
                costCentreCode: ''
                manager: ''
                name: Bakery
                payRollCode: ''
                roles:
                  - id: '2213_6820'
                    costCentreCode: ''
                    defaultActivity: '2760_183'
                    name: Assistant Manager
                  - id: '2213_6559'
                    costCentreCode: ''
                    defaultActivity: '2760_183'
                    name: Retail Assistant
                workDayFinishTime: ''
                workDayStartTime: ''
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    Department:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the department
          example: '2784_118'
        costCentreCode:
          type: string
          description: >-
            The cost centre code associated with this department. Empty string
            if not assigned.
          example: ''
        manager:
          type: string
          description: The manager of the department. Empty string if not assigned.
          example: ''
        name:
          type: string
          description: The display name of the department
          example: Bakery
        payRollCode:
          type: string
          description: >-
            The payroll code associated with this department. Empty string if
            not assigned.
          example: ''
        roles:
          type: array
          description: A list of roles within this department
          items:
            $ref: '#/components/schemas/Role'
        workDayFinishTime:
          type: string
          description: >-
            The default work day finish time for this department. Empty string
            if not set.
          example: ''
        workDayStartTime:
          type: string
          description: >-
            The default work day start time for this department. Empty string if
            not set.
          example: ''
    Role:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the role
          example: '2213_6820'
        costCentreCode:
          type: string
          description: >-
            The cost centre code associated with this role. Empty string if not
            assigned.
          example: ''
        defaultActivity:
          type: string
          description: The ID of the default activity assigned to this role
          example: '2760_183'
        name:
          type: string
          description: The display name of the role
          example: Assistant Manager
  responses:
    BadRequest:
      description: Bad Request - malformed request syntax or invalid parameters
    Unauthorized:
      description: Unauthorized - missing or invalid token
    Forbidden:
      description: Forbidden - valid token but insufficient permissions
    NotFound:
      description: Not Found - the requested resource does not exist
    Conflict:
      description: Conflict - the request conflicts with the current state of the resource
    UnprocessableEntity:
      description: >-
        Unprocessable Entity - the request was well-formed but contains semantic
        errors
    TooManyRequests:
      description: Too Many Requests - rate limit exceeded
    InternalServerError:
      description: Internal Server Error
    BadGateway:
      description: Bad Gateway - upstream service failed
    ServiceUnavailable:
      description: Service Unavailable
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token obtained from /oauth/token. Pass as Authorization: Bearer
        {token}

````