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

# Mobile to PAN

> Returns the PAN Number from Mobile Number

This API allows you to verify a PAN (Permanent Account Number) and fetch related details using a mobile number as input.

<Note>
  The Mobile to PAN API can retrieve the PAN **only** **if the mobile number is linked to a credit or loan** record. If no such record exists, the PAN will not be available. Please handle this limitation accordingly.
</Note>


## OpenAPI

````yaml GET /lookup/mobile-to-pan
openapi: 3.0.0
info:
  title: KonnectNXT API Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://bgv.konnectnxt.com/api
    description: Production
  - url: https://testbgv.konnectnxt.com/api
    description: QA
security:
  - bearerAuth: []
paths:
  /lookup/mobile-to-pan:
    get:
      tags:
        - Lookup Services
      description: Returns the PAN Number from Mobile Number
      parameters:
        - name: mobile_number
          in: query
          description: 10 Digit Mobile Number
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                required:
                  - data
                allOf:
                  - $ref: '#/components/schemas/APIBaseResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/MobileToPANResult'
                  - $ref: '#/components/schemas/Credits'
              examples:
                Success:
                  description: Success Response
                  value:
                    status: success
                    code: 200
                    message: string
                    data:
                      mobile_number: '9087654321'
                      full_name: John Doe
                      id_number: CX892I8Q0W
                    credits_used: 3
                    credits_left: 34
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_WithCredits'
              examples:
                Missing Mobile Number:
                  value:
                    status: error
                    code: 400
                    message: Mobile number is missing.
                    data: null
                    credits_used: 0
                    credits_left: 34
                Invalid Mobile number type:
                  value:
                    status: error
                    code: 400
                    message: Mobile Number must be a string.
                    data: null
                    credits_used: 0
                    credits_left: 34
                Incorrect Mobile number Length:
                  value:
                    status: error
                    code: 400
                    message: Mobile Number must be 10 digit.
                    data: null
                    credits_used: 0
                    credits_left: 34
                Mobile Number with non-digit:
                  value:
                    status: error
                    code: 400
                    message: Mobile Number '098765432E' contains non-digit characters.
                    data: null
                    credits_used: 0
                    credits_left: 34
        '401':
          $ref: '#/components/responses/401'
        '402':
          $ref: '#/components/responses/402'
        '403':
          $ref: '#/components/responses/403'
        '500':
          $ref: '#/components/responses/500_WithCredits'
components:
  schemas:
    APIBaseResponse:
      type: object
      required:
        - status
        - code
        - message
      properties:
        status:
          $ref: '#/components/schemas/APIStatus'
        code:
          $ref: '#/components/schemas/HTTPCode'
        message:
          $ref: '#/components/schemas/APIMessage'
    MobileToPANResult:
      required:
        - mobile_number
        - full_name
        - id_number
      type: object
      properties:
        mobile_number:
          type: string
          description: The mobile number used for the lookup.
          example: '9087654321'
        full_name:
          type: string
          example: John Doe
          description: The full name associated with the PAN.
        id_number:
          type: string
          example: CX892I8Q0W
          description: The PAN number associated with the mobile number.
    Credits:
      type: object
      properties:
        credits_used:
          $ref: '#/components/schemas/CreditsUsed'
        credits_left:
          $ref: '#/components/schemas/CreditsLeft'
      required:
        - credits_used
        - credits_left
    Error_WithCredits:
      allOf:
        - $ref: '#/components/schemas/Error'
        - $ref: '#/components/schemas/APIErrorData'
        - $ref: '#/components/schemas/Credits'
    APIStatus:
      type: string
      enum:
        - success
        - error
      description: Overall status of the API
    HTTPCode:
      type: integer
      description: HTTP status code
      example: 400
    APIMessage:
      type: string
      description: Description of the response or error
      example: Invalid request parameters
    CreditsUsed:
      type: integer
      description: Represents the total number of credits used in this request.
      example: 3
    CreditsLeft:
      type: integer
      description: 'Represents the remaining credits available for use. '
      example: 4040
    Error:
      allOf:
        - $ref: '#/components/schemas/APIBaseResponse'
    APIErrorData:
      type: object
      properties:
        data:
          type: object
          nullable: true
          example: null
  responses:
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - $ref: '#/components/schemas/APIErrorData'
          examples:
            Missing Token:
              summary: Bearer token is missing or invalid.
              value:
                status: error
                code: 401
                message: Bearer token is missing or invalid.
                data: null
            Incorrect Token Format:
              summary: Token format is incorrect
              value:
                status: error
                code: 401
                message: Token format is incorrect
                data: null
            No Admin Found:
              summary: No admin found for this request
              value:
                status: error
                code: 401
                message: No admin user found for this organization
                data: null
            Invalid API Key:
              summary: Invalid API Key
              value:
                status: error
                code: 401
                message: Invalid API key (organization ID)
                data: null
            User not Found:
              summary: User not found
              value:
                status: error
                code: 401
                message: User not found.
                data: null
    '402':
      description: Payment Required
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - $ref: '#/components/schemas/APIErrorData'
          examples:
            Credit Limit Exceed:
              summary: Credit Limit Exceeded.
              value:
                status: error
                code: 402
                message: Credit Limit Exceeded.
                data: null
            Insufficient Credits:
              summary: Insufficient credits
              value:
                status: error
                code: 402
                message: 'Insufficient credits: 2 required, 1 remaining.'
                data: null
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - $ref: '#/components/schemas/APIErrorData'
          examples:
            Token Revoked:
              summary: Token access has been Revoked, Contact Support.
              value:
                status: error
                code: 403
                message: Token access has been Revoked, Contact Support.
                data: null
            Token Inactive:
              summary: Token is Inactive, Contact Support.
              value:
                status: error
                code: 403
                message: Token is Inactive, Contact Support.
                data: null
    500_WithCredits:
      description: Internal Server Error
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - $ref: '#/components/schemas/APIErrorData'
              - $ref: '#/components/schemas/Credits'
          examples:
            Internal Server Error:
              summary: Internal Server Error.
              value:
                status: error
                code: 500
                message: Internal Server Error.
                data: null
                credits_used: 3
                credits_remaining: 178
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key issued by KonnectNXT. Pass as `Authorization: Bearer
        <your_api_key>`.

````