> ## 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.

# Get Tickets

> Get multiple tickets

NsApiSlow threshold: 2000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-TicketAgent.json post /api/v1/Agents/Ticket/GetTickets
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/GetTickets:
    post:
      tags:
        - Ticket_Agent
      summary: Get Tickets
      description: |-
        Get multiple tickets

        NsApiSlow threshold: 2000 ms.
      operationId: v1TicketAgent_GetTickets
      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.GetTicketsRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.GetTicketsRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.GetTicketsRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.GetTicketsRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.GetTicketsRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.GetTicketsRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.TicketCarriers.GetTicketsRequest
        description: TicketIds
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Ticket'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Ticket'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Ticket'
            text/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Ticket'
            application/json-patch+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Ticket'
            application/merge-patch+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SuperOffice.CRM.Services.Ticket'
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.TicketCarriers.GetTicketsRequest:
      description: 'GetTickets: Get multiple tickets'
      type: object
      properties:
        TicketIds:
          type: array
          items:
            format: int32
            type: integer
    SuperOffice.CRM.Services.Ticket:
      description: "The ticket carrier is used for representing a service request.\r\n<para />\r\nCarrier object for Ticket.\r\nServices for the Ticket Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.ITicketAgent\">Ticket Agent</see>."
      type: object
      properties:
        TicketId:
          format: int32
          description: The primary key (auto-incremented)
          type: integer
        Title:
          description: The title of the ticket.
          type: string
        CreatedAt:
          format: date-time
          description: When the ticket was created.
          type: string
        LastChanged:
          format: date-time
          description: The last time the ticket was modified.
          type: string
        ReadByOwner:
          format: date-time
          description: The datetime for when the ticket last was read by the owner.
          type: string
        ReadByCustomer:
          format: date-time
          description: The datetime for when the ticket was read by the customer.
          type: string
        FirstReadByUser:
          format: date-time
          description: The datetime for when the ticket first was read by a user.
          type: string
        Activate:
          format: date-time
          description: When the ticket should be activated, if it is postponed.
          type: string
        ClosedAt:
          format: date-time
          description: When the ticket was closed.
          type: string
        RepliedAt:
          format: date-time
          description: >-
            The datetime for when the ticket was replied to. I.e. the first
            external message added to the ticket.
          type: string
        AlertTimeout:
          format: date-time
          description: >-
            The datetime for when the ticket should jump to the next
            alert_level.
          type: string
        Deadline:
          format: date-time
          description: Deadline for ticket.
          type: string
        CreatedBy:
          format: int32
          description: >-
            The id of the user who created the ticket. 1 (system user) if the
            ticket was created externally
          type: integer
        CreatedByName:
          description: Initials, also login name, possibly database user name
          type: string
        Author:
          description: >-
            A string representing the author of the ticket (same as author of
            first message).
          type: string
        OwnedBy:
          format: int32
          description: >-
            The id of the user who owns the ticket. 1 (system user) if the
            ticket is unassigned.
          type: integer
        OwnedByName:
          description: Initials, also login name, possibly database user name
          type: string
        Category:
          format: int32
          description: The id of the category a ticket is in.
          type: integer
        CategoryName:
          description: The (short) name of this category. E.g. &apos;support&apos;.
          type: string
        CategoryFullname:
          description: >-
            The fullname (compiled from parents&apos; names) for this category.
            E.g. &apos;norway/product A/support&apos;.
          type: string
        Slevel:
          description: The securitylevel of the ticket.
          enum:
            - Unknown
            - Internal
            - External
          type: string
        Priority:
          format: int32
          description: The reference to the ticket_priority table.
          type: integer
        PriorityName:
          description: The name of the priority.
          type: string
        BaseStatus:
          description: The status of the ticket. I.e. active/closed/postponed/deleted
          enum:
            - Unknown
            - Active
            - Closed
            - Postponed
            - Deleted
            - Merged
            - Spam
            - PostponedSpecific
            - Postponed1Hour
            - Postponed2Hours
            - Postponed3Hours
            - Postponed4Hours
            - PostponedDay
            - PostponedWeek
            - PostponedMonth
          type: string
        TicketStatus:
          format: int32
          description: User defined ticket status
          type: integer
        TicketStatusDisplayValue:
          description: Get the display name of the ticket status.
          type: string
        Origin:
          description: What is the origin of this ticket
          enum:
            - Unknown
            - Email
            - SMS
            - Fax
            - Phone
            - Facebook
            - Twitter
            - Internal
            - CustomerCentre
            - EMarketing
            - AutoGenerated
            - Chat
            - Form
            - API
            - Flow
          type: string
        CustId:
          format: int32
          description: >-
            The reference to the customer. NULL or -1 if ticket is not connected
            to customer.
          type: integer
        PersonFirstname:
          description: First name
          type: string
        PersonMiddleName:
          description: Middle name or 'van' etc.
          type: string
        PersonLastname:
          description: Last name
          type: string
        PersonFullname:
          description: Get the full name for the primary person (customer)
          type: string
        AlertLevel:
          format: int32
          description: >-
            The alert level for the ticket. Matches the level value of the
            ticket_alert table.
          type: integer
        ConnectId:
          format: int32
          description: >-
            If a ticket is connected to another ticket, this field is set to the
            id of the &apos;master&apos; ticket.
          type: integer
        ReadStatus:
          description: Whether the owner has read the ticket or not (red, yellow, green).
          enum:
            - Unknown
            - Green
            - Yellow
            - Red
          type: string
        TimeToReply:
          format: int32
          description: >-
            The time (minutes) between when the ticket was created and when it
            was replied to. Calculated based on priority&apos;s timeframe.
          type: integer
        RealTimeToReply:
          format: int32
          description: Same as time_to_reply, but not calculated based on priority.
          type: integer
        TimeToClose:
          format: int32
          description: >-
            The time (minutes) between when the ticket was created and when it
            was closed. Calculated based on priority&apos;s timeframe.
          type: integer
        RealTimeToClose:
          format: int32
          description: Same as time_to_close, but not calculated based on priority.
          type: integer
        TimeSpentInternally:
          format: int32
          description: >-
            The total time (seconds) within the priority's office hours the
            ticket has been in an open status (configurable), not including
            current state
          type: integer
        TimeSpentExternally:
          format: int32
          description: >-
            The total time (seconds) within the priority's office hours the
            ticket has been in a external waiting status (configurable), not
            including current state
          type: integer
        TimeSpentQueue:
          format: int32
          description: >-
            The total time (seconds) within the priority's office hours the
            ticket has been in a queue status, not including current state
          type: integer
        RealTimeSpentInternally:
          format: int32
          description: >-
            The total time (seconds) within 24x7 the ticket has been in an open
            status (configurable), not including current state
          type: integer
        RealTimeSpentExternally:
          format: int32
          description: >-
            The total time (seconds) within 24x7 the ticket has been in a
            external waiting status (configurable), not including current state
          type: integer
        RealTimeSpentQueue:
          format: int32
          description: >-
            The total time (seconds) within 24x7 hours the ticket has been in a
            queue status, not including current state
          type: integer
        TimeSpent:
          format: int32
          description: >-
            The total time (minutes). Aggregated time spent from ticket&apos;s
            messages. Read-only for external use.
          type: integer
        HasAttachment:
          description: Boolean indicating if this ticket has one or more attachments.
          type: boolean
        NumReplies:
          format: int32
          description: The number of replies (messages) to the customer for this request.
          type: integer
        NumMessages:
          format: int32
          description: The total number of messages for this request.
          type: integer
        FromAddress:
          description: The from-address used when this ticket got created, e.g. by email
          type: string
        ContactId:
          format: int32
          description: >-
            The company of the person in the cust_id field, if that person
            belongs to a company
          type: integer
        ContactName:
          description: The name of the connected contact
          type: string
        OwnedByAssociateId:
          format: int32
          description: The associate id of the owner of the ticket.
          type: integer
        Language:
          description: The language of the first external message
          type: string
        Sentiment:
          format: int32
          description: The sentiment index of the last external message
          type: integer
        SentimentConfidence:
          format: int32
          description: The sentiment confidence of the last external message
          type: integer
        SaleId:
          format: int32
          description: Reference to sale table
          type: integer
        ProjectId:
          format: int32
          description: Reference to project table
          type: integer
        SaleHeading:
          description: The heading of the connected sale
          type: string
        ProjectName:
          description: The name of the connected project
          type: string
        FormSubmissionId:
          format: int32
          description: >-
            If this ticket was created from a form submission, this field will
            point to that record
          type: integer
        TicketTypeId:
          format: int32
          description: The id of the Request Type
          type: integer
        TicketTypeName:
          description: The name of the Request Type
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Security.TableRight:
      description: "Wraps a table right together with an explanatory reason.\r\nCode can indicate why access is restricted."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string
    SuperOffice.CRM.Security.FieldProperty:
      description: >-
        Class holding properties like field length, field type about a field in
        the carrier.
      type: object
      properties:
        FieldRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldRight'
        FieldType:
          type: string
        FieldLength:
          format: int32
          description: ''
          type: integer
    SuperOffice.CRM.Security.FieldRight:
      description: "Wraps the field right together with an explanatory reason.\r\nAlso adds logical operators to the field rights so that they can be easily combined."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string

````

## Related topics

- [Get Ticket](/en/api/reference/restful/agent/ticket_agent/get-ticket.md)
- [Get Ticket Entity](/en/api/reference/restful/rest/ticket/get-ticket-entity.md)
- [Get Ticket Message](/en/api/reference/restful/agent/ticket_agent/get-ticket-message.md)
- [Get Ticket Summaries](/en/api/reference/restful/agent/ticket_agent/get-ticket-summaries.md)
- [Get Ticket Attachments](/en/api/reference/restful/agent/ticket_agent/get-ticket-attachments.md)
