openapi: 3.1.0
info:
  title: support-management
  contact: {}
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: "14.16"
servers:
- url: http://localhost:52015
  description: Generated server url
tags:
- name: Configuration for namespace
  description: Namespace configuration operations
- name: Configuration message-exchange sync
  description: Configuration for message-exchange scheduled syncing job
- name: Metadata for phases
  description: Phase metadata operations
- name: Metadata for labels
  description: Label metadata operations
- name: Errand events
  description: Errand event operations
- name: User notifications
  description: User notifications operations
- name: Handover
  description: Errand handover operations
- name: Errand JSON Parameters
  description: Errand JSON parameter operations
- name: Subscribers
  description: "Subscriber CRUD operations. A subscriber describes who receives notifications\
    \ and how (channels, event filters, optional pause window)."
- name: Time measures
  description: Time measure operations
- name: Metadata for statuses
  description: Status metadata operations
- name: Configuration for email integration
  description: Settings for email integration per municipality/namespace
- name: Errand attachments
  description: Errand attachments operations
- name: Errand Parameters
  description: Errand parameter operations
- name: Metadata for categories
  description: Category metadata operations
- name: Revisions
  description: Errand and errand note revision operations
- name: Subscriptions
  description: "Subscription operations. A subscription describes what a subscriber\
    \ listens for (an errand or all events in a namespace). Subscriptions support\
    \ create, list and delete — to change what is being listened to, delete and create\
    \ a new one."
- name: Errand notes
  description: Errand notes operations
- name: Metadata for contact reasons
  description: Contact reason metadata operations
- name: Metadata for external ID types
  description: ExternalIdType metadata operations
- name: Metadata
  description: Metadata operations
- name: Metadata for roles
  description: Role metadata operations
- name: Errand communication
  description: Errand communication operations
- name: Configuration for message exchange integration
  description: Settings for message exchange integration per municipality/namespace
- name: Errands
  description: Errand operations
- name: Subscriber notifications
  description: Subscriber notification operations
paths:
  /{municipalityId}/{namespace}/notifications/{notificationId}/acknowledge:
    put:
      tags:
      - Subscriber notifications
      summary: Acknowledge subscriber notification
      description: Mark a subscriber notification as acknowledged
      operationId: acknowledgeNotification
      parameters:
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: notificationId
        in: path
        description: Notification ID
        required: true
        schema:
          type: string
        example: 74540a24-70e1-4e82-90f7-7d8ad4666cdc
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/namespace-config:
    get:
      tags:
      - Configuration for namespace
      summary: Read namespace config
      description: Fetches namespace config for a namespace/municipality
      operationId: readNamespaceConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NamespaceConfig"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    put:
      tags:
      - Configuration for namespace
      summary: Update namespace config
      description: Update config that is used within the namespace
      operationId: updateNamespaceConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/NamespaceConfig"
        required: true
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Configuration for namespace
      summary: Create namespace config
      description: Create config that is used within the namespace
      operationId: createNamespaceConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/NamespaceConfig"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Configuration for namespace
      summary: Delete namespace config
      description: Deletes the config for a namespace/municipality
      operationId: deleteNamespaceConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/namespace-config/action-config/{id}:
    put:
      tags:
      - Configuration for namespace
      summary: Update action configuration
      description: Update action config for a municipality/namespace
      operationId: updateActionConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Action config id
        required: true
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Config"
        required: true
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Configuration for namespace
      summary: Delete action configuration
      description: Delete action config for a municipality/namespace
      operationId: deleteActionConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Action config id
        required: true
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/labels:
    get:
      tags:
      - Metadata for labels
      summary: Get label structure
      description: Get label structure for provided namespace and municipality
      operationId: getLabels
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Labels"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    put:
      tags:
      - Metadata for labels
      summary: Update label structure
      description: Update label structure for provided namespace and municipality
      operationId: updateLabels
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/Label"
        required: true
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Metadata for labels
      summary: Create label structure
      description: Create label structure for provided namespace and municipality
      operationId: createLabels
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/Label"
        required: true
      responses:
        "202":
          description: Successful operation
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Metadata for labels
      summary: Delete label structure
      description: Delete label structure for provided namespace and municipality
      operationId: deleteLabels
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/messageexchange-integration-config:
    get:
      tags:
      - Configuration for message exchange integration
      summary: Read message exchange integration config
      description: Fetches message exchange integration config for a municipality/namespace
      operationId: readMessageExchangeIntegrationConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageExchangeIntegration"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    put:
      tags:
      - Configuration for message exchange integration
      summary: Update message exchange integration config
      description: Update message exchange integration config used for status-change-on-incoming-message
        behaviour
      operationId: updateMessageExchangeIntegrationConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageExchangeIntegration"
        required: true
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Configuration for message exchange integration
      summary: Create message exchange integration config
      description: Create message exchange integration config used for status-change-on-incoming-message
        behaviour
      operationId: createMessageExchangeIntegrationConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageExchangeIntegration"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Configuration for message exchange integration
      summary: Delete message exchange integration config
      description: Deletes the message exchange integration config for a municipality/namespace
      operationId: deleteMessageExchangeIntegrationConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/notifications/global-acknowledged:
    put:
      tags:
      - User notifications
      summary: Global acknowledge notifications
      description: Set the globalAcknowledged-attribute to 'true' for all notifications
        on the errand
      operationId: globalAcknowledgeNotification
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/json-parameters:
    get:
      tags:
      - Errand JSON Parameters
      summary: Read all JSON parameters
      description: Fetches all JSON parameters for the provided errand id
      operationId: readJsonParameters
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/JsonParameter"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/json-parameters/{key}:
    get:
      tags:
      - Errand JSON Parameters
      summary: Read JSON parameter
      description: Fetches the JSON parameter matching the provided errand id and
        key
      operationId: readJsonParameter
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: key
        in: path
        description: JSON parameter key
        required: true
        schema:
          type: string
          minLength: 1
        example: formData
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JsonParameter"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    put:
      tags:
      - Errand JSON Parameters
      summary: Create or update JSON parameter
      description: Creates or updates the JSON parameter matching the provided errand
        id and key
      operationId: updateJsonParameter
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: key
        in: path
        description: JSON parameter key
        required: true
        schema:
          type: string
          minLength: 1
        example: formData
      - name: If-Match
        in: header
        description: Optional ETag of the JSON parameter for optimistic locking —
          omit to skip version check
        required: false
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/JsonParameter"
        required: true
      responses:
        "200":
          description: Successful Operation — parameter updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JsonParameter"
        "201":
          description: Created — parameter created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JsonParameter"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "409":
          description: Conflict — resource modified concurrently
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "412":
          description: Precondition Failed — If-Match version mismatch
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Errand JSON Parameters
      summary: Delete JSON parameter
      description: Deletes the JSON parameter matching the provided errand id and
        key
      operationId: deleteJsonParameter
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: key
        in: path
        description: JSON parameter key
        required: true
        schema:
          type: string
          minLength: 1
        example: formData
      - name: If-Match
        in: header
        description: Optional ETag of the JSON parameter for optimistic locking —
          omit to skip version check
        required: false
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "409":
          description: Conflict — resource modified concurrently
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "412":
          description: Precondition Failed — If-Match version mismatch
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/{communicationId}/viewed/{isViewed}:
    put:
      tags:
      - Errand communication
      description: Set viewed status for communication.
      operationId: updateViewedStatus
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: communicationId
        in: path
        description: communication ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: isViewed
        in: path
        description: If a message is viewed
        required: true
        schema:
          type: string
        example: true
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: No content - Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/email-integration-config:
    get:
      tags:
      - Configuration for email integration
      summary: Read email integration config
      description: Fetches email integration config for a municipality/namespace
      operationId: readEmailIntegrationConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmailIntegration"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    put:
      tags:
      - Configuration for email integration
      summary: Update email integration config
      description: Update email integration config that fetches emails from email-reader
        service
      operationId: updateEmailIntegrationConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmailIntegration"
        required: true
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Configuration for email integration
      summary: Create email integration config
      description: Create email integration config that fetches emails from email-reader
        service
      operationId: createEmailIntegrationConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmailIntegration"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Configuration for email integration
      summary: Delete email integration config
      description: Deletes the email integration config for a municipality/namespace
      operationId: deleteEmailIntegrationConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/message-exchange-sync-config/{id}:
    put:
      tags:
      - Configuration message-exchange sync
      summary: Update message-exchange sync config
      description: Update message-exchange sync config
      operationId: updateMessageExchangeSyncConfig
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Config id
        required: true
        schema:
          type: integer
          format: int64
        example: 1
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageExchangeSync"
        required: true
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Configuration message-exchange sync
      summary: Delete message-exchange sync config
      description: Deletes the message-exchange sync config
      operationId: deleteMessageExchangeSyncConfig
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Config id
        required: true
        schema:
          type: integer
          format: int64
        example: 1
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/subscribers:
    get:
      tags:
      - Subscribers
      summary: List subscribers
      description: List subscribers in the namespace. Optionally filter by identifier
        (both type and value must be provided together).
      operationId: getSubscribers
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: identifierType
        in: query
        description: Optional filter — identifier type (adAccount or partyId). Must
          be combined with identifierValue.
        required: false
        schema:
          type: string
      - name: identifierValue
        in: query
        description: Optional filter — identifier value. Must be combined with identifierType.
        required: false
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Subscriber"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Subscribers
      summary: Create subscriber
      description: Create a new subscriber in the namespace.
      operationId: createSubscriber
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Subscriber"
        required: true
      responses:
        "201":
          description: Created
          headers:
            Location:
              style: simple
              schema:
                type: string
        "409":
          description: Conflict — a subscriber with the same identifier and name already
            exists in the namespace
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/subscribers/{subscriberId}/subscriptions:
    get:
      tags:
      - Subscriptions
      summary: List subscriptions
      description: List all subscriptions owned by the given subscriber.
      operationId: getSubscriptions
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: subscriberId
        in: path
        description: Subscriber ID
        required: true
        schema:
          type: string
        example: 123e4567-e89b-12d3-a456-426614174000
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Subscription"
        "404":
          description: Subscriber not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Subscriptions
      summary: Create subscription
      description: "Create a new subscription for the given subscriber. The request\
        \ body's target field decides what is being subscribed to: an errand (target.type=ERRAND,\
        \ target.id=<errand UUID>) or the whole namespace (target.type=NAMESPACE).\
        \ Optionally include eventFilters to override the subscriber's global filters\
        \ for this subscription only."
      operationId: createSubscription
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: subscriberId
        in: path
        description: Subscriber ID
        required: true
        schema:
          type: string
        example: 123e4567-e89b-12d3-a456-426614174000
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Subscription"
        required: true
      responses:
        "201":
          description: Created
          headers:
            Location:
              style: simple
              schema:
                type: string
        "404":
          description: Subscriber not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "409":
          description: Conflict — an equivalent subscription already exists
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/namespace-config/action-config:
    get:
      tags:
      - Configuration for namespace
      summary: Read all action configurations
      description: Fetches action config for a municipality/namespace
      operationId: getActionConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Config"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Configuration for namespace
      summary: Create action configuration
      description: Create action config for a municipality/namespace
      operationId: createActionConfig
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Config"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/statuses:
    get:
      tags:
      - Metadata for statuses
      summary: Get statuses
      description: Get all statuses for the namespace and municipality
      operationId: getStatuses
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Status"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Metadata for statuses
      summary: Create status
      description: Create new status for the namespace and municipality
      operationId: createStatus
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Status"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/roles:
    get:
      tags:
      - Metadata for roles
      summary: Get roles
      description: Get all roles for the namespace and municipality
      operationId: getRoles
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Role"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Metadata for roles
      summary: Create role
      description: Create new role for the namespace and municipality
      operationId: createRole
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Role"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/phases:
    get:
      tags:
      - Metadata for phases
      summary: Get phases
      description: Get all phases for the namespace and municipality
      operationId: getPhases
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Phase"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Metadata for phases
      summary: Create phase
      description: Create new phase for the namespace and municipality
      operationId: createPhase
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Phase"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/phases/{phaseId}/transitions:
    get:
      tags:
      - Metadata for phases
      summary: Get phase transitions
      description: Get all transitions for the given phase
      operationId: getTransitions
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: phaseId
        in: path
        description: Phase ID
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PhaseTransition"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Metadata for phases
      summary: Create phase transition
      description: Create new phase transition for the given phase
      operationId: createTransition
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: phaseId
        in: path
        description: Phase ID
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PhaseTransition"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/external-id-types:
    get:
      tags:
      - Metadata for external ID types
      summary: Get externalIdTypes
      description: Get all externalIdTypes for the namespace and municipality
      operationId: getExternalIdTypes
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ExternalIdType"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Metadata for external ID types
      summary: Create externalIdType
      description: Create new externalIdType for the namespace and municipality
      operationId: createExternalIdType
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExternalIdType"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/contactreasons:
    get:
      tags:
      - Metadata for contact reasons
      summary: Get contact reasons for given namespace and municipalityId
      description: Get all contact reasons for the namespace and municipality
      operationId: getContactReasons
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ContactReason"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Metadata for contact reasons
      summary: Create contact reason
      description: Create new contact reason for the namespace and municipality
      operationId: createContactReason
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ContactReason"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/categories:
    get:
      tags:
      - Metadata for categories
      summary: Get categories and types
      description: Get all categories and their connected types for the namespace
        and municipality
      operationId: getCategories
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Category"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Metadata for categories
      summary: Create category
      description: Create new category for the namespace and municipality
      operationId: createCategory
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Category"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands:
    get:
      tags:
      - Errands
      summary: Read matching errands
      description: Query for errands with or without filters. The resource allows
        the client a wide range of variations on how to filter the result.
      operationId: findErrands
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: filter
        in: query
        description: "Syntax description: [spring-filter](https://github.com/turkraft/spring-filter/blob/85730f950a5f8623159cc0eb4d737555f9382bb7/README.md#syntax)"
        required: false
        schema:
          type: string
        example: categoryTag:'SUPPORT-CASE' and stakeholder.externalId:'81471222-5798-11e9-ae24-57fa13b361e1'
          and externalTags.key:'caseId' and externalTags.value:'111' and created>'2022-09-08T12:00:00.000+02:00'
      - name: page
        in: query
        description: Zero-based page index (0..N)
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
      - name: size
        in: query
        description: The size of the page to be returned
        required: false
        schema:
          type: integer
          default: 20
          minimum: 1
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PageErrand"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Errands
      summary: Create errand
      description: Creates a new errand based on the supplied attributes
      operationId: createErrand
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: referredFrom
        in: query
        description: "Relation reference in format (target part is ignored): '{relationType}|{sourceResourceId};{sourceType};{sourceService};{sourceNamespace}|{targetResourceId};{targetType};{targetService};{targetNamespace}'"
        required: false
        schema:
          type: string
        example: LINK|1234;case;service;MY_NAMESPACE|
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Errand"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/notifications:
    get:
      tags:
      - User notifications
      summary: Get notifications
      description: "Get all notifications for the namespace, municipality and errand"
      operationId: getNotificationsByErrandId
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          default:
          - "created,DESC"
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Notification"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - User notifications
      summary: Create notification
      description: Create new notification for the namespace and municipality
      operationId: createNotification
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Notification"
        required: true
      responses:
        "201":
          description: Created - Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "409":
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/notes:
    get:
      tags:
      - Errand notes
      summary: Find errand notes
      description: Find the errand notes that matches the provided attributes
      operationId: findErrandNotes
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: findErrandNotesRequest
        in: query
        required: true
        schema:
          $ref: "#/components/schemas/FindErrandNotesRequest"
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FindErrandNotesResponse"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Errand notes
      summary: Create errand note
      description: Creates a new errand note based on the supplied attributes
      operationId: createErrandNote
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateErrandNoteRequest"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/handover/preview:
    post:
      tags:
      - Handover
      summary: Preview errand handover
      description: "Builds a side-effect free preview describing how the errand would\
        \ be handed over to another namespace, including auto-suggested mappings for\
        \ namespace-bound fields"
      operationId: previewHandover
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/HandoverPreviewRequest"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HandoverPreview"
            application/problem+json:
              schema:
                $ref: "#/components/schemas/HandoverPreview"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "403":
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/handover/execute:
    post:
      tags:
      - Handover
      summary: Execute errand handover
      description: "Hands over an errand to another namespace. Copies the errand with\
        \ applied field mappings, optionally copies attachments, creates a HANDOVER\
        \ relation, and optionally closes or suspends the source errand."
      operationId: executeHandover
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/HandoverErrandRequest"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              description: Location of the newly created errand in the target namespace
              style: simple
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HandoverErrand"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "403":
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/webmessage:
    post:
      tags:
      - Errand communication
      summary: Send email to in context of an errand
      description: Sends an email message to the recipient specified in the request
      operationId: sendWebMessage
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebMessageRequest"
        required: true
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/sms:
    post:
      tags:
      - Errand communication
      summary: Send sms to in context of an errand
      description: Sends a sms message to the recipient specified in the request
      operationId: sendSms
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SmsRequest"
        required: true
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/email:
    post:
      tags:
      - Errand communication
      summary: Send email to in context of an errand
      description: Sends an email message to the recipient specified in the request
      operationId: sendEmail
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmailRequest"
        required: true
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/conversations:
    get:
      tags:
      - Errand communication
      summary: Get conversations
      description: Get existing conversations
      operationId: getConversations
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Conversation"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Errand communication
      summary: Create conversation
      description: Create new conversation
      operationId: createConversation
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ConversationRequest"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/conversations/{conversationId}/messages:
    get:
      tags:
      - Errand communication
      summary: Get message list
      description: Get conversation message list
      operationId: getConversationMessages
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: conversationId
        in: path
        description: Conversation ID
        required: true
        schema:
          type: string
        example: 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
      - name: page
        in: query
        description: Zero-based page index (0..N)
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
      - name: size
        in: query
        description: The size of the page to be returned
        required: false
        schema:
          type: integer
          default: 20
          minimum: 1
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PageMessage"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Errand communication
      summary: Create new message
      description: Create new conversation message
      operationId: createConversationMessage
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: conversationId
        in: path
        description: Conversation ID
        required: true
        schema:
          type: string
        example: 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                message:
                  $ref: "#/components/schemas/MessageRequest"
                  description: Message body
                attachments:
                  type: array
                  items:
                    type: string
                    format: binary
              required:
              - message
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/conversations/{conversationId}/messages/mark-as-read:
    post:
      tags:
      - Errand communication
      summary: Mark messages as read
      description: Marks the specified messages in a conversation as read
      operationId: markConversationMessagesAsRead
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: conversationId
        in: path
        description: Conversation ID
        required: true
        schema:
          type: string
        example: 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarkAsReadRequest"
        required: true
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/attachments:
    get:
      tags:
      - Errand attachments
      summary: Read errand attachments
      description: Fetches the errand attachments that matches the provided errand
        id
      operationId: readErrandAttachments
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ErrandAttachment"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Errand attachments
      summary: Create errand attachment
      description: Creates a new errand attachment based on the supplied attributes
      operationId: createErrandAttachment
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                errandAttachment:
                  type: string
                  format: binary
                channel:
                  type: string
                  description: Channel the attachment was received via
              required:
              - errandAttachment
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/message-exchange-sync-config:
    get:
      tags:
      - Configuration message-exchange sync
      summary: Read message-exchange sync configs
      description: Fetches message-exchange config for a municipality
      operationId: getAllMessageExchangeByMunicipalityId
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MessageExchangeSync"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    post:
      tags:
      - Configuration message-exchange sync
      summary: Create message-exchange sync config
      description: Create message-exchange sync config that conversations from message-exchange
        service
      operationId: createMessageExchangeSyncConfig
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageExchangeSync"
        required: true
      responses:
        "201":
          description: Successful operation
          headers:
            Location:
              style: simple
              schema:
                type: string
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/subscribers/{subscriberId}:
    get:
      tags:
      - Subscribers
      summary: Get subscriber
      description: Fetch a single subscriber by id.
      operationId: getSubscriber
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: subscriberId
        in: path
        description: Subscriber ID
        required: true
        schema:
          type: string
        example: 123e4567-e89b-12d3-a456-426614174000
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscriber"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Subscribers
      summary: Delete subscriber
      description: Delete a subscriber. All subscriptions owned by the subscriber
        are also removed.
      operationId: deleteSubscriber
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: subscriberId
        in: path
        description: Subscriber ID
        required: true
        schema:
          type: string
        example: 123e4567-e89b-12d3-a456-426614174000
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Subscribers
      summary: Update subscriber
      description: "Partially update an existing subscriber. Only non-null fields\
        \ in the request body are applied. Use this endpoint to change channels, event\
        \ filters, name, or to set/clear the pause window. Identifier is immutable\
        \ — to change it, delete and recreate."
      operationId: updateSubscriber
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: subscriberId
        in: path
        description: Subscriber ID
        required: true
        schema:
          type: string
        example: 123e4567-e89b-12d3-a456-426614174000
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Subscriber"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscriber"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/notifications:
    get:
      tags:
      - User notifications
      summary: Get notifications
      description: Get notifications for the namespace and municipality with the specified
        ownerId
      operationId: getNotificationsByOwnerId
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: ownerId
        in: query
        description: owner ID
        required: true
        schema:
          type: string
        example: 12
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          default:
          - "created,DESC"
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Notification"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - User notifications
      summary: Update notification
      description: Update notifications for the namespace and municipality
      operationId: updateNotifications
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/Notification"
        required: true
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/statuses/{id}:
    get:
      tags:
      - Metadata for statuses
      summary: Get status
      description: "Get status matching namespace, municipality and id"
      operationId: getStatus
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Status id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Status"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Metadata for statuses
      summary: Delete status
      description: "Delete status matching namespace, municipality and id"
      operationId: deleteStatus
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Status id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Metadata for statuses
      summary: Update status
      description: "Update status matching namespace, municipality and id"
      operationId: updateStatus
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Status id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Status"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Status"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/roles/{id}:
    get:
      tags:
      - Metadata for roles
      summary: Get role
      description: "Get role matching namespace, municipality and id"
      operationId: getRole
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Role id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Role"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Metadata for roles
      summary: Delete role
      description: "Delete role matching namespace, municipality and id"
      operationId: deleteRole
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Role id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Metadata for roles
      summary: Update role
      description: "Update role matching namespace, municipality and id"
      operationId: updateRole
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Role id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Role"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Role"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/phases/{phaseId}:
    get:
      tags:
      - Metadata for phases
      summary: Get phase
      description: "Get phase by id, namespace and municipality"
      operationId: getPhase
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: phaseId
        in: path
        description: Phase ID
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Phase"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Metadata for phases
      summary: Delete phase
      description: "Delete phase matching namespace, municipality and id"
      operationId: deletePhase
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: phaseId
        in: path
        description: Phase ID
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Metadata for phases
      summary: Update phase
      description: "Update phase matching namespace, municipality and id"
      operationId: updatePhase
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: phaseId
        in: path
        description: Phase ID
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Phase"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Phase"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/external-id-types/{id}:
    get:
      tags:
      - Metadata for external ID types
      summary: Get externalIdType
      description: "Get externalIdType matching namespace, municipality and id"
      operationId: getExternalIdType
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: ExternalIdType id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExternalIdType"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Metadata for external ID types
      summary: Delete externalIdType
      description: "Delete externalIdType matching namespace, municipality and id"
      operationId: deleteExternalIdType
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: ExternalIdType id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Metadata for external ID types
      summary: Update externalIdType
      description: "Update externalIdType matching namespace, municipality and id"
      operationId: updateExternalIdType
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: ExternalIdType id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExternalIdType"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExternalIdType"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/contactreasons/{contactReasonId}:
    get:
      tags:
      - Metadata for contact reasons
      summary: Get contact reason
      description: "Get contact reason by reason, namespace and municipality"
      operationId: getContactReason
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: contactReasonId
        in: path
        description: ContactReason ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContactReason"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Metadata for contact reasons
      summary: Delete contact reason
      description: "Delete contact reason matching namespace, municipality and reason"
      operationId: deleteContactReason
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: contactReasonId
        in: path
        description: ContactReason ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Metadata for contact reasons
      summary: Update contact reason
      description: "Update contact reason matching namespace, municipality and reason"
      operationId: updateContactReason
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: contactReasonId
        in: path
        description: ContactReason ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ContactReason"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContactReason"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/categories/{id}:
    get:
      tags:
      - Metadata for categories
      summary: Get category
      description: Get category and connected types for the namespace and municipality
      operationId: getCategory
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Category id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Category"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Metadata for categories
      summary: Delete category
      description: "Delete category matching namespace, municipality and id"
      operationId: deleteCategory
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Category id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Metadata for categories
      summary: Update category
      description: "Update category matching namespace, municipality and id"
      operationId: updateCategory
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Category id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Category"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Category"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}:
    get:
      tags:
      - Errands
      summary: Read errand
      description: Fetches the errand that matches the provided id
      operationId: readErrand
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Errand"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Errands
      summary: Delete errand
      description: Deletes the errand that matches the provided id
      operationId: deleteErrand
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: If-Match
        in: header
        description: Optional ETag for optimistic locking — omit to skip version check
        required: false
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "409":
          description: Conflict — resource modified concurrently
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "412":
          description: Precondition Failed — If-Match version mismatch
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Errands
      summary: Update errand
      description: Updates the errand matching provided id with the supplied attributes
      operationId: updateErrand
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: If-Match
        in: header
        description: Optional ETag for optimistic locking — omit to skip version check
        required: false
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Errand"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Errand"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "409":
          description: Conflict — resource modified concurrently
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "412":
          description: Precondition Failed — If-Match version mismatch
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/parameters:
    get:
      tags:
      - Errand Parameters
      summary: Find errand parameters
      description: Find the errand parameters that matches the provided attributes
      operationId: findErrandParameters
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Parameter"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Errand Parameters
      summary: Update errand parameters
      description: Creates a new errand parameter based on the supplied attributes
      operationId: updateErrandParameters
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: If-Match
        in: header
        description: Optional ETag of the errand for optimistic locking — omit to
          skip version check
        required: false
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/Parameter"
        required: true
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Parameter"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "409":
          description: Conflict — resource modified concurrently
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "412":
          description: Precondition Failed — If-Match version mismatch
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/parameters/{parameterKey}:
    get:
      tags:
      - Errand Parameters
      summary: Read errand parameter
      description: Fetches the errand parameter that matches the provided errand id
        and parameter id
      operationId: readErrandParameter
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: parameterKey
        in: path
        description: Errand parameter key
        required: true
        schema:
          type: string
          minLength: 1
        example: propertyInfo
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Parameter"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Errand Parameters
      summary: Delete errand parameter
      description: Deletes the errand parameter that matches the provided errand id
        and parameter id
      operationId: deleteErrandParameter
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: parameterKey
        in: path
        description: Errand parameter key
        required: true
        schema:
          type: string
          minLength: 1
        example: propertyInfo
      - name: If-Match
        in: header
        description: Optional ETag of the parameter for optimistic locking — omit
          to skip version check
        required: false
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "409":
          description: Conflict — resource modified concurrently
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "412":
          description: Precondition Failed — If-Match version mismatch
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Errand Parameters
      summary: Update errand parameter
      description: Updates the errand parameter matching provided errand id and parameter
        id with the supplied attributes
      operationId: updateErrandParameter
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: parameterKey
        in: path
        description: Errand parameter key
        required: true
        schema:
          type: string
          minLength: 1
        example: propertyInfo
      - name: If-Match
        in: header
        description: Optional ETag of the parameter for optimistic locking — omit
          to skip version check
        required: false
        schema:
          type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
        required: true
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Parameter"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "409":
          description: Conflict — resource modified concurrently
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "412":
          description: Precondition Failed — If-Match version mismatch
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/notes/{noteId}:
    get:
      tags:
      - Errand notes
      summary: Read errand note
      description: Fetches the errand note that matches the provided errand id and
        note id
      operationId: readErrandNote
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: noteId
        in: path
        description: Errand note id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrandNote"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Errand notes
      summary: Delete errand note
      description: Deletes the errand note that matches the provided errand id and
        note id
      operationId: deleteErrandNote
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: noteId
        in: path
        description: Errand note id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Errand notes
      summary: Update errand note
      description: Updates the errand note matching provided errand id and note id
        with the supplied attributes
      operationId: updateErrandNote
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: noteId
        in: path
        description: Errand note id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateErrandNoteRequest"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrandNote"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/conversations/{conversationId}:
    get:
      tags:
      - Errand communication
      summary: Get conversation
      description: Get existing conversation
      operationId: getConversation
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: conversationId
        in: path
        description: Conversation ID
        required: true
        schema:
          type: string
        example: 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Conversation"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    patch:
      tags:
      - Errand communication
      summary: Update conversation
      description: Update existing conversation
      operationId: updateConversation
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: conversationId
        in: path
        description: Conversation ID
        required: true
        schema:
          type: string
        example: 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ConversationRequest"
        required: true
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Conversation"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/notifications/{identifierType}/{identifierValue}:
    get:
      tags:
      - Subscriber notifications
      summary: Get subscriber notifications
      description: Get all notifications for a subscriber in the namespace and municipality
      operationId: getNotifications
      parameters:
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: identifierType
        in: path
        description: Identifier type
        required: true
        schema:
          type: string
        example: adAccount
      - name: identifierValue
        in: path
        description: Identifier value
        required: true
        schema:
          type: string
        example: joe01doe
      - name: page
        in: query
        description: Zero-based page index (0..N)
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
      - name: size
        in: query
        description: The size of the page to be returned
        required: false
        schema:
          type: integer
          default: 10
          minimum: 1
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          default:
          - "created,DESC"
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PageSubscriberNotification"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/namespace-config/action-definition:
    get:
      tags:
      - Configuration for namespace
      summary: Read all action definitions
      description: Fetches all available action definitions
      operationId: getActionDefinitions
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ActionDefinition"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata:
    get:
      tags:
      - Metadata
      summary: Get all metadata
      description: Get all metadata for provided namespace and municipality
      operationId: getAll
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MetadataResponse"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/categories/{id}/types:
    get:
      tags:
      - Metadata for categories
      summary: Get types connected to category
      description: "Get all types for the namespace, municipality and category"
      operationId: getCategoryTypes
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: id
        in: path
        description: Category id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Type"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/time-measure:
    get:
      tags:
      - Time measures
      summary: Get errand time measures
      description: Get time measures for an errand
      operationId: getErrandTimeMeasure
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json: {}
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/revisions:
    get:
      tags:
      - Revisions
      summary: Read errand revisions
      description: Returns all existing revisions for the errand that matches the
        provided id
      operationId: getErrandRevisions
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Revision"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/revisions/difference:
    get:
      tags:
      - Revisions
      summary: Compare differences between two revision versions of an errand
      description: Returns the differences between the source and target revision
        for the provided errand id
      operationId: getErrandDiffByVersions
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: source
        in: query
        description: Source version to compare
        required: true
        schema:
          type: integer
          format: int32
          maximum: 2147483647
          minimum: 0
        example: 0
      - name: target
        in: query
        description: Target version to compare
        required: true
        schema:
          type: integer
          format: int32
          maximum: 2147483647
          minimum: 0
        example: 1
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DifferenceResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/notifications/{notificationId}:
    get:
      tags:
      - User notifications
      summary: Get notifications
      description: Get a specific notification for the namespace and municipality
      operationId: getNotification
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: notificationId
        in: path
        description: notification ID
        required: true
        schema:
          type: string
        example: 74540a24-70e1-4e82-90f7-7d8ad4666cdc
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Notification"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - User notifications
      summary: Delete notification
      description: Delete notification for the namespace and municipality
      operationId: deleteNotification
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: notificationId
        in: path
        description: Notification ID
        required: true
        schema:
          type: string
        example: 74540a24-70e1-4e82-90f7-7d8ad4666cdc
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/notes/{noteId}/revisions:
    get:
      tags:
      - Revisions
      summary: Read note revisions
      description: Returns all existing revisions for the errand note that matches
        the provided errand id and note id
      operationId: getErrandNoteRevisions
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: noteId
        in: path
        description: Errand note id
        required: true
        schema:
          type: string
        example: 22a57c09-47ca-45bf-ab02-819011c6fd8d
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Revision"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/notes/{noteId}/revisions/difference:
    get:
      tags:
      - Revisions
      summary: Compare differences between two revision versions of an errand note
      description: Returns the differences between the source and target revision
        for the provided errand id and note id
      operationId: getErrandNoteDiffByVersions
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: noteId
        in: path
        description: Errand note id
        required: true
        schema:
          type: string
        example: 22a57c09-47ca-45bf-ab02-819011c6fd8d
      - name: source
        in: query
        description: Source version to compare
        required: true
        schema:
          type: integer
          format: int32
          maximum: 2147483647
          minimum: 0
        example: 0
      - name: target
        in: query
        description: Target version to compare
        required: true
        schema:
          type: integer
          format: int32
          maximum: 2147483647
          minimum: 0
        example: 1
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DifferenceResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/events:
    get:
      tags:
      - Errand events
      summary: Read errand events
      description: Returns all existing events for the errand that matches the provided
        id
      operationId: getErrandEvents
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: page
        in: query
        description: Zero-based page index (0..N)
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
      - name: size
        in: query
        description: The size of the page to be returned
        required: false
        schema:
          type: integer
          default: 20
          minimum: 1
      - name: sort
        in: query
        description: "Sorting criteria in the format: property,(asc|desc). Default\
          \ sort order is ascending. Multiple sort criteria are supported."
        required: false
        schema:
          type: array
          items:
            type: string
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PageEvent"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication:
    get:
      tags:
      - Errand communication
      description: Get all communications for an errand.
      operationId: getCommunications
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: OK - Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Communication"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/{communicationId}/attachments/{attachmentId}:
    get:
      tags:
      - Errand communication
      summary: Get a streamed communication attachment.
      description: "Fetches the communication attachment that matches the provided\
        \ ID, in a streamed manner"
      operationId: getMessageAttachment
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: communicationId
        in: path
        description: communication ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: attachmentId
        in: path
        description: Message attachment ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "507":
          description: Insufficient Storage
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/external:
    get:
      tags:
      - Errand communication
      description: Get all external communications for an errand.
      operationId: getExternalCommunications
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: OK - Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Communication"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  ? /{municipalityId}/{namespace}/errands/{errandId}/communication/conversations/{conversationId}/messages/{messageId}/attachments/{attachmentId}
  : get:
      tags:
      - Errand communication
      summary: Get a streamed conversation message attachment.
      description: "Fetches the conversation message attachment that matches the provided\
        \ ID, in a streamed manner"
      operationId: getConversationMessageAttachment
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: conversationId
        in: path
        description: Conversation ID
        required: true
        schema:
          type: string
        example: 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
      - name: messageId
        in: path
        description: Message ID
        required: true
        schema:
          type: string
        example: be3a5c7b-0f39-4867-8065-6a286b36fcc3
      - name: attachmentId
        in: path
        description: Conversation message attachment ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "507":
          description: Insufficient Storage
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/communication/conversations/count-read-by:
    get:
      tags:
      - Errand communication
      summary: Get read-by count statistics
      description: Returns read-by count statistics aggregated per conversation for
        the errand
      operationId: getConversationCountReadBy
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand ID
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: includeSystemMessages
        in: query
        description: Whether to include system messages in the count
        required: false
        schema:
          type: boolean
          default: false
      - name: conversationId
        in: query
        description: Optional conversation ID filter
        required: false
        schema:
          type: string
        example: 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ConversationReadByCount"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/{errandId}/attachments/{attachmentId}:
    get:
      tags:
      - Errand attachments
      summary: Read errand attachment
      description: Fetches the errand attachment that matches the provided errand
        id and attachment id
      operationId: readErrandAttachment
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: attachmentId
        in: path
        description: Errand attachment id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
    delete:
      tags:
      - Errand attachments
      summary: Delete errand attachment
      description: Deletes the errand attachment that matches the provided errand
        id and attachment id
      operationId: deleteErrandAttachment
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: errandId
        in: path
        description: Errand id
        required: true
        schema:
          type: string
        example: b82bd8ac-1507-4d9a-958d-369261eecc15
      - name: attachmentId
        in: path
        description: Errand attachment id
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/errands/count:
    get:
      tags:
      - Errands
      summary: Count errands
      description: Counts errands based on the provided filters
      operationId: countErrands
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: filter
        in: query
        description: "Syntax description: [spring-filter](https://github.com/turkraft/spring-filter/blob/85730f950a5f8623159cc0eb4d737555f9382bb7/README.md#syntax)"
        required: false
        schema:
          type: string
        example: categoryTag:'SUPPORT-CASE' and stakeholder.externalId:'81471222-5798-11e9-ae24-57fa13b361e1'
          and externalTags.key:'caseId' and externalTags.value:'111' and created>'2022-09-08T12:00:00.000+02:00'
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CountResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /namespace-configs:
    get:
      tags:
      - Configuration for namespace
      summary: "Read all namespace configurations, optionally filtered by municipalityId"
      description: Fetches an optionally filtered list of namespace configurations
      operationId: readAllNamespaceConfigs
      parameters:
      - name: municipalityId
        in: query
        description: Municipality id
        required: false
        schema:
          type: string
        example: 2281
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/NamespaceConfig"
        "400":
          description: Bad Request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /api-docs:
    get:
      tags:
      - API
      summary: OpenAPI
      operationId: getApiDocs
      parameters:
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "200":
          description: OK
          content:
            application/yaml:
              schema:
                type: string
      x-auth-type: None
      x-throttling-tier: Unlimited
      x-wso2-mutual-ssl: Optional
  /{municipalityId}/{namespace}/subscribers/{subscriberId}/subscriptions/{subscriptionId}:
    delete:
      tags:
      - Subscriptions
      summary: Delete subscription
      description: Delete a subscription owned by the given subscriber.
      operationId: deleteSubscription
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: subscriberId
        in: path
        description: Subscriber ID
        required: true
        schema:
          type: string
        example: 123e4567-e89b-12d3-a456-426614174000
      - name: subscriptionId
        in: path
        description: Subscription ID
        required: true
        schema:
          type: string
        example: 123e4567-e89b-12d3-a456-426614174000
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/notifications/{notificationId}:
    delete:
      tags:
      - Subscriber notifications
      summary: Delete subscriber notification
      description: Delete a subscriber notification
      operationId: deleteNotification_1
      parameters:
      - name: municipalityId
        in: path
        description: Municipality ID
        required: true
        schema:
          type: string
        example: 2281
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: notificationId
        in: path
        description: Notification ID
        required: true
        schema:
          type: string
        example: 74540a24-70e1-4e82-90f7-7d8ad4666cdc
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/{namespace}/metadata/phases/{phaseId}/transitions/{transitionId}:
    delete:
      tags:
      - Metadata for phases
      summary: Delete phase transition
      description: Delete phase transition by id
      operationId: deleteTransition
      parameters:
      - name: namespace
        in: path
        description: Namespace
        required: true
        schema:
          type: string
          pattern: "[\\w|\\-]+"
        example: MY_NAMESPACE
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: phaseId
        in: path
        description: Phase ID
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: transitionId
        in: path
        description: Transition ID
        required: true
        schema:
          type: string
        example: 5f79a808-0ef3-4985-99b9-b12f23e202a7
      - name: X-Request-Group-Id
        in: header
        description: "Optional UUID that groups related events and notifications for\
          \ this operation. If omitted, no grouping is applied."
        required: false
        schema:
          type: string
          format: uuid
        example: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        "204":
          description: Successful operation
        "404":
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
components:
  schemas:
    Problem:
      type: object
      properties:
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
          format: uri
        type:
          type: string
          format: uri
        status:
          type: integer
          format: int32
    ConstraintViolationProblem:
      type: object
      properties:
        type:
          type: string
          format: uri
        status:
          type: integer
          format: int32
        violations:
          type: array
          items:
            $ref: "#/components/schemas/Violation"
        title:
          type: string
        detail:
          type: string
        causeAsProblem:
          $ref: "#/components/schemas/ThrowableProblem"
        instance:
          type: string
          format: uri
    ThrowableProblem:
      type: object
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
          format: int32
        detail:
          type: string
        instance:
          type: string
          format: uri
        causeAsProblem: {}
    Violation:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
    NamespaceConfig:
      type: object
      description: Namespace configuration model
      properties:
        namespace:
          type: string
          description: Namespace
          examples:
          - CONTACTCENTER
          readOnly: true
        municipalityId:
          type: string
          description: Municipality connected to the namespace
          examples:
          - "2281"
          readOnly: true
        displayName:
          type: string
          description: Display name for the namespace
          examples:
          - Kontaktcenter
        shortCode:
          type: string
          description: Prefix for errand numbers in this namespace
          examples:
          - KC
        notificationTTLInDays:
          type: integer
          format: int32
          description: Time to live (in days) for notifications created in this namespace
          examples:
          - 40
        created:
          type: string
          format: date-time
          description: Timestamp when the configuration was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the configuration was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        accessControl:
          type: boolean
          description: If set to true access control will be enabled. If no value
            is set it defaults to false.
          examples:
          - "true"
        notifyReporter:
          type: boolean
          description: If set to true notification will be sent to the stakeholder
            when stakeholder with reporter role recieves an internal message. If no
            value is set it defaults to false.
          examples:
          - "true"
      required:
      - displayName
      - shortCode
    ActionParameter:
      type: object
      description: Errand action parameter model
      properties:
        key:
          type: string
          description: Parameter key
          minLength: 1
        values:
          type: array
          description: Parameter values. Each value can have a maximum length of 2000
            characters
          items:
            type: string
            maxLength: 2000
            minLength: 0
      required:
      - key
    Config:
      type: object
      description: Errand action config model
      properties:
        id:
          type: string
          description: Unique id for action config
          examples:
          - a337d0de-5a6d-4952-9f39-74800b254c21
          readOnly: true
        name:
          type: string
          description: Name of the type of action. Must match an existing action definition
          examples:
          - ADD_LABEL
          minLength: 1
        active:
          type: boolean
          default: false
          description: "If set to true, action will be active"
          examples:
          - "true"
        conditions:
          type: array
          description: Conditions for when the action should be added to errand. Parameters
            must match action definition.
          items:
            $ref: "#/components/schemas/ActionParameter"
          minItems: 1
        parameters:
          type: array
          description: Parameters for action. Must match action definition.
          items:
            $ref: "#/components/schemas/ActionParameter"
          minItems: 1
        displayValue:
          type: string
          description: Display value for this action. Will be mapped to each action
            on errands
          examples:
          - Classification change will occur
      required:
      - conditions
      - name
      - parameters
    Label:
      type: object
      description: Label model
      properties:
        id:
          type: string
          description: Label ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
        classification:
          type: string
          description: Label classification
          examples:
          - subtype
          minLength: 1
        displayName:
          type: string
          description: Display name for the label
          examples:
          - Nyckelkort
        resourcePath:
          type: string
          description: Resource path
          examples:
          - /parent/child/keycard
          readOnly: true
        resourceName:
          type: string
          description: Resource name
          examples:
          - keycard
          minLength: 1
          pattern: "[A-Z0-9_]+"
        deprecated:
          type: boolean
          default: false
          description: Indicates if the label is deprecated
          examples:
          - "true"
        labels:
          type: array
          items:
            $ref: "#/components/schemas/Label"
        attributes:
          type: array
          description: "Free-form key/value data owned by the client. Stored and returned\
            \ as-is by the service, which does not interpret the contents (apart from\
            \ rejecting duplicate keys per label). Keys are conventions agreed between\
            \ clients (e.g. 'escalationEmail')."
          items:
            $ref: "#/components/schemas/LabelAttribute"
      required:
      - classification
      - resourceName
    LabelAttribute:
      type: object
      description: Label attribute model. Free-form key/value data owned by the client;
        not interpreted by the service. Keys are conventions agreed between clients
        (e.g. 'escalationEmail').
      properties:
        key:
          type: string
          description: Attribute key
          examples:
          - escalationEmail
          minLength: 1
        value:
          type: string
          description: Attribute value
          examples:
          - escalation@example.com
          minLength: 1
      required:
      - key
      - value
    MessageExchangeIntegration:
      type: object
      description: Message exchange worker config model
      properties:
        triggerStatusChangeOn:
          type:
          - string
          - "null"
          description: Status on errand that will trigger a status change when a new
            incoming message refers to an existing errand
          examples:
          - SOLVED
        statusChangeTo:
          type:
          - string
          - "null"
          description: Status that will be set on errand if status change is triggered.
            Can only be null if 'triggerStatusChangeOn' is null.
          examples:
          - OPEN
        created:
          type: string
          format: date-time
          description: Timestamp when the configuration was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the configuration was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
    JsonNode:
      type: object
      properties:
        container:
          type: boolean
        number:
          type: boolean
        floatingPointNumber:
          type: boolean
        nodeType:
          type: string
          enum:
          - ARRAY
          - BINARY
          - BOOLEAN
          - MISSING
          - "NULL"
          - NUMBER
          - OBJECT
          - POJO
          - STRING
        string:
          type: boolean
        integralNumber:
          type: boolean
        missingNode:
          type: boolean
        valueNode:
          type: boolean
        pojo:
          type: boolean
        short:
          type: boolean
        int:
          type: boolean
        long:
          type: boolean
        double:
          type: boolean
        bigDecimal:
          type: boolean
        bigInteger:
          type: boolean
        textual:
          type: boolean
          deprecated: true
        boolean:
          type: boolean
        binary:
          type: boolean
        empty:
          type: boolean
        array:
          type: boolean
        "null":
          type: boolean
        object:
          type: boolean
        float:
          type: boolean
        embeddedValue:
          type: boolean
    JsonParameter:
      type: object
      description: JSON Parameter model
      properties:
        key:
          type: string
          description: Parameter key/name
          examples:
          - formData1
          minLength: 1
        value:
          $ref: "#/components/schemas/JsonNode"
          description: JSON structure value
          example:
            firstName: Joe
            lastName: Doe
        schemaId:
          type: string
          description: ID referencing a schema in the json-schema service
          examples:
          - 2281_person_1.0
          minLength: 1
        version:
          type: integer
          format: int64
          description: Optimistic locking version of the JSON parameter
          readOnly: true
      required:
      - key
      - schemaId
      - value
    EmailIntegration:
      type: object
      description: Email integration config model
      properties:
        enabled:
          type: boolean
          description: If set to true emails will be fetched
        errandClosedEmailSender:
          type:
          - string
          - "null"
          description: Email sender if incoming mail is rejected
          examples:
          - noreply@sundsvall.se
        errandClosedEmailTemplate:
          type:
          - string
          - "null"
          description: Message that will be sent when incoming mail is rejected
          examples:
          - Errand is closed. Please open a new errand.
        errandClosedEmailHTMLTemplate:
          type:
          - string
          - "null"
          description: HTML template for email that will be sent when incoming mail
            is rejected
          examples:
          - <html><body>Errand is closed. Please open a new errand.</body></html>
        errandNewEmailSender:
          type:
          - string
          - "null"
          description: Email sender if incoming mail results in new errand
          examples:
          - test@sundsvall.se
        errandNewEmailTemplate:
          type:
          - string
          - "null"
          description: Message that will be sent when new errand is created
          examples:
          - New errand is created.
        errandNewEmailHTMLTemplate:
          type:
          - string
          - "null"
          description: HTML template for email that will be sent when incoming mail
            results in new errand
          examples:
          - <html><body>New errand is created.</body></html>
        daysOfInactivityBeforeReject:
          type:
          - string
          - "null"
          format: int32
          description: Number of days before incoming mail is rejected. Measured from
            when the errand was last touched. Rejection can only occur if status on
            errand equals 'inactiveStatus'.
          examples:
          - "5"
        statusForNew:
          type: string
          description: Status set on errand when email results in a new errand
          examples:
          - NEW
        triggerStatusChangeOn:
          type:
          - string
          - "null"
          description: Status on errand that will trigger a status change when email
            refers to an existing errand
          examples:
          - SOLVED
        statusChangeTo:
          type:
          - string
          - "null"
          description: Status that will be set on errand if status change is triggered.
            Can only be null if 'triggerStatusChangeOn' is null.
          examples:
          - OPEN
        inactiveStatus:
          type:
          - string
          - "null"
          description: "Status of an inactive errand. This value relates to property\
            \ 'daysOfInactivityBeforeReject'. If set to null, no rejection mail will\
            \ be sent"
          examples:
          - SOLVED
        addSenderAsStakeholder:
          type:
          - string
          - "null"
          description: If true sender is added as stakeholder
          examples:
          - "false"
        stakeholderRole:
          type:
          - string
          - "null"
          description: Role set on stakeholder.
          examples:
          - APPLICANT
        errandChannel:
          type:
          - string
          - "null"
          description: Channel set on created errands
          examples:
          - EMAIL
        ignoreAutoReply:
          type: boolean
          description: "If true, auto-reply emails (with Auto-Submitted header) will\
            \ be ignored and not processed, except for delivery-status reports"
          examples:
          - "true"
        ignoreNoReply:
          type: boolean
          description: "If true, no confirmation email will be sent to no-reply addresses"
          examples:
          - "true"
        created:
          type: string
          format: date-time
          description: Timestamp when the configuration was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the configuration was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
      required:
      - enabled
      - ignoreAutoReply
      - ignoreNoReply
      - statusForNew
    MessageExchangeSync:
      type: object
      description: Message-Exchange sync configuration
      properties:
        id:
          type: integer
          format: int64
          description: Unique id
          examples:
          - 1
          readOnly: true
        namespace:
          type: string
          description: Message exchange namespace to search in. Does not map to supporManagement
            namespace.
          examples:
          - support
        latestSyncedSequenceNumber:
          type: integer
          format: int64
          description: Latest synced sequence number
          examples:
          - 333
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the configuration was last modified
          examples:
          - 2024-12-24T01:30:00.000+02:00
          readOnly: true
        active:
          type: boolean
          description: If set to true conversations will be synced
      required:
      - active
    EventFilter:
      type: object
      description: "Filter on event type/subtype, used to limit which eventlog events\
        \ trigger a notification"
      properties:
        type:
          type: string
          description: Event type. Matches the eventlog EventType enum.
          enum:
          - CREATE
          - READ
          - UPDATE
          - DELETE
          - ACCESS
          - EXECUTE
          - CANCEL
          - DROP
          examples:
          - UPDATE
          minLength: 1
          pattern: ^(CREATE|READ|UPDATE|DELETE|ACCESS|EXECUTE|CANCEL|DROP)$
        subtype:
          type: string
          description: "Event subtype. If null, all subtypes of the given type match."
          examples:
          - ATTACHMENT
          maxLength: 64
          minLength: 0
      required:
      - type
    Identifier:
      type: object
      description: Identifier describing a user or subject (AD-account or party-id)
      properties:
        type:
          type: string
          description: Identifier type
          enum:
          - adAccount
          - partyId
          examples:
          - adAccount
          - partyId
          minLength: 1
          pattern: ^(adAccount|partyId)$
        value:
          type: string
          description: Identifier value (AD-account name or partyId UUID)
          examples:
          - joe01doe
          maxLength: 255
          minLength: 0
      required:
      - type
      - value
    NotificationChannel:
      type: object
      description: Channel a subscriber wants to receive notifications on
      properties:
        type:
          type: string
          description: Channel type
          enum:
          - INTERNAL
          - EMAIL
          - SMS
          examples:
          - EMAIL
        destination:
          type: string
          description: "Optional destination override (e.g. an alternative e-mail\
            \ address or phone number). If omitted, the default destination derived\
            \ from the subscriber's identifier is used."
          examples:
          - user@example.com
          maxLength: 255
          minLength: 0
      required:
      - type
    Subscriber:
      type: object
      description: "A subscriber describes who receives notifications, which channels\
        \ they prefer, and which event types they are interested in."
      properties:
        id:
          type: string
          description: Unique identifier of the subscriber
          examples:
          - 123e4567-e89b-12d3-a456-426614174000
          readOnly: true
        name:
          type: string
          description: Optional human-readable label. Useful when a person has several
            subscribers (e.g. one per role or purpose).
          examples:
          - Servicedesk-bevakning
          maxLength: 255
          minLength: 0
        identifier:
          $ref: "#/components/schemas/Identifier"
          description: Identifier of the principal that ultimately receives notifications
            (AD-account or partyId). Immutable once created.
        channels:
          type: array
          description: "Channels the subscriber wants to receive notifications on.\
            \ If empty, defaults to INTERNAL."
          items:
            $ref: "#/components/schemas/NotificationChannel"
        eventFilters:
          type: array
          description: "Event filters that restrict which eventlog events trigger\
            \ notifications. If empty, all events match."
          items:
            $ref: "#/components/schemas/EventFilter"
        pausedFrom:
          type: string
          format: date-time
          description: When the subscriber's notifications are paused from (inclusive).
            Null means not paused.
          examples:
          - 2026-06-01T00:00:00+02:00
        pausedUntil:
          type: string
          format: date-time
          description: When the subscriber's notifications resume (exclusive). Null
            means paused indefinitely (only meaningful if pausedFrom is set).
          examples:
          - 2026-06-30T00:00:00+02:00
        created:
          type: string
          format: date-time
          description: Timestamp when the subscriber was created
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the subscriber was last modified
          readOnly: true
        createdBy:
          $ref: "#/components/schemas/Identifier"
          description: Identifier of the principal that created the subscriber
          readOnly: true
        subscriptionCount:
          type: integer
          format: int32
          description: Number of subscriptions currently owned by this subscriber
          examples:
          - 3
          readOnly: true
    Subscription:
      type: object
      description: "A subscription describes what a subscriber is listening for (an\
        \ errand or all events in a namespace). Subscriptions support create and delete\
        \ only — to change what is being listened to, delete and create a new one."
      properties:
        id:
          type: string
          description: Unique identifier of the subscription
          examples:
          - 123e4567-e89b-12d3-a456-426614174000
          readOnly: true
        target:
          $ref: "#/components/schemas/SubscriptionTarget"
          description: What this subscription targets (an errand or the whole namespace).
        eventFilters:
          type: array
          description: "Optional per-subscription override of the subscriber-level\
            \ event filters. When set, these filters apply to events matched by this\
            \ subscription instead of the subscriber's global filters. When null or\
            \ empty, the subscriber-level filters are used as-is."
          items:
            $ref: "#/components/schemas/EventFilter"
        expiresAt:
          type: string
          format: date-time
          description: Optional expiration timestamp. After this point the subscription
            is eligible for automatic cleanup.
          examples:
          - 2026-12-31T23:59:59+02:00
        created:
          type: string
          format: date-time
          description: Timestamp when the subscription was created
          readOnly: true
        createdBy:
          $ref: "#/components/schemas/Identifier"
          description: "Identifier of the principal that created the subscription\
            \ (may differ from the owning subscriber, e.g. when an admin subscribes\
            \ on behalf of someone else)."
          readOnly: true
    SubscriptionTarget:
      type: object
      description: What a subscription targets. The id field is required when type=ERRAND
        and ignored when type=NAMESPACE.
      properties:
        type:
          type: string
          description: Target type
          enum:
          - ERRAND
          - NAMESPACE
          examples:
          - ERRAND
        id:
          type: string
          description: Identifier of the target. Required (errand UUID) when type=ERRAND.
            Must be null when type=NAMESPACE.
          examples:
          - b82bd8ac-1507-4d9a-958d-369261eecc15
      required:
      - type
    Status:
      type: object
      description: Status model
      properties:
        id:
          type: string
          description: Status ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
          readOnly: true
        name:
          type: string
          description: Name for the status
          examples:
          - statusName
          minLength: 1
        displayName:
          type:
          - string
          - "null"
          description: Display name for the status
          examples:
          - Status name
        externalDisplayName:
          type:
          - string
          - "null"
          description: External display name for the status
          examples:
          - External status name
        sortOrder:
          type:
          - integer
          - "null"
          format: int32
          description: Sort order for the status
          examples:
          - 1
        deprecated:
          type: boolean
          default: false
          description: Indicates if the status is deprecated
          examples:
          - "true"
        created:
          type: string
          format: date-time
          description: Timestamp when the status was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the status was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
      required:
      - name
    Role:
      type: object
      description: Role model
      properties:
        id:
          type: string
          description: Role ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
          readOnly: true
        name:
          type: string
          description: Name for the role. Used as key
          examples:
          - roleName
          minLength: 1
        displayName:
          type:
          - string
          - "null"
          description: Display name for the role
          examples:
          - Role name
        sortOrder:
          type:
          - integer
          - "null"
          format: int32
          description: Sort order for the role
          examples:
          - 1
        deprecated:
          type: boolean
          default: false
          description: Indicates if the role is deprecated
          examples:
          - "true"
        created:
          type: string
          format: date-time
          description: Timestamp when the role was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the role was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
      required:
      - name
    Phase:
      type: object
      description: Phase model
      properties:
        id:
          type: string
          description: Phase ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
          readOnly: true
        name:
          type: string
          description: Phase name
          examples:
          - INVESTIGATION
          minLength: 1
        displayName:
          type: string
          description: Display name for the phase
          examples:
          - Utredning
        description:
          type: string
          description: Description of the phase
          examples:
          - Fas för utredning
        phaseOrder:
          type: integer
          format: int32
          description: Order of the phase in the process (0 = initial phase)
          examples:
          - 0
        allowedStatuses:
          type: array
          description: Allowed statuses in this phase
          examples:
          - - IN_PROGRESS
            - WAITING
          items:
            type: string
        transitions:
          type: array
          description: Transitions from this phase
          items:
            $ref: "#/components/schemas/PhaseTransition"
          readOnly: true
        deprecated:
          type: boolean
          default: false
          description: Indicates if the phase is deprecated
          examples:
          - "true"
        created:
          type: string
          format: date-time
          description: Timestamp when the phase was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the phase was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
      required:
      - name
    PhaseTransition:
      type: object
      description: Phase transition model
      properties:
        id:
          type: string
          description: Transition ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
          readOnly: true
        targetPhaseId:
          type: string
          description: Target phase ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
          minLength: 1
        targetPhaseName:
          type: string
          description: Target phase name
          examples:
          - INVESTIGATION
          readOnly: true
        targetPhaseDisplayName:
          type: string
          description: Target phase display name
          examples:
          - Utredning
          readOnly: true
        description:
          type: string
          description: Description of the transition
          examples:
          - Skicka till utredning
        deprecated:
          type: boolean
          default: false
          description: Indicates if the phase transition is deprecated
          examples:
          - "true"
      required:
      - targetPhaseId
    ExternalIdType:
      type: object
      description: ExternalIdType model
      properties:
        id:
          type: string
          description: ExternalIdType ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
          readOnly: true
        name:
          type: string
          description: Name for the external id type
          examples:
          - PRIVATE
          minLength: 1
        displayName:
          type:
          - string
          - "null"
          description: Display name for the external id type
          examples:
          - External id type name
        sortOrder:
          type:
          - integer
          - "null"
          format: int32
          description: Sort order for the external id type
          examples:
          - 1
        deprecated:
          type: boolean
          default: false
          description: Indicates if the external ID type is deprecated
          examples:
          - "true"
        created:
          type: string
          format: date-time
          description: Timestamp when the external id type was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the external id type was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
      required:
      - name
    ContactReason:
      type: object
      description: Contact reason model
      properties:
        id:
          type: string
          description: ID
          examples:
          - b82bd8ac-1507-4d9a-958d-369261eecc15
          readOnly: true
        reason:
          type: string
          description: Reason for contact
          examples:
          - Segt internet
          minLength: 1
        displayName:
          type:
          - string
          - "null"
          description: Display name for the contact reason
          examples:
          - Contact reason name
        sortOrder:
          type:
          - integer
          - "null"
          format: int32
          description: Sort order for the contact reason
          examples:
          - 1
        deprecated:
          type: boolean
          default: false
          description: Indicates if the contact reason is deprecated
          examples:
          - "true"
        created:
          type: string
          format: date-time
          description: Timestamp when the contact reason was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the contact reason was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
      required:
      - reason
    Category:
      type: object
      description: Category model
      properties:
        id:
          type: string
          description: Category ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
          readOnly: true
        name:
          type: string
          description: Name for the category
          examples:
          - Category name
        displayName:
          type: string
          description: Display name for the category
          examples:
          - Displayed name
        sortOrder:
          type:
          - integer
          - "null"
          format: int32
          description: Sort order for the category
          examples:
          - 1
        deprecated:
          type: boolean
          default: false
          description: Indicates if the category is deprecated
          examples:
          - "true"
        types:
          type: array
          items:
            $ref: "#/components/schemas/Type"
          uniqueItems: true
        created:
          type: string
          format: date-time
          description: Timestamp when the category was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the category was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
    Type:
      type: object
      description: Type model
      properties:
        name:
          type: string
          description: Name for the type
          examples:
          - typename
          minLength: 1
        displayName:
          type: string
          description: Display name for the type
          examples:
          - Displayed name
        escalationEmail:
          type: string
          format: email
          description: Email for where to escalate the errand if needed
          examples:
          - escalationgroup@sesamestreet.com
        deprecated:
          type: boolean
          default: false
          description: Indicates if the type is deprecated
          examples:
          - "true"
        created:
          type: string
          format: date-time
          description: Timestamp when type was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when type was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
      required:
      - name
    Classification:
      type: object
      description: Classification model
      properties:
        category:
          type: string
          description: Category for the errand
          examples:
          - SUPPORT_CASE
        type:
          type: string
          description: Type of errand
          examples:
          - OTHER_ISSUES
    ContactChannel:
      type: object
      description: Contact channel model
      properties:
        type:
          type: string
          description: Type of channel. Defines how value is interpreted
          examples:
          - Email
        value:
          type: string
          description: Value for Contact channel
          examples:
          - arthur.dent@earth.com
    Errand:
      type: object
      description: Errand model
      properties:
        id:
          type: string
          description: Unique id for the errand
          examples:
          - f0882f1d-06bc-47fd-b017-1d8307f5ce95
          readOnly: true
        errandNumber:
          type: string
          description: Unique number for the errand
          examples:
          - KC-23010001
          readOnly: true
        title:
          type: string
          description: Title for the errand
          examples:
          - Title for the errand
        priority:
          $ref: "#/components/schemas/Priority"
        stakeholders:
          type: array
          items:
            $ref: "#/components/schemas/Stakeholder"
        externalTags:
          type: array
          items:
            $ref: "#/components/schemas/ExternalTag"
          uniqueItems: true
        parameters:
          type: array
          description: Parameters for the errand
          items:
            $ref: "#/components/schemas/Parameter"
        jsonParameters:
          type: array
          description: JSON parameters for the errand
          items:
            $ref: "#/components/schemas/JsonParameter"
        classification:
          $ref: "#/components/schemas/Classification"
        status:
          type: string
          description: Status for the errand
          examples:
          - NEW_CASE
        resolution:
          type: string
          description: Resolution status for closed errands. Value can be set to anything
          examples:
          - FIXED
        description:
          type: string
          description: Errand description text
          examples:
          - Order cake for everyone
        channel:
          type: string
          description: The channel from which the errand originated
          examples:
          - THE_CHANNEL
          maxLength: 255
        reporterUserId:
          type: string
          description: User id for the person which has created the errand
          examples:
          - joe01doe
        assignedUserId:
          type: string
          description: Id for the user which currently is assigned to the errand if
            a user is assigned
          examples:
          - joe01doe
        assignedGroupId:
          type: string
          description: Id for the group which is currently assigned to the errand
            if a group is assigned
          examples:
          - hardware support
        escalationEmail:
          type: string
          format: email
          description: Email address used for escalation of errand
          examples:
          - joe.doe@email.com
        contactReason:
          type: string
          description: Contact reason for the errand
          examples:
          - The printer is not working
        contactReasonDescription:
          type: string
          description: Contact reason description for the errand
          examples:
          - The printer is not working since the power cord is missing
          maxLength: 4096
        suspension:
          $ref: "#/components/schemas/Suspension"
          description: Suspension information
        businessRelated:
          type: boolean
          description: Flag to indicate if the errand is business related
          examples:
          - "true"
        labels:
          type: array
          description: List of labels for the errand
          items:
            $ref: "#/components/schemas/ErrandLabel"
        phases:
          type: array
          description: Phase history for the errand
          items:
            $ref: "#/components/schemas/ErrandPhase"
          readOnly: true
        activePhaseId:
          type: string
          description: Phase metadata ID to assign as the active phase on the errand
          examples:
          - b5b2e4c0-1234-5678-9abc-def012345678
          writeOnly: true
        activeNotifications:
          type: array
          description: List of active notifications for the errand
          items:
            $ref: "#/components/schemas/Notification"
          readOnly: true
        actions:
          type: array
          description: List of pending actions for the errand
          items:
            $ref: "#/components/schemas/ErrandAction"
          readOnly: true
        created:
          type: string
          format: date-time
          description: Timestamp when errand was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when errand was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        touched:
          type: string
          format: date-time
          description: Timestamp when errand was last touched (created or modified)
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        version:
          type: integer
          format: int64
          description: Optimistic locking version of the errand
          readOnly: true
    ErrandAction:
      type: object
      description: Errand action model
      properties:
        id:
          type: string
          description: Unique id for the action
          examples:
          - f0882f1d-06bc-47fd-b017-1d8307f5ce95
          readOnly: true
        actionName:
          type: string
          description: Name of the action
          examples:
          - ADD_LABEL
          readOnly: true
        executeAfter:
          type: string
          format: date-time
          description: Timestamp after which the action should be executed
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        actionConfigId:
          type: string
          description: Id of the action config that created this action
          examples:
          - f0882f1d-06bc-47fd-b017-1d8307f5ce95
          readOnly: true
        displayValue:
          type: string
          description: Display value for the action
          examples:
          - Label will be added
          readOnly: true
    ErrandLabel:
      type: object
      description: Errand label model
      properties:
        id:
          type: string
          description: Label ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
        classification:
          type: string
          description: Label classification
          examples:
          - subtype
          readOnly: true
        displayName:
          type: string
          description: Display name for the label
          examples:
          - Nyckelkort
          readOnly: true
        resourcePath:
          type: string
          description: Resource path
          examples:
          - /parent/child/xxx
          readOnly: true
        resourceName:
          type: string
          description: Resource name
          examples:
          - keycard
          readOnly: true
    ErrandPhase:
      type: object
      description: Errand phase model
      properties:
        phaseId:
          type: string
          description: Phase metadata ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
        name:
          type: string
          description: Phase name
          examples:
          - INVESTIGATION
        displayName:
          type: string
          description: Phase display name
          examples:
          - Utredning
        started:
          type: string
          format: date-time
          description: Timestamp when the errand entered this phase
          examples:
          - 2000-10-31T01:30:00.000+02:00
        ended:
          type: string
          format: date-time
          description: Timestamp when the errand left this phase
          examples:
          - 2000-10-31T01:30:00.000+02:00
      readOnly: true
    ExternalTag:
      type: object
      description: External tag model
      properties:
        key:
          type: string
          description: Key for external tag
          examples:
          - caseId
        value:
          type: string
          description: Value for external tag
          examples:
          - 8849-2848
    Notification:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the notification
          examples:
          - 123e4567-e89b-12d3-a456-426614174000
        created:
          type: string
          format: date-time
          description: Timestamp when the notification was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the notification was last modified
          examples:
          - 2000-10-31T01:30:00.000+02:00
          readOnly: true
        ownerFullName:
          type: string
          description: Name of the owner of the notification
          examples:
          - Test Testorsson
          readOnly: true
        ownerId:
          type: string
          description: Owner id of the notification
          examples:
          - AD01
        createdBy:
          type: string
          description: User who created the notification
          examples:
          - TestUser
          readOnly: true
        createdByFullName:
          type: string
          description: Full name of the user who created the notification
          examples:
          - Test Testorsson
          readOnly: true
        type:
          type: string
          description: Type of the notification
          examples:
          - CREATE
        subtype:
          type: string
          description: Subtype of the notification
          examples:
          - ATTACHMENT
        description:
          type: string
          description: Description of the notification
          examples:
          - Some description of the notification
        content:
          type: string
          description: Content of the notification
          examples:
          - Some content of the notification
        expires:
          type: string
          format: date-time
          description: Timestamp when the notification expires
          examples:
          - 2000-10-31T01:30:00.000+02:00
        globalAcknowledged:
          type: boolean
          description: Acknowledged status of the notification (global level). I.e.
            this notification is acknowledged by anyone.
          examples:
          - "true"
        acknowledged:
          type: boolean
          description: Acknowledged status of the notification (owner level). I.e.
            this notification is acknowledged by the owner of this notification.
          examples:
          - "true"
        errandId:
          type: string
          description: Errand id of the notification
          examples:
          - f0882f1d-06bc-47fd-b017-1d8307f5ce95
          readOnly: true
        errandNumber:
          type: string
          description: Errand number of the notification
          examples:
          - PRH-2022-000001
          readOnly: true
    Parameter:
      type: object
      description: Parameter model
      properties:
        key:
          type: string
          description: Parameter key
          minLength: 1
        displayName:
          type: string
          description: Parameter display name
        group:
          type: string
          description: Parameter group name
        values:
          type: array
          description: Parameter values. Each value can have a maximum length of 3000
            characters
          items:
            type: string
            maxLength: 3000
            minLength: 0
        version:
          type: integer
          format: int64
          description: Optimistic locking version of the parameter
          readOnly: true
      required:
      - key
    Priority:
      type: string
      description: Priority model
      enum:
      - LOW
      - MEDIUM
      - HIGH
    Stakeholder:
      type: object
      description: Stakeholder model
      properties:
        externalId:
          type: string
          description: Unique identifier (partyId) for the stakeholder. Must be null
            or a valid UUID.
          examples:
          - cb20c51f-fcf3-42c0-b613-de563634a8ec
        externalIdType:
          type: string
          description: Type of external id
          examples:
          - PRIVATE
        role:
          type: string
          description: Role of stakeholder
          examples:
          - ADMINISTRATOR
        city:
          type: string
          description: City
          examples:
          - Cottington
        organizationName:
          type: string
          description: Organization name
          examples:
          - Vogon Constructor Fleet
        firstName:
          type: string
          description: First name
          examples:
          - Aurthur
        lastName:
          type: string
          description: Last name
          examples:
          - Dent
        address:
          type: string
          description: Address
          examples:
          - "155 Country Lane, Cottington"
        careOf:
          type: string
          description: Care of
          examples:
          - Ford Prefect
        zipCode:
          type: string
          description: Zip code
          examples:
          - "12345"
        country:
          type: string
          description: Country
          examples:
          - United Kingdom
        contactChannels:
          type: array
          items:
            $ref: "#/components/schemas/ContactChannel"
        parameters:
          type: array
          description: Parameters for the stakeholder
          items:
            $ref: "#/components/schemas/Parameter"
    Suspension:
      type: object
      properties:
        suspendedTo:
          type: string
          format: date-time
          description: Timestamp when the suspension wears off
          examples:
          - 2000-10-31T01:30:00.000+02:00
        suspendedFrom:
          type: string
          format: date-time
          description: Timestamp when the suspension started
          examples:
          - 2000-10-31T01:30:00.000+02:00
    CreateErrandNoteRequest:
      type: object
      description: CreateErrandNoteRequest model
      properties:
        context:
          type: string
          description: Context for note
          examples:
          - SUPPORT
          maxLength: 255
          minLength: 1
        role:
          type: string
          description: Role of note creator
          examples:
          - FIRST_LINE_SUPPORT
          maxLength: 255
          minLength: 1
        partyId:
          type: string
          description: Party id (e.g. a personId or an organizationId)
          examples:
          - 81471222-5798-11e9-ae24-57fa13b361e1
        subject:
          type: string
          description: The note subject
          examples:
          - This is a subject
          maxLength: 255
          minLength: 1
        body:
          type: string
          description: The note body
          examples:
          - This is a note
          maxLength: 2048
          minLength: 1
        createdBy:
          type: string
          description: Created by
          examples:
          - John Doe
          minLength: 1
      required:
      - body
      - context
      - createdBy
      - role
      - subject
    HandoverPreviewRequest:
      type: object
      description: Request describing which namespace a source errand should be previewed
        for handover to
      properties:
        targetNamespace:
          type: string
          description: Namespace the errand should be handed over to
          examples:
          - OTHER_NAMESPACE
          minLength: 1
          pattern: "[\\w|\\-]+"
        targetMunicipalityId:
          type: string
          description: Municipality id the errand should be handed over to
          examples:
          - "2281"
      required:
      - targetMunicipalityId
      - targetNamespace
    ClassificationMapping:
      type: object
      description: Mapping suggestion for the namespace-bound classification (category/type)
        field
      properties:
        source:
          $ref: "#/components/schemas/ClassificationOption"
          description: Classification on the source errand
        suggestedCategory:
          type: string
          description: "Auto-suggested target category name, or null if no match was\
            \ found"
          examples:
          - SUPPORT_CASE
        suggestedType:
          type: string
          description: "Auto-suggested target type name, or null if no match was found"
          examples:
          - OTHER_ISSUES
        candidates:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: "Selectable types per category in the target namespace. Always\
            \ present, may be empty"
      required:
      - candidates
    ClassificationOption:
      type: object
      description: A category/type pair describing an errand classification
      properties:
        category:
          type: string
          description: Category name
          examples:
          - SUPPORT_CASE
        type:
          type: string
          description: Type name
          examples:
          - OTHER_ISSUES
    ContactReasonMapping:
      type: object
      description: Mapping suggestion for the namespace-bound contact reason field
      properties:
        source:
          type: string
          description: Contact reason on the source errand
          examples:
          - Bygglov
        suggested:
          type: string
          description: "Auto-suggested target contact reason, or null if no match\
            \ was found"
          examples:
          - Bygglov
        candidates:
          type: array
          description: "All selectable contact reasons in the target namespace. Always\
            \ present, may be empty"
          items:
            type: string
      required:
      - candidates
    DirectlyCopyable:
      type: object
      description: Fields that are copied automatically to the target namespace without
        manual mapping
      properties:
        title:
          type: string
          description: Title of the source errand
          examples:
          - Trasig dörr på Storgatan
        priority:
          $ref: "#/components/schemas/Priority"
          description: Priority of the source errand
        stakeholderCount:
          type: integer
          format: int32
          description: Number of stakeholders that will be copied
          examples:
          - 3
        externalTagCount:
          type: integer
          format: int32
          description: Number of external tags that will be copied
          examples:
          - 5
        attachmentCount:
          type: integer
          format: int32
          description: Number of attachments that will be copied
          examples:
          - 2
    HandoverPreview:
      type: object
      description: "Preview of how a source errand would be handed over to another\
        \ namespace, without any side effects"
      properties:
        directlyCopyable:
          $ref: "#/components/schemas/DirectlyCopyable"
          description: Fields that are copied automatically
        mappingRequired:
          $ref: "#/components/schemas/MappingRequired"
          description: Namespace-bound fields that require manual mapping
        sourceHandling:
          $ref: "#/components/schemas/SourceHandling"
          description: Options for handling the source errand after handover. Always
            present
        notCopyable:
          type: array
          description: "Fields that can not be copied to the target namespace. Always\
            \ present, may be empty"
          items:
            $ref: "#/components/schemas/NotCopyable"
        warnings:
          type: array
          description: "Warnings raised while building the preview. Always present,\
            \ may be empty"
          items:
            $ref: "#/components/schemas/Warning"
      required:
      - notCopyable
      - sourceHandling
      - warnings
    LabelCandidate:
      type: object
      description: A label that can be chosen as the target for a source label
      properties:
        id:
          type: string
          description: Unique id of the label in the target namespace
          examples:
          - b82bd8ac-1507-4d9a-958d-369261eecc15
        displayName:
          type: string
          description: Display name of the label
          examples:
          - Nyckelkort
        resourcePath:
          type: string
          description: Hierarchical resource path of the label
          examples:
          - /access/keycard
    LabelMapping:
      type: object
      description: Mapping suggestion for a single namespace-bound label
      properties:
        sourceId:
          type: string
          description: Unique id of the label on the source errand
          examples:
          - uuid-a
        sourceDisplayName:
          type: string
          description: Display name of the source label
          examples:
          - Nyckelkort
        sourceResourcePath:
          type: string
          description: Hierarchical resource path of the source label
          examples:
          - /access/keycard
        suggestedTargetId:
          type: string
          description: "Auto-suggested target label id, or null if no match was found"
          examples:
          - uuid-b
        matchReason:
          $ref: "#/components/schemas/MatchReason"
          description: "Reason the target was suggested, or null if there is no suggestion"
    LabelMappingGroup:
      type: object
      description: "Label mapping section: the selectable target labels shared by\
        \ every mapping, plus one mapping suggestion per source label"
      properties:
        candidates:
          type: array
          description: "All selectable labels in the target namespace, shared by every\
            \ mapping. Always present, may be empty"
          items:
            $ref: "#/components/schemas/LabelCandidate"
        mappings:
          type: array
          description: "Mapping suggestions, one entry per source label. Always present,\
            \ may be empty"
          items:
            $ref: "#/components/schemas/LabelMapping"
      required:
      - candidates
      - mappings
    MappingRequired:
      type: object
      description: Namespace-bound fields that require a human to decide how they
        should be mapped to the target namespace
      properties:
        status:
          $ref: "#/components/schemas/StatusMapping"
          description: Status mapping suggestion
        classification:
          $ref: "#/components/schemas/ClassificationMapping"
          description: Classification (category/type) mapping suggestion
        labels:
          $ref: "#/components/schemas/LabelMappingGroup"
          description: "Label mapping section: the selectable target labels plus one\
            \ mapping suggestion per source label. Always present"
        contactReason:
          $ref: "#/components/schemas/ContactReasonMapping"
          description: Contact reason mapping suggestion
      required:
      - labels
    MatchReason:
      type: string
      description: "Reason a target was auto-suggested for a namespace-bound field:\
        \ NAME_EXACT (exact match on technical name), DISPLAY_NAME_EXACT (case-insensitive\
        \ exact match on display name), RESOURCE_PATH_MATCH (match on hierarchical\
        \ resource path, labels only)"
      enum:
      - NAME_EXACT
      - DISPLAY_NAME_EXACT
      - RESOURCE_PATH_MATCH
    MetadataOption:
      type: object
      description: A selectable metadata option identified by its technical name and
        display name
      properties:
        name:
          type: string
          description: Technical name of the option
          examples:
          - IN_PROGRESS
        displayName:
          type: string
          description: Human readable display name of the option
          examples:
          - Pågående
    NotCopyable:
      type: object
      description: A field that can not be copied to the target namespace
      properties:
        field:
          type: string
          description: Name of the field that can not be copied
          examples:
          - phases
        reason:
          type: string
          description: Reason the field can not be copied
          examples:
          - Phase history is source-specific
    SourceHandling:
      type: object
      description: Options for handling the source errand after handover
      properties:
        statusCandidates:
          type: array
          description: "Selectable statuses in the source namespace, used when choosing\
            \ how the source errand is handled after handover. Always present, may\
            \ be empty"
          items:
            $ref: "#/components/schemas/MetadataOption"
      required:
      - statusCandidates
    StatusMapping:
      type: object
      description: Mapping suggestion for the namespace-bound status field
      properties:
        source:
          $ref: "#/components/schemas/MetadataOption"
          description: Status on the source errand
        suggestedTarget:
          type: string
          description: "Auto-suggested target status name, or null if no match was\
            \ found"
          examples:
          - IN_PROGRESS
        matchReason:
          $ref: "#/components/schemas/MatchReason"
          description: "Reason the target was suggested, or null if there is no suggestion"
        candidates:
          type: array
          description: "All selectable statuses in the target namespace. Always present,\
            \ may be empty"
          items:
            $ref: "#/components/schemas/MetadataOption"
      required:
      - candidates
    Warning:
      type: object
      description: A warning raised while building the handover preview. The applicable
        fields depend on 'type'
      properties:
        type:
          $ref: "#/components/schemas/WarningType"
          description: "Type of warning, acts as discriminator for which other fields\
            \ are populated"
        key:
          type: string
          description: Key the warning relates to. Populated for PARAMETER_SCHEMA_MISMATCH
          examples:
          - orgUnit
        detail:
          type: string
          description: Human readable detail describing the warning. Populated for
            PARAMETER_SCHEMA_MISMATCH
          examples:
          - jsonSchema 'orgUnit-v2' not registered in target
        value:
          type: string
          description: Value the warning relates to. Populated for ROLE_NOT_IN_TARGET
          examples:
          - EXTERNAL_REPORTER
      required:
      - type
    WarningType:
      type: string
      description: "Type of warning raised while building a handover preview: PARAMETER_SCHEMA_MISMATCH\
        \ (a parameter references a json schema not registered in the target namespace,\
        \ see 'key'/'detail'), ROLE_NOT_IN_TARGET (a stakeholder role on the source\
        \ errand does not exist in the target namespace, see 'value')"
      enum:
      - PARAMETER_SCHEMA_MISMATCH
      - ROLE_NOT_IN_TARGET
    HandoverErrandRequest:
      type: object
      description: Request body for handing over an errand to another namespace
      properties:
        target:
          $ref: "#/components/schemas/HandoverTarget"
        mapping:
          $ref: "#/components/schemas/HandoverMapping"
        overrides:
          $ref: "#/components/schemas/HandoverOverrides"
        include:
          $ref: "#/components/schemas/HandoverInclude"
        sourceHandling:
          $ref: "#/components/schemas/HandoverSourceHandling"
      required:
      - mapping
      - target
    HandoverInclude:
      type: object
      description: Flags controlling what data is copied from the source errand
      properties:
        stakeholders:
          type: boolean
          default: false
          description: Include stakeholders
        externalTags:
          type: boolean
          default: false
          description: Include external tags
        parameters:
          type: boolean
          default: false
          description: Include parameters
        jsonParameters:
          type: boolean
          default: false
          description: Include JSON parameters
        attachments:
          type: boolean
          default: false
          description: Include attachments
        businessRelated:
          type: boolean
          default: false
          description: Include business related flag
        escalationEmail:
          type: boolean
          default: false
          description: Include escalation email
        contactReasonDescription:
          type: boolean
          default: false
          description: Include contact reason description
    HandoverMapping:
      type: object
      description: Field mappings to apply when creating the errand in the target
        system
      properties:
        status:
          type: string
          description: Status to set on the new errand
          example: NEW_CASE
        classification:
          $ref: "#/components/schemas/Classification"
        labels:
          type: array
          description: Label UUIDs to apply on the new errand
          items:
            type: string
        contactReason:
          type: string
          description: Contact reason to set on the new errand
          example: Printer issue
        channel:
          type: string
          description: Channel to set on the new errand
          example: WEB_UI
    HandoverOverrides:
      type: object
      description: Field values that override what is copied from the source errand
      properties:
        title:
          type: string
          description: Title override
        description:
          type: string
          description: Description override
        priority:
          $ref: "#/components/schemas/Priority"
        assignedUserId:
          type: string
          description: Assigned user id override
        assignedGroupId:
          type: string
          description: Assigned group id override
    HandoverSourceAction:
      type: string
      description: Action to take on the source errand after handover
      enum:
      - CLOSE
      - RETAIN
      - SUSPEND
    HandoverSourceHandling:
      type: object
      description: Defines what happens to the source errand after handover
      properties:
        action:
          $ref: "#/components/schemas/HandoverSourceAction"
        status:
          type: string
          description: Status to set on the source errand
          example: SOLVED
        resolution:
          type: string
          description: Resolution to set on the source errand
          example: HANDED_OVER
        closingComment:
          type: string
          description: Closing comment to add to the source errand
          example: Överlämnad till annan drake
      required:
      - action
    HandoverTarget:
      type: object
      description: Target system to handover the errand to
      properties:
        namespace:
          type: string
          description: Target namespace
          example: OTHER_NAMESPACE
          minLength: 1
        municipalityId:
          type: string
          description: Target municipality id
          example: "2281"
      required:
      - namespace
    HandoverErrand:
      type: object
      description: Response body for a successful errand handover
      properties:
        newErrandId:
          type: string
          description: Id of the newly created errand in the target system
          example: f0882f1d-06bc-47fd-b017-1d8307f5ce95
        newErrandNumber:
          type: string
          description: Errand number of the newly created errand
          example: KC-23010001
        target:
          $ref: "#/components/schemas/HandoverTarget"
          description: Target namespace and municipality the errand was handed over
            to
        relationId:
          type: string
          description: Id of the relation created between the source and target errand
        appliedMappings:
          type: object
          additionalProperties:
            type: string
          description: Field mappings that were applied when creating the new errand
        warnings:
          type: array
          description: Non-fatal warnings that occurred during handover
          items:
            type: string
    WebMessageAttachment:
      type: object
      description: WebMessageAttachment model
      properties:
        fileName:
          type: string
          description: The attachment file name
          examples:
          - test.txt
          minLength: 1
        base64EncodedString:
          type: string
          format: base64
          description: "The attachment (file) content as a BASE64-encoded string,\
            \ max size 50 MB"
          examples:
          - aGVsbG8gd29ybGQK
      required:
      - base64EncodedString
      - fileName
    WebMessageRequest:
      type: object
      description: WebMessageRequest model
      properties:
        internal:
          type: boolean
          description: Indicates if the message is internal
          examples:
          - "false"
        dispatch:
          type: boolean
          default: true
          description: Indicates if the message should be dispatched with messaging
            or not
          examples:
          - "true"
        message:
          type: string
          description: Message in plain text
          examples:
          - Message in plain text
          minLength: 1
        attachments:
          type: array
          items:
            $ref: "#/components/schemas/WebMessageAttachment"
            description: List with Base64 encoded web message attachments
        attachmentIds:
          type: array
          items:
            type: string
            description: List with attachment ids
      required:
      - message
    SmsRequest:
      type: object
      description: SmsRequest model
      properties:
        sender:
          type: string
          description: The sender of the SMS
          examples:
          - sender
          maxLength: 11
          minLength: 1
        recipient:
          type: string
          description: "Mobile number to recipient in format +467[02369]\\d{7}"
          examples:
          - "+46701740605"
        message:
          type: string
          description: Message
          minLength: 1
        internal:
          type: boolean
          description: Indicates if the message is internal
          examples:
          - "false"
      required:
      - message
      - recipient
      - sender
    EmailAttachment:
      type: object
      description: EmailAttachment model
      properties:
        fileName:
          type: string
          description: The attachment file name
          examples:
          - test.txt
          minLength: 1
        base64EncodedString:
          type: string
          format: base64
          description: "The attachment (file) content as a BASE64-encoded string,\
            \ max size 50 MB"
          examples:
          - aGVsbG8gd29ybGQK
      required:
      - base64EncodedString
      - fileName
    EmailRequest:
      type: object
      description: EmailRequest model
      properties:
        sender:
          type: string
          format: email
          description: Email address for sender
          examples:
          - sender@sender.se
        senderName:
          type: string
          description: "Optional display name of sender on email. If left out, email\
            \ will be displayed as sender name."
          examples:
          - Firstname Lastname
        recipient:
          type: string
          format: email
          description: Email address for recipient
          examples:
          - recipient@recipient.se
        subject:
          type: string
          description: Subject
          examples:
          - Subject
          minLength: 1
        htmlMessage:
          type: string
          description: Message in html (optionally in BASE64 encoded format)
          examples:
          - <html>HTML-formatted message</html>
          minLength: 1
        message:
          type: string
          description: Message in plain text
          examples:
          - Message in plain text
          minLength: 1
        internal:
          type: boolean
          description: Indicates if the message is internal
          examples:
          - "false"
        emailHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Headers for keeping track of email conversations
          examples:
          - IN_REPLY_TO:
            - reply-to@example.com
            REFERENCES:
            - reference1
            - reference2
            MESSAGE_ID:
            - "123456789"
        attachments:
          type: array
          items:
            $ref: "#/components/schemas/EmailAttachment"
            description: List with Base64 encoded email attachments
        attachmentIds:
          type: array
          items:
            type: string
            description: List with attachment ids
      required:
      - htmlMessage
      - message
      - recipient
      - sender
      - subject
    ConversationRequest:
      type: object
      description: ConversationRequest model
      properties:
        topic:
          type: string
          description: The message-exchange topic
          examples:
          - The conversation topic
          minLength: 1
        type:
          $ref: "#/components/schemas/ConversationType"
          description: The conversation type
        relationIds:
          type: array
          items:
            type: string
            description: List with relation ID:s
        participants:
          type: array
          items:
            $ref: "#/components/schemas/Identifier"
            description: A list of participants in this conversation
        metadata:
          type: array
          items:
            $ref: "#/components/schemas/KeyValues"
            description: A list of metadata objects associated with the conversation
      required:
      - topic
      - type
    ConversationType:
      type: string
      description: ConversationType model
      enum:
      - INTERNAL
      - EXTERNAL
    KeyValues:
      type: object
      description: KeyValues model
      properties:
        key:
          type: string
          description: The key
          examples:
          - key1
        values:
          type: array
          items:
            type: string
    MessageRequest:
      type: object
      description: MessageRequest model
      properties:
        inReplyToMessageId:
          type: string
          description: The ID of the replied message
          examples:
          - 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
        content:
          type: string
          description: The content of the message.
          examples:
          - "Hello, how can I help you?"
          minLength: 1
        attachmentIds:
          type: array
          items:
            type: string
            description: List with attachment ids
      required:
      - content
    MarkAsReadRequest:
      type: object
      description: MarkAsReadRequest model
      properties:
        messageIds:
          type: array
          items:
            type: string
            description: List of message IDs to mark as read
            example: b82bd8ac-1507-4d9a-958d-369261eecc15
          minItems: 1
      required:
      - messageIds
    UpdateErrandNoteRequest:
      type: object
      description: UpdateErrandNoteRequest model
      properties:
        subject:
          type: string
          description: The note subject
          examples:
          - This is a subject
          maxLength: 255
          minLength: 1
        body:
          type: string
          description: The note body
          examples:
          - This is a note
          maxLength: 2048
          minLength: 1
        modifiedBy:
          type: string
          description: Modified by
          examples:
          - John Doe
          minLength: 1
      required:
      - body
      - modifiedBy
      - subject
    ErrandNote:
      type: object
      description: ErrandNote model
      properties:
        id:
          type: string
          description: Note ID
          examples:
          - 5f79a808-0ef3-4985-99b9-b12f23e202a7
        context:
          type: string
          description: Context for note
          examples:
          - SUPPORT
        role:
          type: string
          description: Role of note creator
          examples:
          - FIRST_LINE_SUPPORT
        clientId:
          type: string
          description: Id of the client who is the owner of the note
          examples:
          - SUPPORT_MGMT
        partyId:
          type: string
          description: Party ID (e.g. a personId or an organizationId)
          examples:
          - 81471222-5798-11e9-ae24-57fa13b361e1
        subject:
          type: string
          description: The note subject
          examples:
          - This is a subject
        body:
          type: string
          description: The note body
          examples:
          - This is a note
        caseId:
          type: string
          description: Id for the case
          examples:
          - b82bd8ac-1507-4d9a-958d-369261eecc15
        createdBy:
          type: string
          description: Created by
          examples:
          - John Doe
        modifiedBy:
          type: string
          description: Modified by
          examples:
          - John Doe
        created:
          type: string
          format: date-time
          description: Created timestamp
        modified:
          type: string
          format: date-time
          description: Modified timestamp
    Conversation:
      type: object
      description: Conversation model
      properties:
        id:
          type: string
          description: Conversation ID
          examples:
          - 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
        topic:
          type: string
          description: The message-exchange topic
          examples:
          - The conversation topic
        type:
          $ref: "#/components/schemas/ConversationType"
          description: The conversation type
          examples:
          - D2D
        relationIds:
          type: array
          items:
            type: string
            description: List with relation ID:s
        participants:
          type: array
          items:
            $ref: "#/components/schemas/Identifier"
            description: A list of participants in this conversation
        metadata:
          type: array
          items:
            $ref: "#/components/schemas/KeyValues"
            description: A list of metadata objects associated with the conversation
    PageSubscriberNotification:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        sort:
          $ref: "#/components/schemas/SortObject"
        first:
          type: boolean
        last:
          type: boolean
        numberOfElements:
          type: integer
          format: int32
        pageable:
          $ref: "#/components/schemas/PageableObject"
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: "#/components/schemas/SubscriberNotification"
        number:
          type: integer
          format: int32
        empty:
          type: boolean
    PageableObject:
      type: object
      properties:
        sort:
          $ref: "#/components/schemas/SortObject"
        paged:
          type: boolean
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        unpaged:
          type: boolean
        offset:
          type: integer
          format: int64
    SortObject:
      type: object
      properties:
        sorted:
          type: boolean
        unsorted:
          type: boolean
        empty:
          type: boolean
    SubscriberNotification:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the notification
          example: 123e4567-e89b-12d3-a456-426614174000
          readOnly: true
        created:
          type: string
          format: date-time
          description: Timestamp when the notification was created
          example: 2000-10-31T01:30:00.000+02:00
          readOnly: true
        modified:
          type: string
          format: date-time
          description: Timestamp when the notification was last modified
          example: 2000-10-31T01:30:00.000+02:00
          readOnly: true
        identifierType:
          type: string
          description: Identifier type of the notification owner
          example: adAccount
          readOnly: true
        identifierValue:
          type: string
          description: Identifier value of the notification owner
          example: joe01doe
          readOnly: true
        errandId:
          type: string
          description: ID of the errand this notification relates to
          example: f0882f1d-06bc-47fd-b017-1d8307f5ce95
          readOnly: true
        errandNumber:
          type: string
          description: Number of the errand this notification relates to
          example: PRH-2022-000001
          readOnly: true
        expires:
          type: string
          format: date-time
          description: Timestamp when the notification expires
          example: 2000-10-31T01:30:00.000+02:00
          readOnly: true
        acknowledged:
          type: string
          format: date-time
          description: "Timestamp when the notification was acknowledged, null if\
            \ not yet acknowledged"
          example: 2000-10-31T01:30:00.000+02:00
          readOnly: true
        eventType:
          type: string
          description: Event type that triggered the notification
          example: UPDATE
          readOnly: true
        description:
          type: string
          description: Description of the event that triggered the notification
          example: Bilaga har skapats
          readOnly: true
        subType:
          type: string
          description: Subtype describing what kind of entity the event refers to
          example: ATTACHMENT
          readOnly: true
    ActionDefinition:
      type: object
      description: Action definition model describing an available action and its
        conditions/parameters
      properties:
        name:
          type: string
          description: Name of the action
          examples:
          - ADD_LABEL
        description:
          type: string
          description: Description of the action
          examples:
          - Adds a label to the errand when conditions are met
        conditionDefinitions:
          type: array
          description: Definitions of conditions for this action
          items:
            $ref: "#/components/schemas/Definition"
        parameterDefinitions:
          type: array
          description: Definitions of parameters for this action
          items:
            $ref: "#/components/schemas/Definition"
    Definition:
      type: object
      description: Definition of a condition or parameter for an action
      properties:
        key:
          type: string
          description: Key for the definition
          examples:
          - status
        mandatory:
          type: boolean
          default: false
          description: Whether this definition is mandatory
          examples:
          - "true"
        description:
          type: string
          description: Description of the definition
          examples:
          - The status to match against
        possibleValues:
          type: array
          description: List of possible values for this definition
          items:
            $ref: "#/components/schemas/PossibleValue"
    PossibleValue:
      type: object
      description: Possible value for an action definition parameter or condition
      properties:
        value:
          type: string
          description: The value
          examples:
          - CATEGORY_1
        displayName:
          type: string
          description: Display name for the value
          examples:
          - Category 1
    Labels:
      type: object
      description: Labels model
      properties:
        labelStructure:
          type: array
          items:
            $ref: "#/components/schemas/Label"
      readOnly: true
    MetadataResponse:
      type: object
      description: MetadataResponse model
      properties:
        categories:
          type: array
          items:
            $ref: "#/components/schemas/Category"
        externalIdTypes:
          type: array
          items:
            $ref: "#/components/schemas/ExternalIdType"
        labels:
          $ref: "#/components/schemas/Labels"
          readOnly: true
        statuses:
          type: array
          items:
            $ref: "#/components/schemas/Status"
        roles:
          type: array
          items:
            $ref: "#/components/schemas/Role"
        contactReasons:
          type: array
          items:
            $ref: "#/components/schemas/ContactReason"
        phases:
          type: array
          items:
            $ref: "#/components/schemas/Phase"
    PageErrand:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        sort:
          $ref: "#/components/schemas/SortObject"
        first:
          type: boolean
        last:
          type: boolean
        numberOfElements:
          type: integer
          format: int32
        pageable:
          $ref: "#/components/schemas/PageableObject"
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: "#/components/schemas/Errand"
        number:
          type: integer
          format: int32
        empty:
          type: boolean
    Revision:
      type: object
      description: Revision model
      properties:
        id:
          type: string
          description: Unique id for the revision
          examples:
          - 391e97b7-2e78-42e2-9a60-fe49fbfa94f1
        entityId:
          type: string
          description: Unique id for the entity connected to the revision
          examples:
          - 3af4844d-a75f-4e25-a2a0-355eb642dd2d
        entityType:
          type: string
          description: Type of entity for the revision
          examples:
          - ErrandEntity
        version:
          type: integer
          format: int32
          description: Version of the revision
          examples:
          - 1
        created:
          type: string
          format: date-time
          description: Timestamp when the revision was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
      readOnly: true
    DifferenceResponse:
      type: object
      description: DifferenceResponse model
      properties:
        operations:
          type: array
          items:
            $ref: "#/components/schemas/Operation"
      readOnly: true
    Operation:
      type: object
      description: Operation model
      properties:
        op:
          type: string
          description: Type of operation
          examples:
          - replace
        path:
          type: string
          description: Path to attribute
          examples:
          - /name/firstName
        value:
          type: string
          description: Value of attribute
          examples:
          - Jane
        fromValue:
          type: string
          description: Previous value of attribute
          examples:
          - John
      readOnly: true
    FindErrandNotesRequest:
      type: object
      description: FindErrandNotesRequest model
      properties:
        page:
          type: integer
          format: int32
          default: 1
          description: Page number
          examples:
          - 1
          minimum: 1
        limit:
          type: integer
          format: int32
          default: 100
          description: Result size per page
          examples:
          - 100
          maximum: 1000
          minimum: 1
        context:
          type: string
          description: Context for note
          examples:
          - SUPPORT
        role:
          type: string
          description: Role of note creator
          examples:
          - FIRST_LINE_SUPPORT
        partyId:
          type: string
          description: Party id (e.g. a personId or an organizationId)
          examples:
          - 81471222-5798-11e9-ae24-57fa13b361e1
    FindErrandNotesResponse:
      type: object
      description: FindErrandNotesResponse model
      properties:
        notes:
          type: array
          items:
            $ref: "#/components/schemas/ErrandNote"
        _meta:
          $ref: "#/components/schemas/MetaData"
      readOnly: true
    MetaData:
      type: object
      description: Metadata model
      properties:
        page:
          type: integer
          format: int32
          description: Current page
          examples:
          - 5
          readOnly: true
        limit:
          type: integer
          format: int32
          description: Displayed objects per page
          examples:
          - 20
          readOnly: true
        count:
          type: integer
          format: int32
          description: Displayed objects on current page
          examples:
          - 13
          readOnly: true
        totalRecords:
          type: integer
          format: int64
          description: Total amount of hits based on provided search parameters
          examples:
          - 98
          readOnly: true
        totalPages:
          type: integer
          format: int32
          description: Total amount of pages based on provided search parameters
          examples:
          - 23
          readOnly: true
    Event:
      type: object
      description: Event model
      properties:
        id:
          type: string
          description: Unique identifier for the event
          examples:
          - 922f95e3-608b-4e3c-ae22-f11fb849799a
        type:
          $ref: "#/components/schemas/EventType"
        subType:
          type: string
          description: Subtype describing what kind of entity the event refers to
          examples:
          - ATTACHMENT
        requestGroupId:
          type: string
          description: Groups related events and notifications together within one
            operation
          examples:
          - f47ac10b-58cc-4372-a567-0e02b2c3d479
        message:
          type: string
          description: Short event description
          examples:
          - Bilaga har skapats
        details:
          type: string
          description: Detailed event description
          examples:
          - Filnamn 'abc.pdf'
        owner:
          type: string
          description: Service that created event
          examples:
          - SupportManagement
        created:
          type: string
          format: date-time
          description: Timestamp when the event was created
          examples:
          - 2000-10-31T01:30:00.000+02:00
        historyReference:
          type: string
          description: Reference to the snapshot of data at the time when the event
            was created
          examples:
          - fbe2fb67-005c-4f26-990f-1c95b5f6933e
        sourceType:
          type: string
          description: Source which the event refers to
          examples:
          - errand
        metadata:
          type: array
          items:
            $ref: "#/components/schemas/EventMetaData"
      readOnly: true
    EventMetaData:
      type: object
      description: Event Metadata model
      properties:
        key:
          type: string
          description: The key
          examples:
          - userId
        value:
          type: string
          description: The value
          examples:
          - john123
    EventType:
      type: string
      description: Type of event
      enum:
      - CREATE
      - UPDATE
      - DELETE
      - UNKNOWN
    PageEvent:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        sort:
          $ref: "#/components/schemas/SortObject"
        first:
          type: boolean
        last:
          type: boolean
        numberOfElements:
          type: integer
          format: int32
        pageable:
          $ref: "#/components/schemas/PageableObject"
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: "#/components/schemas/Event"
        number:
          type: integer
          format: int32
        empty:
          type: boolean
    Communication:
      type: object
      properties:
        communicationID:
          type: string
          description: The communication ID
          examples:
          - "12"
        sender:
          type: string
          description: Sender of the communication.
          examples:
          - Test Testsson
        errandNumber:
          type: string
          description: The errand number
          examples:
          - PRH-2022-000001
        direction:
          type: string
          description: If the communication is inbound or outbound from the perspective
            of case-data/e-service.
          enum:
          - INBOUND
          - OUTBOUND
          examples:
          - INBOUND
        messageBody:
          type: string
          description: The message body
          examples:
          - Hello world
        htmlMessageBody:
          type: string
          description: The message body in HTML format
          examples:
          - <p>Hello world</p>
        sent:
          type: string
          format: date-time
          description: The time the communication was sent
          examples:
          - 2020-01-01 12:00:00
        subject:
          type: string
          description: The email-subject of the communication
          examples:
          - Hello world
        communicationType:
          type: string
          description: The communication was delivered by
          enum:
          - SMS
          - EMAIL
          - WEB_MESSAGE
          examples:
          - EMAIL
        target:
          type: string
          description: The mobile number or email adress the communication was sent
            to
          examples:
          - "+46701740605"
        recipients:
          type: array
          description: "The recipients of the communication, if email"
          examples:
          - - kalle.anka@ankeborg.se
          items:
            type: string
        ccRecipients:
          type: array
          description: "The CC recipients of the communication, if email"
          examples:
          - - cc@ankeborg.se
          items:
            type: string
        internal:
          type: boolean
          description: Indicates if the communication is internal
          examples:
          - "false"
        viewed:
          type: boolean
          description: Signal if the communication has been viewed or not
          examples:
          - "true"
        emailHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Headers for keeping track of email conversations
          examples:
          - IN_REPLY_TO:
            - reply-to@example.com
            REFERENCES:
            - reference1
            - reference2
            MESSAGE_ID:
            - "123456789"
        communicationAttachments:
          type: array
          description: List of communicationAttachments on the message
          items:
            $ref: "#/components/schemas/CommunicationAttachment"
    CommunicationAttachment:
      type: object
      properties:
        id:
          type: string
          description: The attachment ID
          examples:
          - aGVsbG8gd29ybGQK
        fileName:
          type: string
          description: The attachment file name
          examples:
          - test.txt
        mimeType:
          type: string
          description: The attachment MIME type
          examples:
          - text/plain
    Attachment:
      type: object
      description: Attachment model
      properties:
        id:
          type: string
          description: Attachment ID
          examples:
          - cb20c51f-fcf3-42c0-b613-de563634a8ec
        fileName:
          type: string
          description: Name of the file
          examples:
          - my-file.txt
        fileSize:
          type: integer
          format: int32
          description: Size of the file in bytes
          examples:
          - 1024
        mimeType:
          type: string
          description: Mime type of the file
        hash:
          type: string
          description: Hash of the file content
          examples:
          - a3b4c5d6e7f8...
        created:
          type: string
          format: date-time
          description: The attachment created date
          examples:
          - 2023-01-01T00:00:00+01:00
    Message:
      type: object
      description: Message model
      properties:
        id:
          type: string
          description: Message ID
          examples:
          - 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
        inReplyToMessageId:
          type: string
          description: The ID of the replied message
          examples:
          - 1aefbbb8-de82-414b-b5d7-ba7c5bbe4506
        created:
          type: string
          format: date-time
          description: The timestamp when the message was created.
          examples:
          - 2023-01-01T12:00:00
        createdBy:
          $ref: "#/components/schemas/Identifier"
          description: The participant who created the message.
        content:
          type: string
          description: The content of the message.
          examples:
          - "Hello, how can I help you?"
        readBy:
          type: array
          items:
            $ref: "#/components/schemas/ReadBy"
            description: A list of users who have read the message.
        attachments:
          type: array
          items:
            $ref: "#/components/schemas/Attachment"
            description: A list of attachments associated with the message.
        type:
          type: string
          description: Type of message (user or system created)
          enum:
          - USER_CREATED
          - SYSTEM_CREATED
          examples:
          - USER_CREATED
          readOnly: true
    PageMessage:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        sort:
          $ref: "#/components/schemas/SortObject"
        first:
          type: boolean
        last:
          type: boolean
        numberOfElements:
          type: integer
          format: int32
        pageable:
          $ref: "#/components/schemas/PageableObject"
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: "#/components/schemas/Message"
        number:
          type: integer
          format: int32
        empty:
          type: boolean
    ReadBy:
      type: object
      description: Readby model
      properties:
        identifier:
          $ref: "#/components/schemas/Identifier"
          description: The identifier of the person who read the message.
          examples:
          - joe01doe
        readAt:
          type: string
          format: date-time
          description: The timestamp when the message was read.
          examples:
          - 2023-01-01T12:00:00+01:00
    ConversationReadByCount:
      type: object
      description: Read-by statistics for a conversation
      properties:
        conversationId:
          type: string
          description: The unique identifier of the conversation
          example: 2af1002e-008f-4bdc-924b-daaae31f1118
          readOnly: true
        messageCount:
          type: integer
          format: int32
          description: Total number of messages in the conversation
          readOnly: true
        readByCount:
          type: array
          description: Per-identifier read count
          items:
            $ref: "#/components/schemas/ReadByCountEntry"
          readOnly: true
        readByPartCount:
          type: array
          description: Per-part read count
          items:
            $ref: "#/components/schemas/PartReadByCountEntry"
          readOnly: true
    PartReadByCountEntry:
      type: object
      description: Read count for a specific part
      properties:
        part:
          type: string
          description: The part that read the messages
          example: KC-23010001
        count:
          type: integer
          format: int32
          description: Number of messages read by this part
    ReadByCountEntry:
      type: object
      description: Read count for a specific identifier
      properties:
        identifier:
          $ref: "#/components/schemas/Identifier"
          description: The identifier that read the messages
        count:
          type: integer
          format: int32
          description: Number of messages read by this identifier
    ErrandAttachment:
      type: object
      description: ErrandAttachment model
      properties:
        id:
          type: string
          description: Unique identifier for the attachment
          examples:
          - cb20c51f-fcf3-42c0-b613-de563634a8ec
          readOnly: true
        fileName:
          type: string
          description: Name of the file
          examples:
          - my-file.txt
        mimeType:
          type: string
          description: Mime type of the file
          readOnly: true
        channel:
          type:
          - string
          - "null"
          description: The channel the attachment was received via
          enum:
          - EMAIL
          - ESERVICE
          - WEB_UI
          - MY_PAGES
          examples:
          - EMAIL
        created:
          type: string
          format: date-time
          description: The attachment created date
          examples:
          - 2023-01-01T00:00:00Z
        hash:
          type: string
          description: SHA-256 hash (hex encoded) of the attachment's raw content
          examples:
          - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
          readOnly: true
    CountResponse:
      type: object
      properties:
        count:
          type: integer
          format: int64
  securitySchemes: {}
