# Create Loan

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /empeo/api/v1/Payroll/Loan:
    post:
      summary: Create Loan
      deprecated: false
      description: ''
      tags:
        - empeo/Payroll
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Bearer {Bearer}
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                EmployeeRefId:
                  type: string
                  description: รหัสพนักงาน เช่น 12345
                CompanyName:
                  type: string
                  description: 'ชื่อบริษัท '
                DocumentNo:
                  type: string
                  description: เลขเอกสาร
                FinancialItemName:
                  type: string
                  description: ชื่อรายได้ รายหัก
                DateOfPayment:
                  type: string
                  description: วันที่จ่าย ระบบจะไปหางวดจากวันที่
                Amount:
                  type: number
                  description: จำนวนเงินรวม
                TotalPeriod:
                  type: number
                  description: แบ่งจ่ายกี่ครั้ง
                Remark:
                  type: string
                  description: หมายเหตุ
                InterestType:
                  type: number
                  description: 0=ไม่มีดอกเบี้ย,1=ดอกเบี้ยคงที่
                InterestRatePerYear:
                  type: number
                  description: กรณีมีดอกเบี้ยให้ระบุอัตราดอกเบี้ย
              required:
                - EmployeeRefId
                - FinancialItemName
                - DateOfPayment
                - Amount
                - TotalPeriod
                - Remark
                - InterestType
                - InterestRatePerYear
                - CompanyName
              x-apidog-orders:
                - EmployeeRefId
                - CompanyName
                - DocumentNo
                - FinancialItemName
                - DateOfPayment
                - Amount
                - TotalPeriod
                - Remark
                - InterestType
                - InterestRatePerYear
            example:
              EmployeeRefId: 4F603520-4FCD-4973-8388-B5B0EE84CBB1
              CompanyName: empeo Dev Test
              DocumentNo: EPP220400171
              FinancialItemName: Advance Payment
              DateOfPayment: '2023-07-31'
              Amount: 19807.45
              TotalPeriod: 12
              Remark: IPA4-MYFQ2TH/A
              InterestType: 1
              InterestRatePerYear: 3
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
          x-apidog-name: Success
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: uyL_cJmK7q60QJZRTi5ot
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: uyL_cJmK7q60QJZRTi5ot
            scopes:
              uyL_cJmK7q60QJZRTi5ot:
                bearerAuth: []
      x-apidog-folder: empeo/Payroll
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-3964653-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.gofive.co.th
    description: Production
security:
  - bearerAuth: []
    x-apidog:
      schemeGroups:
        - id: uyL_cJmK7q60QJZRTi5ot
          schemeIds:
            - bearerAuth
      required: true
      use:
        id: uyL_cJmK7q60QJZRTi5ot
      scopes:
        uyL_cJmK7q60QJZRTi5ot:
          bearerAuth: []

```
