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

# Get Consent Status

> Use this API to retrieve the current consent status for a user and determine whether you may request protected financial or personal information for verification.



## OpenAPI

````yaml get /aa/consent
openapi: 3.0.0
info:
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: developers@cashfree.com
    name: API Support
    url: https://discord.com/invite/QdZkNSxXsB
  title: Cashfree Verification API's.
  version: '2023-12-18'
  description: >-
    Cashfree's Verification APIs provide different types of verification to our
    merchants.
servers:
  - description: Sandbox Server
    url: https://sandbox.cashfree.com/verification
  - description: Production Server
    url: https://api.cashfree.com/verification
security: []
tags:
  - name: Aadhaar
    description: Operations related to Aadhaar verification.
  - name: BAV V2
    description: Operations related to Bank account verification v2.
  - name: PAN
    description: Operations related to PAN verification.
  - name: Digilocker
    description: Operations related to Digilocker verification.
  - name: E-sign
    description: Operations related to E-sign verification.
  - name: Reverse Penny Drop
    description: Operations related to Reverse Penny Drop verification.
  - name: UPI Penny Drop
    description: Operations related to UPI Penny Drop verification.
  - name: Mobile Penny Drop
    description: Operations related to Mobile Penny Drop verification.
  - name: IP
    description: Operation related to IP verification.
  - name: UPI
    description: Operations related to UPI verification.
  - name: Passport
    description: Operation related to Passport verification.
  - name: CIN
    description: Operation related to CIN verification.
  - name: Name Match
    description: Operation related to Name Match verification.
  - name: PAN to GSTIN
    description: Operation related to PAN to GSTIN.
  - name: Face Match
    description: Operation related to Face Match verification.
  - name: Voter ID
    description: Operation related to Voter ID verification.
  - name: Reverse Geocoding
    description: Operation related to Reverse Geocoding.
  - name: Vehicle RC
    description: Operation related to Vehicle RC verification.
  - name: Driving License
    description: Operation related to Driving License verification.
  - name: GSTIN
    description: Operation related to GSTIN verification.
  - name: Account Aggregator
    description: Operations related to Account aggregator.
  - name: OTPLess
    description: Operations related to OTPLess Verification.
  - name: 1-Click
    description: Operations related to 1-Click.
  - name: Smart OCR
    description: Operations related to Smart OCR.
  - name: Geocoding
    description: Operations related to Geocoding.
  - name: Udyam
    description: Operation related to Udyam verification.
  - name: PAN to Udyam
    description: Operation related to PAN to Udyam.
paths:
  /aa/consent:
    get:
      tags:
        - Account Aggregator
      summary: Get Consent Status
      description: >-
        Use this API to retrieve the current consent status for a user and
        determine whether you may request protected financial or personal
        information for verification.
      operationId: VrsAaGetConsentStatus
      parameters:
        - name: consent_ref_id
          description: >-
            It is the unique ID created by Cashfree Payments that you receive in
            the response of Consent Request API.
          in: query
          required: false
          schema:
            type: string
            default: '1358'
        - name: consent_verification_id
          description: >-
            It is the unique ID you created to identify the verification
            request.
          in: query
          required: false
          schema:
            type: string
            default: ABC00123
      responses:
        '200':
          $ref: '#/components/responses/GetConsentResponse'
        '400':
          $ref: '#/components/responses/Response400GetConsent'
        '401':
          $ref: '#/components/responses/Response401'
        '403':
          $ref: '#/components/responses/Response403'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500V2'
      security:
        - XClientID: []
          XClientSecret: []
components:
  responses:
    GetConsentResponse:
      description: Consent created successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConsentResponseSchema'
          example:
            consent_verification_id: abc12345
            consent_ref_id: 67890
            consent_redirect_url: https://example.com/redirect
            status: SUCCESS
            customer_identifiers:
              - type: MOBILE
                value: '9876543210'
            consent_start: '2024-01-01T00:00:00Z'
            consent_expiry: '2024-12-31T23:59:59Z'
            fi_from: '2024-01-01T00:00:00Z'
            fi_to: '2024-12-31T23:59:59Z'
            redirect_url: https://example.com/redirect
            consent_mode: STORE
            consent_type:
              - PROFILE
              - SUMMARY
              - TRANSACTION
            fi_types:
              - DEPOSIT
            data_life_expiry: '2024-01-07'
            filter:
              - type: TRANSACTION_AMOUNT
                operator: LESS_THAN
                value: '20000'
    Response400GetConsent:
      description: Validation errors for GetStatus API of Consent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            X-Client-Id Missing:
              value:
                type: validation_error
                code: x-client-id_missing
                message: x-client-id is missing in the request.
            X-Client-Secret Missing:
              value:
                type: validation_error
                code: x-client-secret_missing
                message: x-client-secret is missing in the request.
            verification_id and reference_id missing:
              value:
                type: validation_error
                code: invalid_request
                message: provide consent_verification_id or consent_ref_id
            Invalid reference_id format:
              value:
                type: validation_error
                code: consent_ref_id_value_invalid
                message: Bad request, please check API documentation
    Response401:
      description: Invalid client ID and client secret combination.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Invalid client ID and client secret combination:
              value:
                type: authentication_error
                code: authentication_failed
                message: Invalid clientId and clientSecret combination
    Response403:
      description: Authentication error (IP not whitelisted).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            IP not whitelisted:
              value:
                type: authentication_error
                code: ip_validation_failed
                message: >-
                  IP not whitelisted your current ip is 106.51.91.104.For IP
                  whitelisting assistance, visit our guide at
                  https://www.cashfree.com/docs/secure-id/get-started/integration/ip-whitelisting-verification
            x-cf-signature header missing:
              value:
                type: validation_error
                code: authentication_failed
                message: x-cf-signature missing in the request header
    Response422:
      description: >-
        Validation error because of insufficient balance to process this
        request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Insufficient balance:
              value:
                type: validation_error
                code: insufficient_balance
                message: Insufficient balance to process this request
    Response429:
      description: Rate limit exceed error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Rate limit error per operation:
              value:
                type: rate_limit_error
                code: too_many_requests_per_operation
                message: Too many requests for this operation, rate limit reached
            Rate limit error per IP:
              value:
                type: rate_limit_error
                code: too_many_requests_per_ip
                message: Too many requests from the IP, rate limit reached
    Response500V2:
      description: Internal error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Internal Server Error:
              value:
                type: internal_error
                code: verification_failed
                message: something went wrong
  schemas:
    ConsentResponseSchema:
      type: object
      properties:
        consent_verification_id:
          type: string
          example: ''
          description: >-
            It displays the unique ID you created to identify the consent
            request.
        consent_ref_id:
          type: number
          example: 10
          description: >-
            It displays the unique ID created by Cashfree Payments for reference
            purpose.
        consent_redirect_url:
          type: string
          example: string
          description: >-
            It displays the URL that redirects the individual to the consent
            request page.
        status:
          type: string
          example: SUCCESS
          description: |-
            It displays the status of the consent request.
             Possible values are

             - `PENDING`
             - `PROCESSING`
             - `SUCCESS`
             - `PAUSED`
             - `EXPIRED`
             - `REVOKED`
             - `REJECTED`
        customer_identifiers:
          type: array
          description: It should contain the information related to the individual.
          items:
            type: object
            properties:
              type:
                type: string
                example: MOBILE
                description: >-
                  It is the unique piece of information to recognize and
                  distinguish the individual.

                  Possible values are

                  - `MOBILE`
              value:
                type: string
                example: ''
                description: It is the mobile number of the individual.
        consent_expiry:
          type: string
          format: date-time
          example: dateTime
          description: It is the expiry date and time of the consent request.
        fi_from:
          type: string
          format: date-time
          example: dateTime
          description: >-
            It is the starting date and time of the financial information you
            require.
        fi_to:
          type: string
          format: date-time
          example: dateTime
          description: >-
            It is the ending date and time of the financial information you
            require.
        redirect_url:
          type: string
          example: string
          description: >-
            It is the URL that you need to provide that takes the individual to
            after viewing the consent request.
        consent_mode:
          type: string
          example: STORE
          description: >-
            It is the type of configuration for handling the financial
            information of the individual.

            Possible values are
              - `VIEW`: It indicates that the information is for viewing purpose.
              - `STORE`: It indicates that the information is for storing purpose.
              - `QUERY`: It indicates that the information is for querying purposes, including performing searches, filtering results, or making data-driven decisions.
              - `STREAM`: It indicates that the information is for streaming purposes.
        consent_type:
          type: array
          description: |-
            It displays the type of information you require from the individual.

              Possible values are
                - `PROFILE`: It contains the basic information of the individual.
                - `SUMMARY`: It contains the summary of the financial information of the individual.
                - `TRANSACTIONS`: It contains the transactional information of the individual.
          items:
            type: string
            example: PROFILE
        fi_types:
          type: array
          description: >-
            It displays the type of financial information you require from the
            individual.

              Possible values are
                - `DEPOSIT`
          items:
            type: string
            example: DEPOSIT
        consent_start:
          type: string
          format: date-time
          description: >-
            It is the start date and time of the consent validity for the
            individual's financial information.
          example: dateTime
        data_life_expiry:
          type: string
          format: date
          example: date
          description: It displays the expiry date of the information fetched.
        filter:
          type: array
          description: >-
            It contains the filter options to sort the finanical information of
            the individual.
          items:
            type: object
            properties:
              type:
                type: string
                example: TRANSACTION_AMOUNT
                description: |-
                  It displays the type of detail in the financial information.
                  Possible value - `TRANSACTIONAMOUNT`
              operator:
                type: string
                example: LESS_THAN
                description: >-
                  It displays the filter criteria.

                  Possible values are

                  - `LESS_THAN` - `GREATER_THAN` - `EQUAL_TO` - `NOT_EQUAL_TO` -
                  `GREATER_THAN_EQUAL_TO` - `LESS_THAN_EQUAL_TO`
              value:
                type: string
                example: '20000'
    ErrorResponseSchema:
      type: object
      properties:
        code:
          type: string
          example: x-client-id_missing
        error:
          type: object
          example:
            ref_id: 102
        message:
          type: string
          example: x-client-id is missing in the request.
          description: It displays the outcome of the error.
        type:
          type: string
          example: validation_error
          description: It displays the type of error.
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Your unique client identifier issued by Cashfree. You can find this in
        your [Merchant
        Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        The secret key associated with your client ID. Use this to authenticate
        your API requests. You can find this in your [Merchant
        Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).

````