# Change Control
# ===============
# Version    Date        Author         Change Description
# 1.0.0      09/08/2024  Kalpana H V    First release of the Trouble Ticket
#                                       Management APIs 
#
# 1.1.0      24/06/2025  Kalpana H V    Added "knownErrors" and "solutions" fields in
#                                       1. Update Ticket API request
#                                       2. Trouble Ticket Status Change Event notification
#                                       3. Trouble Ticket Attribute Value Change Event notification
#                                       4. Trouble Ticket Resolved Event notification
#
# 1.2.0      10/02/2026  Kalpana H V    Changes required for new partner and 
#                                       customer Integration
#                                       1. Added new values for the accepted statuses
#                                          - 'Resolution Accepted'
#                                          - 'Resolution Rejected'
#                                          - 'Restored'
#                                       2. Added new parameter potentialTicketConsent
#                                          to "Update Ticket" request
#                                       3. The customerSiteRef field in the Create Ticket 
#                                          request is now optional
#
# 1.3.0      08/05/2026  Kalpana H V    Updated maxLength limit for name, description and 
#                                       notes.text fields

openapi: 3.0.0
info: 
  title: Ticket Management
  version: 1.3.0
  description: "Service Assurance APIs for managing trouble tickets"
   
  contact: 
    name: Colt Service Assurance #(tbu)
    email: service_assurance@colt.net #(tbu)
    
servers:
  - url: https://apis.colt.net/ticketManagement
    description: Production server 
    
security:
  - OAuth2: []

tags:
  - name: Create Ticket
  - name: Update Ticket
  - name: Asynchronous response (client-side)  
  - name: Notification listeners (client side)

paths:
  /v1/troubleTicket:
    post:
      operationId: createTroubleTicket
      summary: Creates a TroubleTicket
      description: This operation creates a TroubleTicket entity.
      tags:
        - Create Ticket
      parameters:
      - name: x-tracking-id
        in: "header"
        required: true
        description: "Unique identifier for the request"        
        schema:
          $ref: '#/components/schemas/trackingIdTypeV1'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/troubleTicketCreateRequestTypeV1'
      responses:
        '202':
          description: Accepted
          headers:
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                
        "400":
          description: Bad Request
          headers:          
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'              
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "401":
          description: Unauthorized
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "403":
          description: Forbidden
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "404":
          description: Not Found
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "405":
          description: Method Not allowed
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "406":
          description: Not Acceptable
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'                
        "413":
          description: Payload Too Large
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'                 
        "415":
          description: Unsupported Media Type
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1' 
        "429":
          description: Too Many Requests
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'                 
        "500":
          description: Internal Server Error
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'  
        "503":
          description: Service Unavailable
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorTypeV1'  
        "504":
          description: Gateway Timeout
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorTypeV1'             

  /v1/callbackURL:
    post:
      tags:
        - Asynchronous response (client-side)
      parameters:
        - name: x-correlation-id
          in: "header"
          required: true
          description: "Unique identifier for the request"
          schema:
            $ref: '#/components/schemas/trackingIdTypeV1'        
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/asyncResponseTypeV1'           
      responses:
        '202':
          description: |
            Your server implementation should return this HTTP status code
            if the data was received successfully 
        "400":
          description: |
            Your server implementation should return this HTTP status code
            if the data is incorrect
        "401":
          description: |
            Your server implementation should return this HTTP status code
            for authorisation error
        "500":
          description: |
            Your server implementation should return this HTTP status code
            for internal errors
                    
  /v1/troubleTicket/{id}:
    patch:
      operationId: patchTroubleTicket
      summary: Updates partially a TroubleTicket
      description: This operation updates partially a TroubleTicket entity.
      tags:
        - Update Ticket
      parameters:
      - name: x-tracking-id
        in: "header"
        required: true
        description: "Unique identifier for the request"        
        schema:
          $ref: '#/components/schemas/trackingIdTypeV1'      
      - name: id
        in: path
        required: true
        description: Identifier of the TroubleTicket        
        schema: 
          type: string
      requestBody:
        required: true
        description: The TroubleTicket to be updated        
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/troubleTicketUpdateRequestTypeV1'
      responses:
        '202':
          description: Accepted
          headers:
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                
        "400":
          description: Bad Request
          headers:          
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'              
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "401":
          description: Unauthorized
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "403":
          description: Forbidden
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "404":
          description: Not Found
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "405":
          description: Method Not allowed
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'
        "406":
          description: Not Acceptable
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'                
        "413":
          description: Payload Too Large
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'                 
        "415":
          description: Unsupported Media Type
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1' 
        "429":
          description: Too Many Requests
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'                 
        "500":
          description: Internal Server Error
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'                                                  
          content:
            application/json:          
              schema:
                $ref: '#/components/schemas/errorTypeV1'  
        "503":
          description: Service Unavailable
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorTypeV1'  
        "504":
          description: Gateway Timeout
          headers:
            x-exception-system: 
              schema:
                $ref: '#/components/schemas/exceptionSystemTypeV1'
            x-tracking-id:
              description: "Unique identifier for the request"
              schema: 
                $ref: '#/components/schemas/trackingIdTypeV1'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorTypeV1'             

  /v1/listener/troubleTicketCreateEvent:
    post:
      operationId: createTicketEventNotification
      description: >-
        Example of a client listener for receiving the Create Ticket Event Notification
      tags:
        - Notification listeners (client side)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createTicketEventNotificationTypeV1'           
      responses:
        '202':
          description: |
            Your server implementation should return this HTTP status code
            if the data was received successfully 
        "400":
          description: |
            Your server implementation should return this HTTP status code
            if the data is incorrect
        "401":
          description: |
            Your server implementation should return this HTTP status code
            for authorisation error

        "500":
          description: |
            Your server implementation should return this HTTP status code
            for internal errors               

  /v1/listener/troubleTicketStatusChangeEvent:
    post:
      operationId: ticketStatusChangeEventNotification
      description: >-
        Example of a client listener for receiving the Ticket Status Change Event Notification
      tags:
        - Notification listeners (client side)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/statusChangeEventNotificationTypeV1'           
      responses:
        '202':
          description: |
            Your server implementation should return this HTTP status code
            if the data was received successfully 
        "400":
          description: |
            Your server implementation should return this HTTP status code
            if the data is incorrect
        "401":
          description: |
            Your server implementation should return this HTTP status code
            for authorisation error

        "500":
          description: |
            Your server implementation should return this HTTP status code
            for internal errors                 

  /v1/listener/troubleTicketAttributeValueChangeEvent:
    post:
      operationId: ticketAttributeValueChangeEventNotification
      description: >-
        Example of a client listener for receiving the Ticket Attribute Value Change Event Notification
      tags:
        - Notification listeners (client side)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/attributeValueChangeEventNotificationTypeV1'         
      responses:
        '202':
          description: |
            Your server implementation should return this HTTP status code
            if the data was received successfully 
        "400":
          description: |
            Your server implementation should return this HTTP status code
            if the data is incorrect
        "401":
          description: |
            Your server implementation should return this HTTP status code
            for authorisation error

        "500":
          description: |
            Your server implementation should return this HTTP status code
            for internal errors                                 

  /v1/listener/troubleTicketResolvedEvent:
    post:
      operationId: ticketResolvedEventNotification
      description: >-
        Example of a client listener for receiving the Ticket Resolved Event Notification
      tags:
        - Notification listeners (client side)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ticketResolvedEventNotificationTypeV1'          
      responses:
        '202':
          description: |
            Your server implementation should return this HTTP status code
            if the data was received successfully 
        "400":
          description: |
            Your server implementation should return this HTTP status code
            if the data is incorrect
        "401":
          description: |
            Your server implementation should return this HTTP status code
            for authorisation error

        "500":
          description: |
            Your server implementation should return this HTTP status code
            for internal errors                             
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      description: Token URL 
      flows:
        clientCredentials:
          tokenUrl: https://apis.colt.net/authentication/v1/oauth/token
          scopes: {}
          
  schemas:
    attachmentTypeV1:
      type: object
      description: Complements the description of an element (for instance a product) through video, pictures...
      properties:
        content:
          type: string
          description: The actual contents of the attachment object, if embedded, encoded as base64
        name:
          type: string
          description: The name of the attachment
        author:
          $ref: '#/components/schemas/authorTypeV1'
        receiver:
          $ref: '#/components/schemas/receiverTypeV1'
    
    authorTypeV1:
      type: string
      enum:
        - Colt
        - Customer
        - Partner

    receiverTypeV1:
      type: string
      enum:
        - Colt
        - Customer
        - Partner
        - Internal
        - Public
      
    channelTypeV1:
      type: object
      description: The channel to which the resource reference to. e.g. channel for selling product offerings, channel for opening a trouble ticket etc..
      properties:
        id:
          type: string
          description: Unique identifier of a related entity.
          enum:
            - "Customer"
            - "Partner"
      required:
        - id
        
    noteTypeV1:
      type: object
      description: Extra information about a given entity
      properties:
        author:
          $ref: '#/components/schemas/authorTypeV1'
        text:
          type: string          
          maxLength: 2000
          description: Text of the note
        receiver:
          $ref: '#/components/schemas/receiverTypeV1'

    relatedEntityTypeV1:
      type: object
      description: A reference to an entity, where the type of the entity is not known in advance.
      required:
        - id
        - role
      properties:
        id:
          type: string
          description: Unique identifier of a related entity.
        name:
          type: string
          description: Name of the related entity.
        role:
          type: string
          description: The role of an entity.
          enum:
            - 'Service Performance'
            - 'ServiceFault'
            - 'DeviceFault'
            - 'Information'


    relatedPartyTypeV1:
      type: object
      description: Related Entity reference. A related party defines party or party role linked to a specific entity.
      properties:
        partnerName:
          type: string
          description: Unique identifier of a related entity.
        partnerExternalId:
          type: string
          description: Reference of the related entity.
        name:
          type: string
          description: Name of the customer
        externalId:
          type: string
          description: Customer Ticket Id

    troubleTicketCreateRequestTypeV1:
      type: object
      description: |-
        A trouble ticket is a record of an issue that is created, tracked, and managed by a trouble ticket management system
      required:
        - description
        - externalId
        - severity
        - ticketType
        - channel
        - relatedEntity
      properties:
        description:
          $ref: '#/components/schemas/ticketDescriptionTypeV1'
        externalId:
          type: string
          description: Additional identifier coming from an external system
        name:
          type: string
          maxLength: 100
          description: Name of the trouble ticket, typically a short description provided by the user that create the ticket
        severity:
          $ref: '#/components/schemas/severityTypeV1'
        ticketType:
          $ref: '#/components/schemas/ticketTypeV1'
        ticketIssueCategory:
          $ref: '#/components/schemas/ticketIssueCategoryTypeV1'
        attachment:
          type: array
          items:
            $ref: '#/components/schemas/attachmentTypeV1'
        channel:
          $ref: '#/components/schemas/channelTypeV1'
        note:
          type: array
          items:
            $ref: '#/components/schemas/noteTypeV1'
        relatedEntity:
          type: array
          items:
            $ref: '#/components/schemas/relatedEntityTypeV1'
        relatedParty:
          type: array
          items:
            $ref: '#/components/schemas/relatedPartyTypeV1'
        customerSiteRef:
          type: string

    ticketDescriptionTypeV1:
      type: string
      maxLength: 2000
      description: Description of the trouble or issue

    severityTypeV1:
      type: string
      description: |-
        The severity of the issue. Indicate the implication of the issue on the expected functionality.
      enum:
        - '1'
        - '2'
        - '3'
        - '4'

    ticketIssueCategoryTypeV1:
      type: string
      enum:
        - "Service Down"
        - "Service Degrade"

    ticketTypeV1:
      type: string
      description: represent a business type of the trouble ticket 
      enum:
        - 'Service Request'
        - 'Incident'

    troubleTicketUpdateRequestTypeV1:
      type: object
      description: |-
        A trouble ticket is a record of an issue that is created, tracked, and managed by a trouble ticket management system
        Skipped properties: id,href,creationDate,lastUpdate,statusChange,statusChangeDate
      properties:
        channel:
          $ref: '#/components/schemas/channelTypeV1'
        severity:
          $ref: '#/components/schemas/severityTypeV1'
        potentialTicketConsent:
          type: boolean
        status:
          $ref: '#/components/schemas/troubleTicketStatusTypeV1'
        subStatus:
          $ref: '#/components/schemas/troubleTicketSubStatusTypeV1'
        statusChangeReason:
          type: string
          description: The reason for changing the status
        knownErrors:
          type: string
        solutions:
          type: string
        attachment:
          type: array
          items:
            $ref: '#/components/schemas/attachmentTypeV1'
        note:
          type: array
          items:
            $ref: '#/components/schemas/noteTypeV1'
        relatedEntity:
          type: array
          items:
            $ref: '#/components/schemas/relatedEntityTypeV1'
        relatedParty:
          type: array
          items:
            $ref: '#/components/schemas/relatedPartyTypeV1'
            

    troubleTicketStatusTypeV1:
      type: string
      description: Possible values for the status of the trouble ticket
      enum: 
        - 'In Progress'
        - 'Pending'
        - 'Resolved'
        - 'Cancelled'        
        - 'Closed'
        - 'Assigned'
        - 'New'
        - 'Resolution Accepted'
        - 'Resolution Rejected'
        - 'Restored'

    troubleTicketSubStatusTypeV1:
      type: string
      description: Possible values for the sub status of the trouble ticket
      enum: #TBC
        - 'COLT Working'
        - 'OLO Working'
        - 'Waiting for Customer'
        - 'Partner Working'
          
    troubleTicketCreateEventPayloadTypeV1:
      type: object
      description: The event data structure
      properties:
        troubleTicket:
          $ref: '#/components/schemas/troubleTicketTypeV1'
          
    troubleTicketStatusChangePayloadTypeV1:
      type: object
      description: The event data structure
      properties:
        troubleTicket:
          $ref: '#/components/schemas/troubleTicketStatusUpdateTypeV1'

    troubleTicketAttributeValueChangePayloadTypeV1:
      type: object
      description: The event data structure
      properties:
        troubleTicket:
          $ref: '#/components/schemas/troubleTicketAttributeValueChangeTypeV1'

    troubleTicketResolvedPayloadTypeV1:
      type: object
      description: The event data structure
      properties:
        troubleTicket:
          $ref: '#/components/schemas/troubleTicketResolvedTypeV1'

    trackingIdTypeV1: 
      type: string
      description: "Unique identifier for the request"
      example: abcd456e-d45645-dfaafda-1232345667dd
      pattern: "^[a-zA-Z0-9_.~:@-]{1,255}$"
      maxLength: 255
              
    exceptionSystemTypeV1:
      type: string
      enum:
        - 'APIGW'
        - 'ESB'
        - 'CRM'

    errorTypeV1:
      description: 'Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)'
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/errorContentTypeV1'
          
    errorContentTypeV1:
      description: 'Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)'
      type: object
      required:
        - code
        - reason
      properties:
        code:
          type: string
          description: 'Application relevant detail, defined in the API or a common list.'
          example: ERR01
        reason:
          type: string
          description: Explanation of the reason for the error which can be shown to a client user.
        message:
          type: string
          description: More details and corrective actions related to the error which can be shown to a client user.
        partnerExternalId:
          type: string
          description: Reference of the related entity.
        externalId:
          type: string
          description: Customer Ticket Id          
          
    asyncResponseTypeV1old:
      type: object
      properties:
        acknowledgmentId:
          type: string
        id:
          type: string      
          description: Identifier of the TroubleTicket        
        creationDate:
          $ref: '#/components/schemas/dateTimeFormatV1'
        status:
          $ref: '#/components/schemas/troubleTicketStatusTypeV1'
          
          
    asyncResponseTypeV1:
      type: object
      properties:      
        requestStatus:
          $ref: '#/components/schemas/requestStatusTypeV1'
        ticket:
          $ref: '#/components/schemas/asyncTicketTypeV1'
        error:
          $ref: '#/components/schemas/errorContentTypeV1'          
    
    requestStatusTypeV1:
      type: string
      enum:
        - "Success"
        - "Failure"
        
    asyncTicketTypeV1:
      type: object
      properties:
        id:
          type: string      
          description: Identifier of the TroubleTicket        
        creationDate:
          $ref: '#/components/schemas/dateTimeFormatV1'
        status:
          $ref: '#/components/schemas/troubleTicketStatusTypeV1'
        relatedParty:
          type: array
          items:
            $ref: '#/components/schemas/relatedPartyTypeV1'         
    
    troubleTicketTypeV1:
      type: object
      properties:
        id:
          type: string      
          description: Identifier of the TroubleTicket        
        description:
          $ref: '#/components/schemas/ticketDescriptionTypeV1'
        name:
          type: string
          description: Name of the trouble ticket, typically a short description provided by the user that create the ticket
        severity:
          $ref: '#/components/schemas/severityTypeV1'
        creationDate:
          $ref: '#/components/schemas/dateTimeFormatV1'
        ticketOriginator:
          type: string
        status:
          $ref: '#/components/schemas/troubleTicketStatusTypeV1'
        subStatus:
          $ref: '#/components/schemas/troubleTicketSubStatusTypeV1'
        statusChangeReason:
          type: string
          description: The reason for changing the status          
        ticketType:
          $ref: '#/components/schemas/ticketTypeV1'
        ticketIssueCategory:
          $ref: '#/components/schemas/ticketIssueCategoryTypeV1'
        attachment:
          type: array
          items:
            $ref: '#/components/schemas/attachmentTypeV1'
        note:
          type: array
          items:
            $ref: '#/components/schemas/noteTypeV1'
        relatedEntity:
          type: array
          items:
            $ref: '#/components/schemas/relatedEntityTypeV1'
        relatedParty:
          type: array
          items:
            $ref: '#/components/schemas/relatedPartyTypeV1'
        customerSiteRef:
          type: string
        
    troubleTicketStatusUpdateTypeV1:
      type: object
      properties:
        id:
          type: string      
          description: Identifier of the TroubleTicket        
        description:
          $ref: '#/components/schemas/ticketDescriptionTypeV1'
        name:
          type: string
          description: Name of the trouble ticket, typically a short description provided by the user that create the ticket
        creationDate:
          $ref: '#/components/schemas/dateTimeFormatV1'
        ticketOriginator:
          type: string
        ticketType:
          $ref: '#/components/schemas/ticketTypeV1'
        relatedParty:
          type: array
          items:
            $ref: '#/components/schemas/relatedPartyTypeV1'
        status:
          $ref: '#/components/schemas/troubleTicketStatusTypeV1'
        subStatus:
          $ref: '#/components/schemas/troubleTicketSubStatusTypeV1'
        statusChangeReason:
          type: string
          description: The reason for changing the status
        knownErrors:
          type: string
        solutions:
          type: string          

    troubleTicketAttributeValueChangeTypeV1:
      type: object
      properties:
        id:
          type: string      
          description: Identifier of the TroubleTicket        
        description:
          $ref: '#/components/schemas/ticketDescriptionTypeV1'
        name:
          type: string
          description: Name of the trouble ticket, typically a short description provided by the user that create the ticket
        creationDate:
          $ref: '#/components/schemas/dateTimeFormatV1'
        ticketOriginator:
          type: string
        status:
          $ref: '#/components/schemas/troubleTicketStatusTypeV1'
        subStatus:
          $ref: '#/components/schemas/troubleTicketSubStatusTypeV1'
        statusChangeReason:
          type: string
          description: The reason for changing the status
        knownErrors:
          type: string
        solutions:
          type: string          
        ticketType:
          $ref: '#/components/schemas/ticketTypeV1'
        attachment:
          type: array
          items:
            $ref: '#/components/schemas/attachmentTypeV1'
        note:
          type: array
          items:
            $ref: '#/components/schemas/noteTypeV1'
        relatedEntity:
          type: array
          items:
            $ref: '#/components/schemas/relatedEntityTypeV1'
        relatedParty:
          type: array
          items:
            $ref: '#/components/schemas/relatedPartyTypeV1'          

    troubleTicketResolvedTypeV1:
      type: object
      properties:
        id:
          type: string      
          description: Identifier of the TroubleTicket        
        description:
          $ref: '#/components/schemas/ticketDescriptionTypeV1'
        name:
          type: string
          description: Name of the trouble ticket, typically a short description provided by the user that create the ticket
        creationDate:
          $ref: '#/components/schemas/dateTimeFormatV1'
        ticketOriginator:
          type: string
        ticketType:
          $ref: '#/components/schemas/ticketTypeV1'
        relatedParty:
          type: array
          items:
            $ref: '#/components/schemas/relatedPartyTypeV1'
        status:
          $ref: '#/components/schemas/troubleTicketStatusTypeV1'
        subStatus:
          $ref: '#/components/schemas/troubleTicketSubStatusTypeV1'
        statusChangeReason:
          type: string
          description: The reason for changing the status
        knownErrors:
          type: string
        solutions:
          type: string          
          
    dateTimeFormatV1:
      type: string
      format: dateTime
      example: "2010-01-12T05:23:19+0000"        

    createTicketEventNotificationTypeV1:
      type: object
      description: The notification data structure
      properties:
        eventId:
          type: string
          description: The identifier of the notification.
        eventTime:
          type: string
          format: date-time
          description: Time of the event occurrence.
        eventType:
          type: string
          description: The type of the notification.
          enum:
            - 'Create Ticket Event Notification'
        event:
          $ref: '#/components/schemas/troubleTicketCreateEventPayloadTypeV1'
          
    statusChangeEventNotificationTypeV1:
      type: object
      description: The notification data structure
      properties:
        eventId:
          type: string
          description: The identifier of the notification.
        eventTime:
          type: string
          format: date-time
          description: Time of the event occurrence.
        eventType:
          type: string
          description: The type of the notification.
          enum:
            - 'Ticket Status Change Event Notification'
        event:
          $ref: '#/components/schemas/troubleTicketStatusChangePayloadTypeV1'
              
    attributeValueChangeEventNotificationTypeV1:
      type: object
      description: The notification data structure
      properties:
        eventId:
          type: string
          description: The identifier of the notification.
        eventTime:
          type: string
          format: date-time
          description: Time of the event occurrence.
        eventType:
          type: string
          description: The type of the notification.
          enum:
            - 'Ticket Attribute Value Change Event Notification'
        event:
          $ref: '#/components/schemas/troubleTicketAttributeValueChangePayloadTypeV1'
              
    ticketResolvedEventNotificationTypeV1:
      type: object
      description: The notification data structure
      properties:
        eventId:
          type: string
          description: The identifier of the notification.
        eventTime:
          type: string
          format: date-time
          description: Time of the event occurrence.
        eventType:
          type: string
          description: The type of the notification.
          enum:
            - 'Ticket Resolved Event Notification'
        event:
          $ref: '#/components/schemas/troubleTicketResolvedPayloadTypeV1'
              
            