:doc:`Textract <../../textract>` / Client / get_lending_analysis_summary

****************************
get_lending_analysis_summary
****************************



.. py:method:: Textract.Client.get_lending_analysis_summary(**kwargs)

  

  Gets summarized results for the ``StartLendingAnalysis`` operation, which analyzes text in a lending document. The returned summary consists of information about documents grouped together by a common document type. Information like detected signatures, page numbers, and split documents is returned with respect to the type of grouped document.

   

  You start asynchronous text analysis by calling ``StartLendingAnalysis``, which returns a job identifier ( ``JobId``). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to ``StartLendingAnalysis``.

   

  To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call ``GetLendingAnalysisSummary``, and pass the job identifier ( ``JobId``) from the initial call to ``StartLendingAnalysis``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetLendingAnalysisSummary>`_  


  **Request Syntax**
  ::

    response = client.get_lending_analysis_summary(
        JobId='string'
    )
    
  :type JobId: string
  :param JobId: **[REQUIRED]** 

    A unique identifier for the lending or text-detection job. The ``JobId`` is returned from StartLendingAnalysis. A ``JobId`` value is only valid for 7 days.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'DocumentMetadata': {
              'Pages': 123
          },
          'JobStatus': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED'|'PARTIAL_SUCCESS',
          'Summary': {
              'DocumentGroups': [
                  {
                      'Type': 'string',
                      'SplitDocuments': [
                          {
                              'Index': 123,
                              'Pages': [
                                  123,
                              ]
                          },
                      ],
                      'DetectedSignatures': [
                          {
                              'Page': 123
                          },
                      ],
                      'UndetectedSignatures': [
                          {
                              'Page': 123
                          },
                      ]
                  },
              ],
              'UndetectedDocumentTypes': [
                  'string',
              ]
          },
          'Warnings': [
              {
                  'ErrorCode': 'string',
                  'Pages': [
                      123,
                  ]
              },
          ],
          'StatusMessage': 'string',
          'AnalyzeLendingModelVersion': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DocumentMetadata** *(dict) --* 

        Information about the input document.

        
        

        - **Pages** *(integer) --* 

          The number of pages that are detected in the document.

          
    
      

      - **JobStatus** *(string) --* 

        The current status of the lending analysis job.

        
      

      - **Summary** *(dict) --* 

        Contains summary information for documents grouped by type.

        
        

        - **DocumentGroups** *(list) --* 

          Contains an array of all DocumentGroup objects.

          
          

          - *(dict) --* 

            Summary information about documents grouped by the same document type.

            
            

            - **Type** *(string) --* 

              The type of document that Amazon Textract has detected. See `Analyze Lending Response Objects <https://docs.aws.amazon.com/textract/latest/dg/lending-response-objects.html>`__ for a list of all types returned by Textract.

              
            

            - **SplitDocuments** *(list) --* 

              An array that contains information about the pages of a document, defined by logical boundary.

              
              

              - *(dict) --* 

                Contains information about the pages of a document, defined by logical boundary.

                
                

                - **Index** *(integer) --* 

                  The index for a given document in a DocumentGroup of a specific Type.

                  
                

                - **Pages** *(list) --* 

                  An array of page numbers for a for a given document, ordered by logical boundary.

                  
                  

                  - *(integer) --* 
              
            
          
            

            - **DetectedSignatures** *(list) --* 

              A list of the detected signatures found in a document group.

              
              

              - *(dict) --* 

                A structure that holds information regarding a detected signature on a page.

                
                

                - **Page** *(integer) --* 

                  The page a detected signature was found on.

                  
            
          
            

            - **UndetectedSignatures** *(list) --* 

              A list of any expected signatures not found in a document group.

              
              

              - *(dict) --* 

                A structure containing information about an undetected signature on a page where it was expected but not found.

                
                

                - **Page** *(integer) --* 

                  The page where a signature was expected but not found.

                  
            
          
        
      
        

        - **UndetectedDocumentTypes** *(list) --* 

          UndetectedDocumentTypes.

          
          

          - *(string) --* 
      
    
      

      - **Warnings** *(list) --* 

        A list of warnings that occurred during the lending analysis operation.

        
        

        - *(dict) --* 

          A warning about an issue that occurred during asynchronous text analysis (  StartDocumentAnalysis) or asynchronous document text detection (  StartDocumentTextDetection).

          
          

          - **ErrorCode** *(string) --* 

            The error code for the warning.

            
          

          - **Pages** *(list) --* 

            A list of the pages that the warning applies to.

            
            

            - *(integer) --* 
        
      
    
      

      - **StatusMessage** *(string) --* 

        Returns if the lending analysis could not be completed. Contains explanation for what error occurred.

        
      

      - **AnalyzeLendingModelVersion** *(string) --* 

        The current model version of the Analyze Lending API.

        
  
  **Exceptions**
  
  *   :py:class:`Textract.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`Textract.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Textract.Client.exceptions.ProvisionedThroughputExceededException`

  
  *   :py:class:`Textract.Client.exceptions.InvalidJobIdException`

  
  *   :py:class:`Textract.Client.exceptions.InternalServerError`

  
  *   :py:class:`Textract.Client.exceptions.ThrottlingException`

  
  *   :py:class:`Textract.Client.exceptions.InvalidS3ObjectException`

  
  *   :py:class:`Textract.Client.exceptions.InvalidKMSKeyException`

  