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

# Get Respondent

> Retrieve the quality check results and status for a specific respondent.



## OpenAPI

````yaml POST /v2/getRespondent
openapi: 3.0.1
info:
  title: API Documentation
  description: API Documentation for Redem 3.0
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.redem.io
security:
  - apiKeyAuth: []
tags:
  - name: Survey
    description: Survey management
  - name: Respondent
    description: Respondent management
paths:
  /v2/getRespondent:
    post:
      tags:
        - Respondent
      summary: Get respondent results
      description: Retrieve the quality check results and status for a specific respondent.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetRespondentRequest'
            example:
              surveyName: Global Vacation Insights 2024
              respondentId: RESP497770
      responses:
        '200':
          description: >-
            When a request is successfully processed, the API responds with a
            `200 OK` status code and the expected data. The structure of the
            response varies based on the respondent's status.
          content:
            application/json:
              schema:
                oneOf:
                  - title: Respondet Completed
                    description: >-
                      This response mode available when respondent status is
                      `COMPLETED`. 

                       In this case, the system generates a comprehensive, quality assessment of the respondent.
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: >-
                          A variable indicating whether the **operation was
                          successful**.
                        enum:
                          - true
                          - false
                      message:
                        type: string
                        description: >-
                          A variable that **human-readable message** providing
                          additional context or confirmation of the requested
                          action.
                      results:
                        type: object
                        description: >-
                          This variable includes **all quality parameters
                          associated with a respondent**.
                        properties:
                          respondentId:
                            type: string
                            description: A variable that **indicates the respondent**.
                          status:
                            type: string
                            description: >-
                              A variable that represents the **current state of
                              the respondent evaluation**. For respondents who
                              have been successfully evaluated, this value will
                              always be `COMPLETED`.
                          respondentQuality:
                            $ref: '#/components/schemas/RespondentResults'
                            description: >-
                              This variable **represents respondent data that
                              has been evaluated based on the quality checks
                              specified in the /addRespondent request**. 

                               💡Important: Even if a respondent fails evaluation, the response will still be returned with results with an error code of -999 instead of valid scores. 

                               **⭕ Note:** The value -999 is a predefined code returned by ReDem whenever a respondent cannot be evaluated. This applies to all quality scores, including ReDem Score (R-Score), OES, GQS, CHS, TS, and BAS.
                  - title: Respondent Processing
                    description: >-
                      This response mode available when respondent status is
                      `QUEUED`. 

                       In this case, the system will only return the status of the respondent, without the quality assessment of the respondent.
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: >-
                          A variable that **indicates whether the operation was
                          successful or not**.
                        enum:
                          - true
                          - false
                      message:
                        type: string
                        description: >-
                          A variable that **human-readable message** providing
                          additional context or confirmation of the requested
                          action.
                      results:
                        type: object
                        description: >-
                          This object serves as a **container to hold the
                          results for the requested data**, encapsulating all
                          relevant information and outputs in a structured
                          format.
                        properties:
                          respondentId:
                            type: string
                            description: A variable that **indicates the respondent**.
                          status:
                            type: string
                            description: >-
                              A variable that represents the **current state of
                              the respondent evaluation**. For respondents who
                              are still being processed, this value will always
                              be `QUEUED`.
              examples:
                Respondent Completed:
                  summary: Respondent Completed Example
                  value:
                    success: true
                    message: Respondent quality successfully retrieved
                    results:
                      respondentId: RESP497770
                      status: COMPLETED
                      respondentQuality:
                        isExcluded: true
                        reasonsForExclusion:
                          - Open Ended Score Threshold
                          - Coherence Score Threshold
                        redemScore: 85
                        qualityScoreSummary:
                          - qualityCheck: OES
                            score: 80
                          - qualityCheck: CHS
                            score: 75
                            reason: >-
                              The user shows several inconsistencies and
                              contradictions, such as different ...
                          - qualityCheck: GQS
                            score: 85
                          - qualityCheck: TS
                            score: 70
                          - qualityCheck: BAS
                            score: 75
                        dataPointsSummary:
                          - qualityCheck: OES
                            dataPointId: Q1
                            score: 85
                            category: VALID_ANSWER
                          - qualityCheck: TS
                            dataPointId: durationQ1
                            score: 95
                          - qualityCheck: GQS
                            dataPointId: Q2
                            score: 90
                          - qualityCheck: OES
                            dataPointId: Q3
                            score: 75
                            category: VALID_ANSWER
                          - qualityCheck: TS
                            dataPointId: durationQ3
                            score: 50
                          - qualityCheck: CHS
                            dataPointId: CHS_Question
                            score: 75
                            reason: >-
                              The user shows several inconsistencies and
                              contradictions, such as different ...
                          - qualityCheck: GQS
                            dataPointId: Q4
                            score: 80
                          - qualityCheck: TS
                            dataPointId: totalDuration
                            score: 65
                          - qualityCheck: BAS
                            dataPointId: interactionsQ1
                            score: 75
                            category: NATURAL_TYPING
                Respondent Processing:
                  summary: Respondent Processing Example
                  value:
                    success: true
                    message: Respondent quality successfully retrieved
                    results:
                      respondentId: RESP497770
                      status: QUEUED
        '400':
          description: >-
            When a request fails due to invalid input or other errors, the API
            returns a 400 Bad Request status code. The response includes a
            descriptive `message` explaining the issue and an `error` object
            containing additional details to aid in diagnosing and resolving the
            problem.
          content:
            application/json:
              schema:
                oneOf:
                  - title: Validation Error
                    description: >-
                      Indicating a validation failure, the response includes a
                      `message` field specifying the issue and an `errors`
                      object listing the missing or incorrect fields to help
                      clients resolve them. 

                       **⭕ Note:** Refer to the [response structure](/api-reference/api-specifications/response-structure) for the format of the error response.
                    type: object
                  - title: Survey not found
                    description: >-
                      This error occurs when the **requested survey does not
                      exist in the system**. It may happen if the survey name is
                      incorrect, has been deleted, or was never created. 

                       **⭕ Note:** Refer to the [response structure](/api-reference/api-specifications/response-structure) for the format of the error response.
                    type: object
                  - title: Respondent not found
                    description: >-
                      This error occurs when the **requested respondentId does
                      not exist in the system**. It may happen if the respondent
                      has not been added to the specified survey or if an
                      incorrect ID was provided. 

                       **⭕ Note:** Refer to the [response structure](/api-reference/api-specifications/response-structure) for the format of the error response.
                    type: object
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Validation Error
                    errors:
                      '0': '"surveyName" is required'
                      '1': '"respondentId" is required'
                Survey not found:
                  value:
                    success: false
                    message: Survey not found
                    errors: {}
                Respondent not found:
                  value:
                    success: false
                    message: Respondent not found
                    errors: {}
components:
  schemas:
    GetRespondentRequest:
      description: Request body for getting a respondent
      required:
        - surveyName
        - respondentId
      type: object
      properties:
        surveyName:
          type: string
          description: '**The name of the survery**.'
          example: Global Vacation Insights 2024
        respondentId:
          type: string
          description: >-
            **The unique identifier for a respondent**, making it easy to
            distinguish them from others in the survey
          example: RESP497770
    RespondentResults:
      description: Complete quality assessment for a respondent
      type: object
      properties:
        isExcluded:
          type: boolean
          description: >-
            **Indicates whether a respondent is excluded based on the cleaning
            settings specified in the request**. If cleaning is not activated,
            the respondent is always included by default.
          example: false
        reasonsForExclusion:
          type: array
          items:
            type: string
          description: >-
            **Reasons for exclusion** will only be available if the respondent
            is excluded based on the cleaning settings specified in the request.
            If the respondent is not excluded, the array will be empty.
        redemScore:
          type: number
          description: >-
            **A weighted average score** (0–100) calculated based on the applied
            quality scores.. 

             For more information refer to the [ReDem Score](/quality-checks/redem-score) section.
          example: 85
        qualityScoreSummary:
          type: array
          items:
            $ref: '#/components/schemas/QualityCheckResponse'
          description: An object containing detailed results for each quality score applied
        dataPointsSummary:
          type: array
          items:
            $ref: '#/components/schemas/DataPointsQualityResponse'
          description: >-
            Detailed results of quality checks performed at the individual data
            point level.
    QualityCheckResponse:
      description: Aggregated results for a quality score type
      type: object
      properties:
        qualityCheck:
          type: string
          enum:
            - OES
            - TS
            - GQS
            - CHS
            - BAS
          description: '**The specific type of quality check** applied to a respondent.'
          example: OES
        score:
          type: number
          description: >-
            A **numerical score from 0 to 100** that represents the overall
            result of a specific quality check. It is calculated based on the
            combined evaluation of all data point scores of the same quality
            type.
          example: 78
        reason:
          type: string
          description: >-
            **The reason behind the score** — available only when the quality
            score type is set to `CHS`.
          example: >-
            The user shows several inconsistencies and contradictions, such as
            different ...
        incoherentQuestions:
          type: array
          items:
            type: string
          description: >-
            **List of incoherent questions** identified during the CHS quality
            check. This will be only available if the quality score type is set
            to `CHS` 

             **⭕ Note:** The questions are named in numerical order, reflecting the sequence in which they were presented to the respondent.
          example:
            - Q1
            - Q2
    DataPointsQualityResponse:
      description: Quality check results for a single datapoint
      type: object
      properties:
        qualityCheck:
          type: string
          enum:
            - OES
            - TS
            - GQS
            - CHS
            - BAS
          description: '**Type of quality check** performed for the data point'
          example: OES
        dataPointId:
          type: string
          description: '**A unique identifier of the data point**'
          example: Q1
        score:
          type: number
          description: '**Quality score for the data point**, ranging from 0 to 100'
          example: 85
        category:
          type: string
          description: >-
            **Quality category** for the data point, this will be only available
            if the quality check type is set to `OES` or `BAS`
          example: VALID_ANSWER
        reason:
          type: string
          description: >-
            **Explanation** for the score, this will be only available if the
            quality check type is set to `GQS`
          example: Straightliner, Partial Straightliner
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key

````