> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Status

> Session Status API allows you to check the latest status of session and the list of consented documents if consent is received.

<Card title="Run in Postman" icon="https://mintcdn.com/sandboxfinancialtechnologiesprivatelimited/gviqebbpT5NUt_6i/static/svg/Postman.svg?fit=max&auto=format&n=gviqebbpT5NUt_6i&q=85&s=da47f2b7e10d87befec951aed9468de3" horizontal arrow="true" href="https://www.postman.com/in-co-sandbox/sandbox-api/request/65c3d8b/get-session-status" width="2030" height="2031" data-path="static/svg/Postman.svg" />


## OpenAPI

````yaml api-reference/kyc/openapi.json GET /kyc/digilocker/sessions/{session_id}/status
openapi: 3.1.0
info:
  title: in-co-sandbox-kyc
  description: ''
  version: 1.0.0
servers:
  - url: https://test-api.sandbox.co.in
    description: test
  - url: https://api.sandbox.co.in
    description: prod
security: []
tags:
  - name: kyc
  - name: digilocker-sdk
  - name: digilocker
  - name: aadhaar
  - name: bank
  - name: pan
  - name: mca
  - name: entitylocker
  - name: entitylocker-sdk
paths:
  /kyc/digilocker/sessions/{session_id}/status:
    get:
      tags:
        - kyc
        - digilocker
      summary: Get session status
      operationId: getSessionStatus
      parameters:
        - name: session_id
          in: path
          description: >-
            Session identifier generated during DigiLocker [Initiate Session
            API](https://developer.sandbox.co.in/api-reference/kyc/digilocker/endpoints/initiate_session)
            .
          required: true
          example: 839fd8a0-d645-42e1-a904-bb43353b0139
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            JWT access token. For token-generation steps, refer to the
            [Quickstart
            Guide](https://developer.sandbox.co.in/guides/get-started/quickstart).
          required: true
          example: '{{access_token}}'
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API key used to identify and authenticate the client.
          required: true
          example: '{{api_key}}'
          schema:
            type: string
        - name: x-api-version
          in: header
          description: Specifies the API version for the request.
          required: false
          example: 1.0.0
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  timestamp:
                    type: integer
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      created_at:
                        type: integer
                      updated_at:
                        type: integer
                      '@entity':
                        type: string
                      status:
                        type: string
                        enum:
                          - created
                          - succeeded
                          - failed
                          - expired
                        description: >-
                          Lifecycle state of the DigiLocker session. `created`:
                          session initiated, consent not yet completed.
                          `succeeded`: user completed DigiLocker consent and
                          documents can be fetched. `expired`: the DigiLocker
                          access token backing this session is no longer valid
                          (for example, after the token's natural expiry), so
                          the session can no longer be used to fetch documents
                          or the profile. `failed`: authorization did not
                          complete and the session is unusable, including when
                          the cause was transient; start a new session.
                      documents_consented:
                        type: array
                        items:
                          type: string
                          enum:
                            - aadhaar
                            - pan
                            - driving_license
                        description: >-
                          Document types the user has consented to on
                          DigiLocker. Only present when `status` is `succeeded`.
                    required:
                      - id
                      - created_at
                      - '@entity'
                      - status
                  transaction_id:
                    type: string
                required:
                  - code
                  - timestamp
                  - data
                  - transaction_id
              examples:
                200 - Session Created:
                  summary: 200 - Session Created
                  value:
                    code: 200
                    timestamp: 1752580258171
                    data:
                      id: 839fd8a0-d645-42e1-a904-bb43353b0139
                      created_at: 1752579445983
                      '@entity': in.co.sandbox.kyc.digilocker.session
                      status: created
                    transaction_id: 800ff751-2191-4b7d-b20a-8301790a3e19
                200 - Session Succeeded:
                  summary: 200 - Session Succeeded
                  value:
                    code: 200
                    timestamp: 1752580258171
                    data:
                      id: 839fd8a0-d645-42e1-a904-bb43353b0139
                      created_at: 1752579445983
                      updated_at: 1752579512340
                      '@entity': in.co.sandbox.kyc.digilocker.session
                      status: succeeded
                      documents_consented:
                        - aadhaar
                        - pan
                    transaction_id: 800ff751-2191-4b7d-b20a-8301790a3e19
                200 - Session Failed:
                  summary: 200 - Session Failed
                  value:
                    code: 200
                    timestamp: 1752580258171
                    data:
                      id: 839fd8a0-d645-42e1-a904-bb43353b0139
                      created_at: 1752579445983
                      updated_at: 1752579498221
                      '@entity': in.co.sandbox.kyc.digilocker.session
                      status: failed
                    transaction_id: 800ff751-2191-4b7d-b20a-8301790a3e19
                200 - Session Expired:
                  summary: 200 - Session Expired
                  value:
                    code: 200
                    timestamp: 1752580258171
                    data:
                      id: 839fd8a0-d645-42e1-a904-bb43353b0139
                      created_at: 1752579445983
                      updated_at: 1752580200110
                      '@entity': in.co.sandbox.kyc.digilocker.session
                      status: expired
                    transaction_id: 800ff751-2191-4b7d-b20a-8301790a3e19
          headers: {}
        '429':
          description: >-
            There were too many requests to DigiLocker. Wait, then send the
            request again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    const: 429
                    description: The HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      The time of the response. The unit is milliseconds from
                      the Unix epoch.
                  message:
                    type: string
                    description: The error message.
                  transaction_id:
                    type: string
                    description: The unique identifier of the request.
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                Too Many Requests:
                  summary: Too Many Requests
                  value:
                    code: 429
                    timestamp: 1782806266274
                    message: Too Many Requests
                    transaction_id: d3e4f5a6-1111-4a5b-8c6d-7e8f9a0b1c2d
          headers: {}
        '500':
          description: The request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    const: 500
                    description: The HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      The time of the response. The unit is milliseconds from
                      the Unix epoch.
                  message:
                    type: string
                    description: The error message.
                  transaction_id:
                    type: string
                    description: The unique identifier of the request.
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                Failed to get session status:
                  summary: Failed to get session status
                  value:
                    code: 500
                    timestamp: 1782806266274
                    message: Failed to get session status
                    transaction_id: d3e4f5a6-2222-4a5b-8c6d-7e8f9a0b1c2d
                Failed to get session:
                  summary: Failed to get session
                  value:
                    code: 500
                    timestamp: 1782806266274
                    message: Failed to get session
                    transaction_id: d3e4f5a6-2222-4a5b-8c6d-7e8f9a0b1c2d
                Failed to update session:
                  summary: Failed to update session
                  value:
                    code: 500
                    timestamp: 1782806266274
                    message: Failed to update session
                    transaction_id: d3e4f5a6-2222-4a5b-8c6d-7e8f9a0b1c2d
                Internal Server Error:
                  summary: Internal Server Error
                  value:
                    code: 500
                    timestamp: 1782806266274
                    message: Internal Server Error
                    transaction_id: d3e4f5a6-2222-4a5b-8c6d-7e8f9a0b1c2d
          headers: {}
        '503':
          description: DigiLocker is not available. Send the request again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    const: 503
                    description: The HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      The time of the response. The unit is milliseconds from
                      the Unix epoch.
                  message:
                    type: string
                    description: The error message.
                  transaction_id:
                    type: string
                    description: The unique identifier of the request.
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                Source Unavailable:
                  summary: Source Unavailable
                  value:
                    code: 503
                    timestamp: 1000000000000
                    message: Source Unavailable
                    transaction_id: 6c05f692-c32f-4de0-92b4-56684bdf16f0
          headers: {}
        '521':
          description: The server cannot find a session with this `session_id`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    const: 521
                    description: The HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      The time of the response. The unit is milliseconds from
                      the Unix epoch.
                  message:
                    type: string
                    description: The error message.
                  transaction_id:
                    type: string
                    description: The unique identifier of the request.
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                Data not found:
                  summary: Data not found
                  value:
                    code: 521
                    timestamp: 1782806266274
                    message: 'Data not found for: 196c64a5-8cfb-45dd-a51c-0c8534774d07'
                    transaction_id: a599615c-c732-4538-9840-4bb5cd3c19d2
          headers: {}
      deprecated: false
      security: []

````