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

# Search



## OpenAPI

````yaml /openapi.json post /search
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /search:
    post:
      tags:
        - search
      summary: Search
      operationId: SearchController_search
      parameters:
        - name: count
          required: false
          in: query
          description: the number of items to return
          schema:
            default: 10
            type: number
        - name: page
          required: false
          in: query
          description: the page to retrieve
          schema:
            default: 1
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchInputBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchOutput'
components:
  schemas:
    SearchInputBody:
      type: object
      properties:
        includeAllBranches:
          type: boolean
          description: >-
            Search all branches regardless of their type and status. false =
            look only at BASE branch
          default: true
        excludeBaseBranch:
          type: boolean
          default: false
        timeZone:
          type: string
          description: >-
            This timezone is used in case no offset is specified in date filters
            values (ex: if 2021-01-01 or 2021-01-01T00:00:00 are provided, the
            timezone option is used to convert it to a UTC date)
          default: UTC
        textSearchDepth:
          type: number
          description: >-
            [EXPERIMENTAL] The number of relations text search filters are
            checked against (exponential impact on performances)
          default: 0
          minimum: 0
          maximum: 3
        entityType:
          type: string
          enum:
            - PAYMENT_METHOD
            - PAYMENT
            - POLICY
            - CUSTOMER
            - ASSET
            - INVOICE
            - DOCUMENT
            - SIGNATURE
            - TENANT
            - PRODUCT
            - QUOTE
            - BROKERAGE_FIRM
            - CLAIM
            - EXTERNAL_SERVICE
            - NOTIFICATION
            - PREMIUM_SCHEDULE
            - CHECK
            - ALERT
            - DISTRIBUTION_REQUEST
            - DEROGATION
            - BROKERAGE_FEE
            - COMMENT
            - CONVERSATION
            - CONVERSATION_MESSAGE
        orderBy:
          $ref: '#/components/schemas/PropertySort'
        fields:
          type: array
          items:
            type: string
        where:
          $ref: '#/components/schemas/LogicalCondition'
      required:
        - entityType
        - where
    SearchOutput:
      type: object
      properties:
        data:
          description: the list of items in the page
          type: array
          items:
            $ref: '#/components/schemas/SearchResultEntity'
        pageInfo:
          description: the page info
          allOf:
            - $ref: '#/components/schemas/ResponsePageInfo'
        totalCount:
          type: number
          description: the total number of items
        currentPage:
          type: number
          description: the current page
        totalPages:
          type: number
          description: the total number of pages
      required:
        - data
        - pageInfo
        - totalCount
        - currentPage
        - totalPages
    PropertySort:
      type: object
      properties:
        property:
          type: string
        direction:
          type: string
          enum:
            - asc
            - desc
      required:
        - property
    LogicalCondition:
      type: object
      properties:
        AND:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/PropertyCondition'
              - $ref: '#/components/schemas/RelationCondition'
              - $ref: '#/components/schemas/LogicalCondition'
              - $ref: '#/components/schemas/FullTextSearchCondition'
        OR:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/PropertyCondition'
              - $ref: '#/components/schemas/RelationCondition'
              - $ref: '#/components/schemas/LogicalCondition'
              - $ref: '#/components/schemas/FullTextSearchCondition'
    SearchResultEntity:
      type: object
      properties:
        id:
          type: string
        entityType:
          type: string
          enum:
            - PAYMENT_METHOD
            - PAYMENT
            - POLICY
            - CUSTOMER
            - ASSET
            - INVOICE
            - DOCUMENT
            - SIGNATURE
            - TENANT
            - PRODUCT
            - QUOTE
            - BROKERAGE_FIRM
            - CLAIM
            - EXTERNAL_SERVICE
            - NOTIFICATION
            - PREMIUM_SCHEDULE
            - CHECK
            - ALERT
            - DISTRIBUTION_REQUEST
            - DEROGATION
            - BROKERAGE_FEE
            - COMMENT
            - CONVERSATION
            - CONVERSATION_MESSAGE
        properties:
          type: array
          items:
            $ref: '#/components/schemas/SearchResultProperty'
        relations:
          type: array
          items:
            $ref: '#/components/schemas/SearchResultRelation'
      required:
        - id
        - entityType
    ResponsePageInfo:
      type: object
      properties:
        first:
          type: boolean
          description: whether this is the first page
        last:
          type: boolean
          description: whether this is the last page
    PropertyCondition:
      type: object
      properties:
        includeAllBranches:
          type: boolean
          description: >-
            Search all branches regardless of their type and status. false =
            look only at BASE branch
          default: true
        excludeBaseBranch:
          type: boolean
          default: false
        timeZone:
          type: string
          description: >-
            This timezone is used in case no offset is specified in date filters
            values (ex: if 2021-01-01 or 2021-01-01T00:00:00 are provided, the
            timezone option is used to convert it to a UTC date)
          default: UTC
        textSearchDepth:
          type: number
          description: >-
            [EXPERIMENTAL] The number of relations text search filters are
            checked against (exponential impact on performances)
          default: 0
          minimum: 0
          maximum: 3
        property:
          type: string
        value:
          oneOf:
            - $ref: '#/components/schemas/OpEquals'
            - $ref: '#/components/schemas/OpGt'
            - $ref: '#/components/schemas/OpLt'
            - $ref: '#/components/schemas/OpGte'
            - $ref: '#/components/schemas/OpLte'
            - $ref: '#/components/schemas/OpContains'
            - $ref: '#/components/schemas/OpStartsWith'
            - $ref: '#/components/schemas/OpEndsWith'
            - $ref: '#/components/schemas/OpIn'
      required:
        - property
        - value
    RelationCondition:
      type: object
      properties:
        includeAllBranches:
          type: boolean
          description: >-
            Search all branches regardless of their type and status. false =
            look only at BASE branch
          default: true
        excludeBaseBranch:
          type: boolean
          default: false
        timeZone:
          type: string
          description: >-
            This timezone is used in case no offset is specified in date filters
            values (ex: if 2021-01-01 or 2021-01-01T00:00:00 are provided, the
            timezone option is used to convert it to a UTC date)
          default: UTC
        textSearchDepth:
          type: number
          description: >-
            [EXPERIMENTAL] The number of relations text search filters are
            checked against (exponential impact on performances)
          default: 0
          minimum: 0
          maximum: 3
        property:
          type: string
        every:
          $ref: '#/components/schemas/LogicalCondition'
        some:
          $ref: '#/components/schemas/LogicalCondition'
        none:
          $ref: '#/components/schemas/LogicalCondition'
        id:
          type: string
      required:
        - property
    FullTextSearchCondition:
      type: object
      properties:
        includeAllBranches:
          type: boolean
          description: >-
            Search all branches regardless of their type and status. false =
            look only at BASE branch
          default: true
        excludeBaseBranch:
          type: boolean
          default: false
        timeZone:
          type: string
          description: >-
            This timezone is used in case no offset is specified in date filters
            values (ex: if 2021-01-01 or 2021-01-01T00:00:00 are provided, the
            timezone option is used to convert it to a UTC date)
          default: UTC
        textSearchDepth:
          type: number
          description: >-
            [EXPERIMENTAL] The number of relations text search filters are
            checked against (exponential impact on performances)
          default: 0
          minimum: 0
          maximum: 3
        property:
          type: string
        everyWords:
          type: array
          items:
            type: string
        someWords:
          type: array
          items:
            type: string
        noneWords:
          type: array
          items:
            type: string
    SearchResultProperty:
      type: object
      properties:
        property:
          type: string
        branchId:
          type: string
        value:
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - format: date-time
              type: string
      required:
        - property
        - value
    SearchResultRelation:
      type: object
      properties:
        property:
          type: string
        branchId:
          type: string
        entity:
          $ref: '#/components/schemas/SearchResultEntity'
      required:
        - property
        - entity
    OpEquals:
      type: object
      properties:
        equals:
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - format: date-time
              type: string
      required:
        - equals
    OpGt:
      type: object
      properties:
        gt:
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - format: date-time
              type: string
      required:
        - gt
    OpLt:
      type: object
      properties:
        lt:
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - format: date-time
              type: string
      required:
        - lt
    OpGte:
      type: object
      properties:
        gte:
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - format: date-time
              type: string
      required:
        - gte
    OpLte:
      type: object
      properties:
        lte:
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - format: date-time
              type: string
      required:
        - lte
    OpContains:
      type: object
      properties:
        contains:
          type: string
      required:
        - contains
    OpStartsWith:
      type: object
      properties:
        startsWith:
          type: string
      required:
        - startsWith
    OpEndsWith:
      type: object
      properties:
        endsWith:
          type: string
      required:
        - endsWith
    OpIn:
      type: object
      properties:
        in:
          type: array
          items:
            oneOf:
              - type: string
              - type: number
              - type: boolean
              - format: date-time
                type: string
      required:
        - in

````