Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
import requests
import json

url = "https://www.giggle.tasksuite.com/webhook/json/v1/json/loans"

headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <api_key>'
}

payload = json.dumps({
   "loanAmount": 1000000.11,
   "loanTerm": 52,
   "contractDate": "2024-05-22",
   "firstPaymentDate": "2024-06-22",
   "loanClass": "gold",
   "loanType": "instalment",
   "oFee": 200.55,
   "disbursementAmount": 800000.88,
   "discountSavings": 0.00,
   "discountDate": "2024-05-27",
   "renewalIncrement": 8,
   "applicationId": 79834,
   "disbursementFee": "25.99",
   "fundedDate": "2024-06-13",
   "partnerId": 75475,
   "leadId": 456312,
   "ccrScore": 800,
   "clarityScore": 788,
   "files": [
      {
        "name": "signed_contract_1.pdf",
        "data": "JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoK..."
      },
      {
        "name": "signed_contract_2.pdf",
        "data": "UEsDBBQAAAAIAGWOOU/Wh7XIAgAAAAwAAAJAAAALd..."
      },
      {
        "name": "signed_terms_and_conditions_1.pdf",
        "data": "MTGCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAgUiAvRml..."
      }
   ]
})

response = requests.request("POST", url, headers=headers, data=payload)

...

Code Block
https://www.giggle.tasksuite.com/webhook/json/v1/json/loans/<loan_id:int>

Request Method

...

Code Block
languagepy
import requests
import json

url = "https://www.giggle.tasksuite.com/webhook/json/v1/json/loans/<loan_id:int>"


headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <api_key>'
}

response = requests.request("GET", url, headers=headers)

...

Code Block
https://www.giggle.tasksuite.com/webhook/json/v1/json/loans/<loan_id:int>

Request Method

...

Code Block
languagepy
import requests
import json

url = "https://www.giggle.tasksuite.com/webhook/json/v1/json/loans/<loan_id:int>"

headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <api_key>'
}

payload = json.dumps({
   "state": "active",
   "loanAmount": 1000000.11,
   "loanTerm": 52,
   "contractDate": "2024-05-22",
   "firstPaymentDate": "2024-06-22",
   "loanClass": "gold",
   "loanType": "instalment",
   "oFee": 200.55,
   "disbursementAmount": 800000.88,
   "discountSavings": "0.00",
   "discountDate": "2024-05-27",
   "renewalIncrement": 8,
   "disbursementFee": "25.99",
   "fundedDate": "2024-06-13",
   "ccrScore": 800,
   "clarityScore": 788,
   "daysOverDue": 12,
   "amountOverdue": 1987.32,
   "contractBalance": 421123.33,
   "files": [
      {
        "name": "signed_contract_1.pdf",
        "data": "JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoK..."
      },
      {
        "name": "signed_contract_2.pdf",
        "data": "UEsDBBQAAAAIAGWOOU/Wh7XIAgAAAAwAAAJAAAALd..."
      },
      {
        "fileId": 123,
        "name": "signed_terms_and_conditions_1.pdf",
        "data": "MTGCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAgUiAvRml..."
      }
   ]
})

response = requests.request("PATCH", url, headers=headers, data=payload)

...

Code Block
https://www.giggle.tasksuite.com/webhook/json/v1/json/loans/<loan_id:int>

Request Method

...

Code Block
languagepy
import requests
import json

url = "https://www.giggle.tasksuite.com/webhook/json/v1/json/loans/<loan_id:int>"

headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <api_key>'
}

response = requests.request("DELETE", url, headers=headers)

...