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

# Validate Ticket Relations

> Validate proposed ticket relations without saving them.

Returns a result per source ticket indicating whether the relation is valid.
NsApiSlow threshold: 5000 ms.
<para />## Experimental: ## This method is experimental, subject to change, and not intended for partners.



## OpenAPI

````yaml /openapi/agent/openapi-v3-TicketAgent.json post /api/v1/Agents/Ticket/ValidateTicketRelations
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - TicketAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/Ticket/ValidateTicketRelations:
    post:
      tags:
        - Ticket_Agent
      summary: Validate Ticket Relations
      description: "Validate proposed ticket relations without saving them.\n\nReturns a result per source ticket indicating whether the relation is valid.\r\nNsApiSlow threshold: 5000 ms.\r\n<para />## Experimental: ## This method is experimental, subject to change, and not intended for partners."
      operationId: v1TicketAgent_ValidateTicketRelations
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ValidateTicketRelationsRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ValidateTicketRelationsRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ValidateTicketRelationsRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ValidateTicketRelationsRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ValidateTicketRelationsRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ValidateTicketRelationsRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.ValidateTicketRelationsRequest
        description: SourceTicketIds, DestinationTicketId, RelationType
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            text/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            application/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            text/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            application/json-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
            application/merge-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.TicketRelationResult
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.TicketCarriers.ValidateTicketRelationsRequest:
      description: >-
        ValidateTicketRelations: Validate proposed ticket relations without
        saving them. Returns a result per source ticket indicating whether the
        relation is valid.
      type: object
      properties:
        SourceTicketIds:
          type: array
          items:
            format: int32
            type: integer
        DestinationTicketId:
          format: int32
          type: integer
        RelationType:
          enum:
            - Related
            - Parent
            - Child
          type: string
    SuperOffice.CRM.Services.TicketRelationResult:
      description: "Result of a ticket relation operation, indicating success or the reason for failure.\r\n<para />\r\nCarrier object for TicketRelationResult.\r\nServices for the TicketRelationResult Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.ITicketAgent\">Ticket Agent</see>."
      type: object
      properties:
        SourceTicketId:
          format: int32
          description: The id of the source ticket this result applies to.
          type: integer
        IsValid:
          description: True if the operation succeeded; false if it failed.
          type: boolean
        RelationError:
          description: The reason the operation failed, if IsValid is false.
          enum:
            - ParentExists
            - RelationExists
            - SameTicket
          type: string
        ErrorMessage:
          description: >-
            Error message describing why the operation failed, if IsValid is
            false.
          type: string

````

## Related topics

- [Validate Ticket Relation Definition](/en/api/reference/restful/agent/list_agent/validate-ticket-relation-definition.md)
- [SuperOffice.WebApi.Data.Ticket ValidateTicketRelationsRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Ticket_ValidateTicketRelationsRequest.md)
- [SuperOffice.WebApi.Data.List ValidateTicketRelationDefinitionRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.List_ValidateTicketRelationDefinitionRequest.md)
- [SuperOffice.WebApi.Agents.TicketAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.TicketAgent.md)
- [SuperOffice.WebApi.Agents.ITicketAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ITicketAgent.md)
- [SuperOffice.WebApi.Agents.IListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IListAgent.md)
