Loan Pay Date API Documentation: Giggle Finance
- 1 Introduction
- 1.1 Authentication
- 2 Read Pay Date Record(s)
- 2.1 Request Method
- 2.2 Request Body
- 2.3 Response
- 2.4 Pay Dates for a specific Loan
- 2.5 Batch Transaction Example GET Request
- 2.5.1 Pay Date State
- 2.5.2 End Point URLs
- 2.5.2.1 Today
- 2.5.2.2 Today (Partially Paid)
- 2.5.2.3 Today (Not Paid)
- 2.5.2.4 Today (Not paid nor Partially Paid)
- 2.5.2.5 Today (Paid)
- 2.5.3 Example URLs
- 2.5.4 Batch Pay Date Example (Python)
- 2.5.5 Batch Pay Date Example Response (Success)
- 2.6 Error Handling
- 2.7 Notes
- 3 Support
Introduction
The /paydates
endpoint allows you to perform Read, queries for a Loan Pay Date Record by providing relevant information. This endpoint is accessible through GET requests and requires the use of a valid <api_key>
for authentication purposes. TaskSuite will provide the appropriate key for Giggle Finance. Pay Dates is a sub-resource of loans, and loans are the top-level resource.
Authentication
To access this endpoint, you need to include the <api_key>
in the header payload. The <api_key>
serves as an authentication mechanism to ensure only authorized users can manipulate Loan Pay Date Records.
Read Pay Date Record(s)
There are two possible requests for pay date records.
Return pay dates corresponding to a specific loan.
Return pay dates corresponding to all loans where the date or a range of dates are specified.
Request Method
GET
Request Body
None
Response
The response will indicate the success or failure of the request to the Loans Transactions endpoint. The details of the response may vary based on the implementation of the API. A typical response will be a JSON object containing a success message or an error message. A successful response will be comprised of one or more pay date records corresponding to the provided date or range of dates.
Pay Dates for a specific Loan
The following is an example of how one would perform a GET request for a loan pay date record in the TaskSuite system. A specific loanId is required for this request.
End Point URLs
https://www.giggle.tasksuite.com/webhook/v1/json/loans/<loan_id:int>/paydates?date=2024-05-16
https://www.giggle.tasksuite.com/webhook/v1/json/loans/<loan_id:int>/paydates?date=today&timezone=America/NewYork
https://www.giggle.tasksuite.com/webhook/v1/json/loans/<loan_id:int>/paydates?date=today&timezone=America/Chicago
https://www.giggle.tasksuite.com/webhook/v1/json/loans/<loan_id:int>/paydates?date=today&timezone=America/Denver
https://www.giggle.tasksuite.com/webhook/v1/json/loans/<loan_id:int>/paydates?date=today&timezone=America/LosAngeles
https://www.giggle.tasksuite.com/webhook/v1/json/loans/<loan_id:int>/paydates?start_date=2024-05-16&end_date=2024-06-16
...
If the query parameter date=today is included, then a Time Zone argument is strongly recommended to avoid inconsistencies. If the Time Zone is not provided, the Time Zone on the server will be utilized (America/Chicago).
Single Transaction Example (Python)
import requests
import json
url = "https://www.giggle.tasksuite.com/webhook/v1/json/loans/<loan_id:int>/paydates?date=2024-05-16"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <api_key>'
}
response = requests.request("GET", url, headers=headers)
Single Transaction Response (Success)
{
"id": 1,
"state": "open",
"date": "2024-05-16",
"amount": 100.00,
"amountOwed": 100.00,
"amountPaid": 0.00,
"startingCapital": 100000.00,
"endingCapital": 99900.00,
"loanBalance": 100000.00,
"loanId": 123
}
Single Transaction Response (Failure)
Batch Transaction Example GET Request
The following is an example of how to perform a GET request on all transaction records associated with a particular date or range of dates. Sorting by amount, or date is permitted. Filtering by the state of the pay date is permitted.
Pay Date State
paid - Scheduled payment for this date has been paid in full.
partial - Scheduled payment for this date has been paid partially.
open - Scheduled payment for this date has not been paid.
End Point URLs
Today
Today (Partially Paid)
Today (Not Paid)
Today (Not paid nor Partially Paid)
Today (Paid)
Example URLs
If the query parameter date=today is included, then a Time Zone argument is strongly recommended to avoid inconsistencies. If the Time Zone is not provided, the Time Zone on the server will be utilized (America/Chicago).
Batch Pay Date Example (Python)
Batch Pay Date Example Response (Success)
Error Handling
In case of errors, the response will contain an appropriate error message with details on what caused the error. Make sure to handle these errors.
Notes
Ensure that the required fields are provided in the request body; otherwise, the API will return an error indicating the missing fields.
The
<api_key>
in the headers must be valid and active for the Loan Transaction creation to be successful.
Support
If there are any errors or discrepancies with this document or the related API endpoints. Please reach out to support@tasksuite.com and a support engineer with handle your query.