Leo1 SDK API

The SDK API from Leo1 — 5 operation(s) for sdk.

OpenAPI Specification

leo1-sdk-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: leofees_backend api SDK API
  version: version
  description: General system endpoints for the API.
tags:
- name: SDK
paths:
  /api/v1/sdk/start_transaction:
    post:
      tags:
      - SDK
      summary: Start Transaction
      description: SDK to Start Transaction
      operationId: start_transaction_api_v1_sdk_start_transaction_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionDataRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EncryptedTransaction'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/sdk/generate_access:
    post:
      tags:
      - SDK
      summary: Generate Token
      description: SDK API to Verify Transaction and generate access token
      operationId: generate_token_api_v1_sdk_generate_access_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EncryptedDataRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ERPLoginResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/sdk/link_get_institute_details:
    post:
      tags:
      - SDK
      summary: Link Get Institute Details
      description: Get Institute for static website
      operationId: link_get_institute_details_api_v1_sdk_link_get_institute_details_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkDataRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/sdk/link_generate_access:
    post:
      tags:
      - SDK
      summary: Link Generate Access
      description: Generate Access for static website
      operationId: link_generate_access_api_v1_sdk_link_generate_access_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkStudentRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/sdk/link_get_student:
    post:
      tags:
      - SDK
      summary: Get Link Student
      operationId: get_link_student_api_v1_sdk_link_get_student_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetLinkStudentAccess'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkStudentDetails'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InstituteERPResponse:
      title: InstituteERPResponse
      required:
      - institute_id
      - institute_name
      type: object
      properties:
        institute_id:
          title: Institute Id
          type: integer
        institute_name:
          title: Institute Name
          type: string
        hasEMI:
          title: Hasemi
          type: boolean
        image_asset:
          title: Image Asset
          type: string
        is_login_pass:
          title: Is Login Pass
          type: string
        has_form:
          title: Has Form
          type: boolean
        has_payment_gateway:
          title: Has Payment Gateway
          type: boolean
    ValidationError:
      title: ValidationError
      required:
      - loc
      - msg
      - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
    LinkDataRequest:
      title: LinkDataRequest
      required:
      - access_token
      type: object
      properties:
        access_token:
          title: Access Token
          type: string
    ERPLoginResponse:
      title: ERPLoginResponse
      required:
      - roll_number
      - transaction_log_id
      - unique_transaction_id
      - status
      - message
      - access_token
      - fee_transaction_id
      type: object
      properties:
        roll_number:
          title: Roll Number
          type: string
        transaction_log_id:
          title: Transaction Log Id
          type: integer
        unique_transaction_id:
          title: Unique Transaction Id
          type: string
        redirect_success:
          title: Redirect Success
          type: string
        redirect_fail:
          title: Redirect Fail
          type: string
        is_enach:
          title: Is Enach
          type: boolean
          default: false
        status:
          title: Status
          type: string
        message:
          title: Message
          type: string
        access_token:
          title: Access Token
          type: string
        fee_transaction_id:
          title: Fee Transaction Id
          type: integer
        erp_json_dump:
          title: Erp Json Dump
          type: object
        institute_erp:
          $ref: '#/components/schemas/InstituteERPResponse'
        easebuzz_env:
          title: Easebuzz Env
          type: string
        easebuzz_access_key:
          title: Easebuzz Access Key
          type: string
    TransactionDataRequest:
      title: TransactionDataRequest
      required:
      - key
      - roll_number
      - phone_number
      - institute_name
      - branch_name
      - course_name
      - parent_name
      - fees_paid
      - total_fees
      - erp_transaction_id
      - student_name
      - hash
      type: object
      properties:
        key:
          title: Key
          type: string
        roll_number:
          title: Roll Number
          type: string
        phone_number:
          title: Phone Number
          type: string
        institute_name:
          title: Institute Name
          type: string
        branch_name:
          title: Branch Name
          type: string
        course_name:
          title: Course Name
          type: string
        parent_name:
          title: Parent Name
          type: string
        fees_paid:
          title: Fees Paid
          type: string
        total_fees:
          title: Total Fees
          type: string
        redirect_fail:
          title: Redirect Fail
          type: string
        redirect_success:
          title: Redirect Success
          type: string
        erp_transaction_id:
          title: Erp Transaction Id
          type: string
        student_name:
          title: Student Name
          type: string
        hash:
          title: Hash
          type: string
        extra_data:
          title: Extra Data
          type: object
        email_id:
          title: Email Id
          type: string
          default: test@gmail.com
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    LinkStudentRequest:
      title: LinkStudentRequest
      required:
      - key
      - roll_number
      - phone_number
      - branch_name
      - course_name
      - parent_name
      - fees_paid
      - total_fees
      - student_name
      - institute_id
      type: object
      properties:
        key:
          title: Key
          type: string
        roll_number:
          title: Roll Number
          type: string
        phone_number:
          title: Phone Number
          type: string
        institute_name:
          title: Institute Name
          type: string
        branch_name:
          title: Branch Name
          type: string
        course_name:
          title: Course Name
          type: string
        parent_name:
          title: Parent Name
          type: string
        fees_paid:
          title: Fees Paid
          type: string
        total_fees:
          title: Total Fees
          type: string
        redirect_fail:
          title: Redirect Fail
          type: string
        redirect_success:
          title: Redirect Success
          type: string
        erp_transaction_id:
          title: Erp Transaction Id
          type: string
        student_name:
          title: Student Name
          type: string
        hash:
          title: Hash
          type: string
        extra_data:
          title: Extra Data
          type: object
        email_id:
          title: Email Id
          type: string
          default: test@gmail.com
        institute_id:
          title: Institute Id
          type: integer
    LinkStudentDetails:
      title: LinkStudentDetails
      required:
      - roll_number
      - phone_number
      - branch_name
      - course_name
      - parent_name
      - student_name
      - email_id
      type: object
      properties:
        roll_number:
          title: Roll Number
          type: string
        phone_number:
          title: Phone Number
          type: string
        branch_name:
          title: Branch Name
          type: string
        course_name:
          title: Course Name
          type: string
        parent_name:
          title: Parent Name
          type: string
        student_name:
          title: Student Name
          type: string
        email_id:
          title: Email Id
          type: string
    EncryptedDataRequest:
      title: EncryptedDataRequest
      required:
      - data
      - access_token
      type: object
      properties:
        data:
          title: Data
          type: string
        access_token:
          title: Access Token
          type: string
    EncryptedTransaction:
      title: EncryptedTransaction
      required:
      - data
      type: object
      properties:
        data:
          title: Data
          type: string
    GetLinkStudentAccess:
      title: GetLinkStudentAccess
      required:
      - access_key
      - roll_number
      - user_id
      type: object
      properties:
        access_key:
          title: Access Key
          type: string
        roll_number:
          title: Roll Number
          type: string
        user_id:
          title: User Id
          type: integer
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: secret-key