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

# Request to generate token

> Request to generate appointment token at the facility. <Note> Get the hip_id and counter_id by reading the QR code of the Hospital/Clinic.</Note> <Note>Use the device location for the location data</Note>



## OpenAPI

````yaml post /abdm/v2/profile/share
openapi: 3.1.0
info:
  description: ABHA Registration and login APIs
  title: Registration
  version: 1.0.0
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /abdm/v2/profile/share:
    post:
      description: >-
        Request to generate appointment token at the facility. <Note> Get the
        hip_id and counter_id by reading the QR code of the
        Hospital/Clinic.</Note> <Note>Use the device location for the location
        data</Note>
      parameters:
        - description: Eka User ID (OID)
          in: header
          name: X-Pt-Id
          schema:
            type: string
        - description: Partner User ID
          in: header
          name: X-Partner-Pt-Id
          schema:
            type: string
        - description: Partner HIP ID
          in: header
          name: X-Hip-Id
          schema:
            type: string
        - description: OID is used to Identify the user.
          in: query
          name: oid
          schema:
            description: OID is used to Identify the user.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanandshareProfileShareRequest'
      responses:
        '202':
          content:
            application/json:
              schema:
                properties:
                  request_id:
                    description: Request ID to track the status
                    type: string
                  status:
                    enum:
                      - success
                      - ' processing'
                      - ' failed'
                    type: string
                type: object
          description: Accepted
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: ''
        5XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: ''
      security:
        - authApiKey: []
components:
  schemas:
    ScanandshareProfileShareRequest:
      properties:
        counter_id:
          description: Counter ID from QR Code
          type: string
        hip_id:
          description: HIP ID from QR Code
          type: string
        location:
          $ref: '#/components/schemas/HipLocation'
          description: Location of the user
        patient:
          $ref: '#/components/schemas/ScanandsharePatient'
        request_id:
          description: Request ID to track the status of the profile share
          type: string
        user_x_token:
          description: user authorization token
          type: string
      required:
        - hip_id
        - counter_id
      type: object
    GenericError:
      properties:
        code:
          type: integer
        error:
          type: string
        source_error:
          $ref: '#/components/schemas/SourceErr'
      type: object
    HipLocation:
      properties:
        latitude:
          type:
            - 'null'
            - string
        longitude:
          type:
            - 'null'
            - string
      type: object
    ScanandsharePatient:
      properties:
        abha_address:
          description: ABHA address of the patient
          type: string
        address:
          $ref: '#/components/schemas/ScanandshareAddress'
          description: Address of the patient
        day_of_birth:
          description: Day of birth of the patient
          type: string
        gender:
          description: Gender of the patient
          type: string
        mobile:
          description: Phone number of the patient
          type: string
        month_of_birth:
          description: Month of birth of the patient
          type: string
        name:
          description: Name of the patient
          type: string
        year_of_birth:
          description: Year of birth of the patient
          type: string
      required:
        - abha_address
        - name
        - gender
        - day_of_birth
        - month_of_birth
        - year_of_birth
        - mobile
      type: object
    SourceErr:
      properties:
        code:
          type: string
        message:
          type: string
      type: object
    ScanandshareAddress:
      properties:
        district:
          description: District of the address
          type: string
        line:
          description: Address line
          type: string
        pin_code:
          description: Pin code of the address
          type: string
        state:
          description: State of the address
          type: string
      required:
        - pin_code
      type: object
  securitySchemes:
    authApiKey:
      description: The API requires a Bearer token (JWT) for authentication.
      scheme: bearer
      type: http

````