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

# Edit Department

> A `PUT` to the `/departments/{department}` endpoint allows your application to edit department.



## OpenAPI

````yaml put /v3/departments/{department}
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/departments/{department}:
    put:
      tags:
        - Department
      summary: Edit Department
      description: >-
        A `PUT` to the `/departments/{department}` endpoint allows your
        application to edit department.
      operationId: departments.update
      parameters:
        - name: department
          in: path
          required: true
          description: The department ID
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDepartment'
      responses:
        '200':
          description: '`Department`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Department'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateDepartment:
      type: object
      properties:
        name:
          type: string
        brand_id:
          type: integer
        external_id:
          type:
            - string
            - 'null'
        external_code:
          type:
            - string
            - 'null'
        location_id:
          type:
            - integer
            - 'null'
        description:
          type:
            - string
            - 'null'
        short_description:
          type:
            - string
            - 'null'
        url:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        internal_note:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items:
            type: string
      title: UpdateDepartment
    Department:
      type: object
      properties:
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
        handle:
          type: string
        external_id:
          type:
            - string
            - 'null'
        external_code:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        short_description:
          type:
            - string
            - 'null'
        url:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        internal_note:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items: {}
        brand_id:
          type: integer
        location_id:
          type:
            - integer
            - 'null'
        brand:
          type: object
          properties:
            name:
              type: string
            handle:
              type: string
          required:
            - name
            - handle
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - handle
        - external_id
        - external_code
        - description
        - short_description
        - url
        - image_url
        - internal_note
        - meta
        - brand_id
        - location_id
        - brand
        - created_at
        - updated_at
      title: Department
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````