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

# Consulta Datalake Hot Storage

> Retorna processos atrelados a consulta histórica



## OpenAPI

````yaml POST /lawsuits
openapi: 3.0.0
info:
  title: JUDIT - Lawsuits API
  version: v1.28.8
servers: []
security: []
paths:
  /lawsuits:
    post:
      tags:
        - Processos
      summary: Buscar processos
      description: >-
        Executa busca de processos conforme critérios de pesquisa no corpo da
        requisição.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Lawsuits.Body.Post'
            example:
              search:
                search_type: cpf
                search_key: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lawsuits.Response.Post'
        '401':
          description: Unauthorized - Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpUnauthorizedError'
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpForbiddenError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpInternalServerError'
      security:
        - jwtAuth: []
        - apiKeyAuth: []
components:
  schemas:
    Lawsuits.Body.Post:
      type: object
      properties:
        search:
          type: object
          properties:
            search_type:
              type: string
              enum:
                - cpf
                - cnpj
                - oab
                - name
                - rji
                - lawsuit_cnj
                - lawsuit_attachment
                - execution_attachment
                - custom
            search_key:
              type: string
            search_name:
              type: string
            response_type:
              default: lawsuits
              anyOf:
                - type: string
                  enum:
                    - application_error
                    - application_warning
                    - application_info
                - type: string
                  enum:
                    - lawsuits
                - type: string
                  enum:
                    - lawsuit
                - type: string
                  enum:
                    - warrant
                    - execution
                - type: string
                  enum:
                    - entity
                - type: string
                  enum:
                    - summary
                - type: string
                  enum:
                    - sanction
                - type: string
                  enum:
                    - synthetic_lawsuits
                - type: string
                  enum:
                    - communication
            search_params:
              type: object
              properties:
                lawsuit_instance:
                  type: number
                filter:
                  type: object
                  properties:
                    side:
                      type: string
                      enum:
                        - Passive
                        - Active
                        - Interested
                        - Unknown
                    party_names:
                      type: array
                      items:
                        type: string
                    party_documents:
                      type: array
                      items:
                        type: string
                    distribution_date_gte:
                      type: string
                      format: date-time
                    distribution_date_lte:
                      type: string
                      format: date-time
                    last_step_date_gte:
                      type: string
                      format: date-time
                    last_step_date_lte:
                      type: string
                      format: date-time
                    tribunals:
                      type: object
                      properties:
                        keys:
                          type: array
                          items:
                            type: string
                        not_equal:
                          type: boolean
                      required:
                        - keys
                        - not_equal
                    classification_codes:
                      type: object
                      properties:
                        keys:
                          type: array
                          items:
                            type: string
                        not_equal:
                          type: boolean
                      required:
                        - keys
                        - not_equal
                    classification_names:
                      type: object
                      properties:
                        keys:
                          type: array
                          items:
                            type: string
                        not_equal:
                          type: boolean
                      required:
                        - keys
                        - not_equal
                    subject_codes:
                      type: object
                      properties:
                        contains:
                          type: array
                          items:
                            type: string
                        not_contains:
                          type: array
                          items:
                            type: string
                      required:
                        - contains
                        - not_contains
                    subject_names:
                      type: object
                      properties:
                        contains:
                          type: array
                          items:
                            type: string
                        not_contains:
                          type: array
                          items:
                            type: string
                      required:
                        - contains
                        - not_contains
                    amount_lte:
                      type: number
                    amount_gte:
                      type: number
            lawsuit_list:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  instance:
                    type: number
                required:
                  - code
                  - instance
          required:
            - search_type
            - search_key
      required:
        - search
    Lawsuits.Response.Post:
      type: object
      properties:
        has_lawsuits:
          type: boolean
        request_id:
          type: string
        lawsuits:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              instance:
                type: number
              name:
                type: string
              free_justice:
                type: boolean
              secrecy_level:
                type: number
              courts:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    date:
                      type: string
                      format: date-time
                    name:
                      type: string
              tribunal_acronym:
                type: string
              county:
                type: string
              state:
                type: string
              city:
                type: string
              judge:
                type: string
              distribution_date:
                type: string
                format: date-time
              last_step:
                type: object
                properties:
                  lawsuit_cnj:
                    type: string
                  lawsuit_instance:
                    type: number
                  step_id:
                    type: string
                  step_date:
                    type: string
                    format: date-time
                  content:
                    type: string
                  step_type:
                    type: string
                  attachment_url:
                    type: string
                  attachment_extension:
                    type: string
                  private:
                    type: boolean
                  source_name:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  tags:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                        - type: string
                          format: date-time
                        - {}
                  steps_count:
                    type: number
                required:
                  - lawsuit_cnj
                  - lawsuit_instance
                  - step_id
                  - private
              main_lawsuit:
                type: object
                properties:
                  code:
                    type: string
                  instance:
                    type: number
                  name:
                    type: string
                  classification:
                    type: object
                    properties:
                      code:
                        type: string
                      date:
                        type: string
                        format: date-time
                      name:
                        type: string
                  tags:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                        - type: string
                          format: date-time
                        - {}
                required:
                  - code
                  - instance
              tags:
                type: object
                additionalProperties:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: string
                      format: date-time
                    - {}
              justice:
                type: string
              justice_description:
                type: string
              tribunal:
                type: string
              crawler:
                type: object
                properties:
                  source_name:
                    type: string
                  crawl_id:
                    type: string
                  updated_at:
                    type: string
                    format: date-time
                  weight:
                    type: number
                required:
                  - source_name
                  - crawl_id
                  - weight
              status:
                type: string
              phase:
                type: string
              phase_history:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    phase_date:
                      type: string
                      format: date-time
                    step_id:
                      type: string
                  required:
                    - name
              sentence:
                type: object
                properties:
                  sentence_type:
                    type: string
                  sentence_date:
                    type: string
                    format: date-time
                  step_id:
                    type: string
                required:
                  - sentence_type
              appeal_judgement:
                type: object
                properties:
                  appeal_judgement_type:
                    type: string
                  appeal_judgement_date:
                    type: string
                    format: date-time
                  step_id:
                    type: string
                required:
                  - appeal_judgement_type
              custody:
                type: object
                properties:
                  custody_type:
                    type: string
                  custody_date:
                    type: string
                    format: date-time
                  step_id:
                    type: string
                required:
                  - custody_type
              appeal:
                type: object
                properties:
                  appeal_date:
                    type: string
                    format: date-time
                  step_id:
                    type: string
              distribution:
                type: object
                properties:
                  distribution_type:
                    type: string
                  distribution_date:
                    type: string
                    format: date-time
                  step_id:
                    type: string
                required:
                  - distribution_type
              situation:
                type: string
              area:
                type: string
              metadata:
                type: object
                additionalProperties: {}
              system:
                type: string
              tribunal_url:
                type: string
              created_at:
                type: string
                format: date-time
              updated_at:
                type: string
                format: date-time
              pipelines:
                default: []
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      enum:
                        - data_completeness
                        - normalizer
                        - homonymous_treatment
                    version:
                      type: number
                    updated_at:
                      type: string
                      format: date-time
                  required:
                    - name
                    - version
              full_lawsuit_file:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - done
                      - pending
                  updated_at:
                    type: string
                    format: date-time
                required:
                  - status
              amount:
                type: number
              classifications:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    local_code:
                      type: string
                    date:
                      type: string
                      format: date-time
                    name:
                      type: string
              subjects:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    local_code:
                      type: string
                    date:
                      type: string
                      format: date-time
                    name:
                      type: string
              parties:
                type: array
                items:
                  type: object
                  properties:
                    entity_id:
                      type: string
                    entity_type:
                      type: string
                      enum:
                        - person
                        - company
                    name:
                      type: string
                    social_name:
                      type: string
                    main_document:
                      type: string
                    documents:
                      default: []
                      type: array
                      items:
                        type: object
                        properties:
                          document:
                            type: string
                          document_type:
                            type: string
                            enum:
                              - cpf
                              - cnpj
                              - ie
                              - im
                              - rg
                              - oab
                              - rji
                              - other
                    addresses:
                      default: []
                      type: array
                      items:
                        type: object
                        properties:
                          street:
                            type: string
                          number:
                            type: string
                          complement:
                            type: string
                          neighborhood:
                            type: string
                          city:
                            type: string
                          state:
                            type: string
                            enum:
                              - AC
                              - AL
                              - AP
                              - AM
                              - BA
                              - CE
                              - DF
                              - ES
                              - GO
                              - MA
                              - MT
                              - MS
                              - MG
                              - PA
                              - PB
                              - PR
                              - PE
                              - PI
                              - RJ
                              - RN
                              - RS
                              - RO
                              - RR
                              - SC
                              - SP
                              - SE
                              - TO
                              - XX
                          zip_code:
                            type: string
                          ibge_code:
                            type: number
                          country:
                            type: string
                    contacts:
                      default: []
                      type: array
                      items:
                        type: object
                        properties:
                          contact_type:
                            type: string
                            enum:
                              - email
                              - phone
                              - other
                          description:
                            type: string
                        required:
                          - contact_type
                    aka_names:
                      default: []
                      type: array
                      items:
                        type: string
                    parents:
                      default: []
                      type: array
                      items:
                        type: object
                        properties:
                          entity_id:
                            type: string
                          name:
                            type: string
                          kinship:
                            type: string
                            enum:
                              - father
                              - mother
                              - brother
                              - sister
                              - son
                              - daughter
                              - grandparent
                              - grandma
                              - cousin
                              - uncle
                              - other
                    birth_date:
                      type: string
                      format: date-time
                    place_of_birth:
                      type: string
                    nationality:
                      type: string
                    regime:
                      type: string
                    gender:
                      type: string
                      enum:
                        - male
                        - female
                    ethnicity:
                      type: string
                    tags:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: string
                            format: date-time
                          - {}
                    latest_searches:
                      default: []
                      type: array
                      items:
                        type: object
                        properties:
                          search_type:
                            type: string
                            enum:
                              - cpf
                              - cnpj
                              - oab
                              - name
                              - rji
                              - lawsuit_cnj
                              - lawsuit_attachment
                              - execution_attachment
                              - custom
                          updated_at:
                            type: string
                            format: date-time
                        required:
                          - search_type
                    legal_nature:
                      type: object
                      properties:
                        code:
                          type: string
                        name:
                          type: string
                        active:
                          type: boolean
                      required:
                        - code
                        - name
                        - active
                    head_office:
                      type: boolean
                    branch_activities:
                      default: []
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          main_activity:
                            type: boolean
                          tree_history:
                            type: string
                          active:
                            type: boolean
                        required:
                          - code
                          - name
                          - main_activity
                          - tree_history
                          - active
                    position:
                      type: string
                    profession:
                      type: string
                    size:
                      type: string
                    is_public:
                      type: boolean
                    closing_date:
                      type: string
                      format: date-time
                    disabled_person:
                      type: boolean
                    deficiency:
                      type: string
                    revenue_service_updated_at:
                      type: string
                      format: date-time
                    revenue_service_active:
                      type: boolean
                    revenue_service_status:
                      type: string
                    share_capital:
                      type: number
                    special_status:
                      type: string
                    special_status_date:
                      type: string
                      format: date-time
                    responsible_qualification_id:
                      type: string
                    age_group:
                      type: string
                    pep:
                      default: []
                      type: array
                      items:
                        type: object
                        properties:
                          function:
                            type: string
                          function_acronym:
                            type: string
                          organ_name:
                            type: string
                          start_date:
                            type: string
                            format: date-time
                          end_date:
                            type: string
                            format: date-time
                          grace_period_end:
                            type: string
                            format: date-time
                    entry_date:
                      type: string
                      format: date-time
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    partners: {}
                    associated_people: {}
                    person_type:
                      type: string
                    side:
                      type: string
                      enum:
                        - Passive
                        - Active
                        - Interested
                        - Unknown
                    lawyers:
                      type: array
                      items:
                        type: object
                        properties:
                          entity_id:
                            type: string
                          entity_type:
                            type: string
                            enum:
                              - person
                              - company
                          name:
                            type: string
                          social_name:
                            type: string
                          main_document:
                            type: string
                          documents:
                            default: []
                            type: array
                            items:
                              type: object
                              properties:
                                document:
                                  type: string
                                document_type:
                                  type: string
                                  enum:
                                    - cpf
                                    - cnpj
                                    - ie
                                    - im
                                    - rg
                                    - oab
                                    - rji
                                    - other
                          addresses:
                            default: []
                            type: array
                            items:
                              type: object
                              properties:
                                street:
                                  type: string
                                number:
                                  type: string
                                complement:
                                  type: string
                                neighborhood:
                                  type: string
                                city:
                                  type: string
                                state:
                                  type: string
                                  enum:
                                    - AC
                                    - AL
                                    - AP
                                    - AM
                                    - BA
                                    - CE
                                    - DF
                                    - ES
                                    - GO
                                    - MA
                                    - MT
                                    - MS
                                    - MG
                                    - PA
                                    - PB
                                    - PR
                                    - PE
                                    - PI
                                    - RJ
                                    - RN
                                    - RS
                                    - RO
                                    - RR
                                    - SC
                                    - SP
                                    - SE
                                    - TO
                                    - XX
                                zip_code:
                                  type: string
                                ibge_code:
                                  type: number
                                country:
                                  type: string
                          contacts:
                            default: []
                            type: array
                            items:
                              type: object
                              properties:
                                contact_type:
                                  type: string
                                  enum:
                                    - email
                                    - phone
                                    - other
                                description:
                                  type: string
                              required:
                                - contact_type
                          aka_names:
                            default: []
                            type: array
                            items:
                              type: string
                          parents:
                            default: []
                            type: array
                            items:
                              type: object
                              properties:
                                entity_id:
                                  type: string
                                name:
                                  type: string
                                kinship:
                                  type: string
                                  enum:
                                    - father
                                    - mother
                                    - brother
                                    - sister
                                    - son
                                    - daughter
                                    - grandparent
                                    - grandma
                                    - cousin
                                    - uncle
                                    - other
                          birth_date:
                            type: string
                            format: date-time
                          place_of_birth:
                            type: string
                          nationality:
                            type: string
                          regime:
                            type: string
                          gender:
                            type: string
                            enum:
                              - male
                              - female
                          ethnicity:
                            type: string
                          tags:
                            type: object
                            additionalProperties:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                                - type: string
                                  format: date-time
                                - {}
                          latest_searches:
                            default: []
                            type: array
                            items:
                              type: object
                              properties:
                                search_type:
                                  type: string
                                  enum:
                                    - cpf
                                    - cnpj
                                    - oab
                                    - name
                                    - rji
                                    - lawsuit_cnj
                                    - lawsuit_attachment
                                    - execution_attachment
                                    - custom
                                updated_at:
                                  type: string
                                  format: date-time
                              required:
                                - search_type
                          legal_nature:
                            type: object
                            properties:
                              code:
                                type: string
                              name:
                                type: string
                              active:
                                type: boolean
                            required:
                              - code
                              - name
                              - active
                          head_office:
                            type: boolean
                          branch_activities:
                            default: []
                            type: array
                            items:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                                main_activity:
                                  type: boolean
                                tree_history:
                                  type: string
                                active:
                                  type: boolean
                              required:
                                - code
                                - name
                                - main_activity
                                - tree_history
                                - active
                          position:
                            type: string
                          profession:
                            type: string
                          size:
                            type: string
                          is_public:
                            type: boolean
                          closing_date:
                            type: string
                            format: date-time
                          disabled_person:
                            type: boolean
                          deficiency:
                            type: string
                          revenue_service_updated_at:
                            type: string
                            format: date-time
                          revenue_service_active:
                            type: boolean
                          revenue_service_status:
                            type: string
                          share_capital:
                            type: number
                          special_status:
                            type: string
                          special_status_date:
                            type: string
                            format: date-time
                          responsible_qualification_id:
                            type: string
                          age_group:
                            type: string
                          pep:
                            default: []
                            type: array
                            items:
                              type: object
                              properties:
                                function:
                                  type: string
                                function_acronym:
                                  type: string
                                organ_name:
                                  type: string
                                start_date:
                                  type: string
                                  format: date-time
                                end_date:
                                  type: string
                                  format: date-time
                                grace_period_end:
                                  type: string
                                  format: date-time
                          entry_date:
                            type: string
                            format: date-time
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          partners: {}
                          associated_people: {}
                    was_inferred:
                      type: boolean
                  required:
                    - side
              attachments:
                type: array
                items:
                  type: object
                  properties:
                    attachment_id:
                      type: string
                    attachment_type:
                      type: string
                    attachment_name:
                      type: string
                    step_id:
                      type: string
                    content:
                      type: string
                    private:
                      type: boolean
                    extension:
                      type: string
                    tags:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: string
                            format: date-time
                          - {}
                    status:
                      type: string
                      enum:
                        - done
                        - pending
                    attachment_date:
                      type: string
                      format: date-time
                    corrupted:
                      type: boolean
                    user_data:
                      type: object
                      additionalProperties:
                        type: string
                  required:
                    - attachment_id
                    - status
              related_lawsuits:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                    instance:
                      type: number
                    name:
                      type: string
                    classification:
                      type: object
                      properties:
                        code:
                          type: string
                        date:
                          type: string
                          format: date-time
                        name:
                          type: string
                    tags:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: string
                            format: date-time
                          - {}
                  required:
                    - code
                    - instance
              steps:
                type: array
                items:
                  type: object
                  properties:
                    lawsuit_cnj:
                      type: string
                    lawsuit_instance:
                      type: number
                    step_id:
                      type: string
                    step_date:
                      type: string
                      format: date-time
                    content:
                      type: string
                    step_type:
                      type: string
                    attachment_url:
                      type: string
                    attachment_extension:
                      type: string
                    private:
                      type: boolean
                    source_name:
                      type: string
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    tags:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: string
                            format: date-time
                          - {}
                  required:
                    - lawsuit_cnj
                    - lawsuit_instance
                    - step_id
                    - private
            required:
              - code
              - instance
              - courts
              - justice
              - tribunal
              - crawler
              - classifications
              - subjects
              - parties
              - attachments
              - related_lawsuits
              - steps
      required:
        - has_lawsuits
        - request_id
        - lawsuits
    HttpUnauthorizedError:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
              example: HttpUnauthorizedError
            message:
              type: string
              example: UNAUTHORIZED
            stack:
              type: string
            data:
              type: string
              example: User must be authenticated
    HttpForbiddenError:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
              example: HttpForbiddenError
            message:
              type: string
              example: FORBIDDEN
            stack:
              type: string
            data:
              type: string
              example: Authenticated user is not authorized
    HttpInternalServerError:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
              example: HttpInternalServerError
            message:
              type: string
              example: INTERNAL_SERVER_ERROR
            stack:
              type: string
            data:
              type: object
              example:
                message: Database connection failed
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Bearer token for authentication
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key
      description: API key for authentication

````