Skip to content

Instantly share code, notes, and snippets.

@spksoft
Last active February 6, 2018 07:43
Show Gist options
  • Save spksoft/79ac3ef7c81888a29a0e4335744df36a to your computer and use it in GitHub Desktop.
Save spksoft/79ac3ef7c81888a29a0e4335744df36a to your computer and use it in GitHub Desktop.

ส่งข้อมูลการสมัครรีไฟแนนซ์บ้านไปสู่ระบบ finstreet

API Spec

URL

https://api.finstreet.com/open/api/itax/enquire

Method

POST

Request Body

{
  "principal":<string>,
  "remainingYear":<string>,
  "monthlyInstallment":<string>,
  "occupation":<string>,
  "isTopup":<boolean>,
  "topup":<number>,
  "objective":<string>,
  "propertyWorth":<string>,
  "lowerInterest":<boolean>,
  "lowerMonthly":<boolean>,
  "currentBank":<string>,
  "products":[
      {
          "id":<number>,
          "bank":<string>,
          "name":<string>,
          "year":<number>,
          "monthly_payment":<number>,
          "effective_rate":<number>,
          "img":<string>
      }
  ],
  "customer":{
      "fullname":<string>,
      "phone":<string>,
      "email":<string>,
      "age":<string>
  },
  "province":<string>,
  "district":<string>,
  "contactTime":<string>,
  "note":<string>,
  "isRecieveConfirmMail":<boolean>,
  "isSingleLoanPerson":<boolean>,
  "totalSalary":<boolean>,
  "beenBehidePayment":<string>,
  "propertyType":<string>,
  "propertyName":<string>,
  "debt":<number>
}

Response Body

{
  "body": {
    "status": "ok"
  }
}

Usage Recommendation

ค่าใน fields จะต้องเก็บมามา user เลือก product อะไรที่จะสมีครโดยรายละเอียด Product ดึกมาจาก API search product ส่วน province กับ district จะต้องดึงจาก API location

เพิ่มเติม

  1. contactTime จะเป็น string คือ "ทันที/ตลอดเวลา", "08:00 ถึง 10:00", "10:00 ถึง 12:00", "12:00 ถึง 13:00", "13:00 ถึง 15:00", "15:00 ถึง 17:00", "17:00 ถึง 19:00"
  2. propertyType จะเป็น string คือ "บ้านแฝด / บ้านเดี่ยว", "ทาวเฮ้าส์ / ทาวโฮม", "คอนโด", "อาคารพาณิชย์", "อื่นๆ"

Example of Request body

{
  "principal":"1000000",
  "remainingYear":"27",
  "monthlyInstallment":"7000",
  "occupation":"SA",
  "isTopup":false,
  "topup":0,
  "objective":"LOWER_INTEREST",
  "propertyWorth":"0",
  "lowerInterest":true,
  "lowerMonthly":false,
  "currentBank":"BAY",
  "products":[
      {
          "id":2143,
          "bank":"UOB",
          "name":"UOB10",
          "year":27,
          "monthly_payment":6400,
          "effective_rate":3.32944353152206,
          "img":"https://finstreet.co/assets/img/bank/minimal/UOB.png"
      }
  ],
  "customer":{
      "fullname":"เติ้งเอง ทดสอบระบบ",
      "phone":"0899999999",
      "email":"[email protected]",
      "age":"30"
  },
  "province":"10",
  "district":"1018",
  "contactTime":"ทันที/ตลอดเวลา",
  "note":"ไม่มี",
  "isRecieveConfirmMail":true,
  "isSingleLoanPerson":true,
  "totalSalary":50000,
  "beenBehidePayment":"NO",
  "propertyType":"บ้านแฝด / บ้านเดี่ยว",
  "propertyName":"ไม่บอก",
  "debt":0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment