Leo1 Operations API

The Operations API from Leo1 — 2 operation(s) for operations.

OpenAPI Specification

leo1-operations-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: leofees_backend api Operations API
  version: version
  description: General system endpoints for the API.
tags:
- name: Operations
paths:
  /api/v1/ops/update_loan_status:
    post:
      tags:
      - Operations
      summary: Update Loan Status
      operationId: update_loan_status_api_v1_ops_update_loan_status_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoanUpdateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
  /api/v1/ops/log_activity:
    post:
      tags:
      - Operations
      summary: Log Activity
      operationId: log_activity_api_v1_ops_log_activity_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogActivityRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
components:
  schemas:
    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
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    LoanUpdateRequest:
      title: LoanUpdateRequest
      required:
      - loan_id
      - status
      type: object
      properties:
        loan_id:
          title: Loan Id
          type: integer
        status:
          title: Status
          type: string
        loan_amount:
          title: Loan Amount
          type: integer
        disurbed_amount:
          title: Disurbed Amount
          type: integer
        utr_no:
          title: Utr No
          type: string
    LogActivityRequest:
      title: LogActivityRequest
      required:
      - action
      - sub_action
      - comment
      - data
      type: object
      properties:
        action:
          title: Action
          type: string
        sub_action:
          title: Sub Action
          type: string
        comment:
          title: Comment
          type: string
        data:
          title: Data
          type: object
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: secret-key