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
Code Block |
---|
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 ... |
Info |
---|
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)
Code Block |
---|
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)
Code Block |
---|
{ "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)
Code Block |
---|
{ "statusCode": 400, "description": "LoanId <ID> not found.", "name": "Bad Request" } |
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
Code Block |
---|
https://www.giggle.tasksuite.com/webhook/v1/json/paydates?date=today&timezone=America/NewYork |
Today (Partially Paid)
Code Block |
---|
https://www.giggle.tasksuite.com/webhook/v1/json/paydates?date=today&timezone=America/NewYork&state=partial |
Today (Not Paid)
Code Block |
---|
https://www.giggle.tasksuite.com/webhook/v1/json/paydates?date=today&timezone=America/NewYork&state=open |
Today (Not paid nor Partially Paid)
Code Block |
---|
https://www.giggle.tasksuite.com/webhook/v1/json/paydates?date=today&timezone=America/NewYork&state=open&state=partial |
Today (Paid)
Code Block |
---|
https://www.giggle.tasksuite.com/webhook/v1/json/paydates?date=today&timezone=America/NewYork&state=paid |
Example URLs
Code Block |
---|
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/paydates?date=2024-05-16 https://www.giggle.tasksuite.com/webhook/v1/json/paydates?start_date=2024-05-16&end_date=2024-06-16 https://www.giggle.tasksuite.com/webhook/v1/json/paydates?start_date=2024-05-16&end_date=2024-06-16&sort=amount&order=asc https://www.giggle.tasksuite.com/webhook/v1/json/paydates?start_date=2024-05-16&end_date=2024-06-16&sort=date&order=desc ... |
Info |
---|
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)
Code Block |
---|
import requests import json url = "https://www.giggle.tasksuite.com/webhook/v1/json/paydates?date=today&timezone=America/NewYork" headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer <api_key>' } response = requests.request("GET", url, headers=headers) |
Batch Pay Date Example Response (Success)
Code Block | ||
---|---|---|
| ||
{ "data": { { "id": 1, "state": "open", "date": "2024-07-11", "amount": 100.00, "amountOwed": 100.00, "amountPaid": 0.00, "startingCapital": 100000.00, "endingCapital": 99900.00, "loanBalance": 100000.00, "loanId": 123 } { "id": 2, "state": "paid", "date": "2024-07-11", "amount": 100.00, "amountOwed": 0.00, "amountPaid": 100.00, "startingCapital": 500000.00, "endingCapital": 49900.00, "loanBalance": 500000.00, "loanId": 456 } { "id": 3, "state": "partial", "date": "2024-07-11", "amount": 100.00, "amountOwed": 0.00, "amountPaid": 50.00, "startingCapital": 1000.00, "endingCapital": 900.00, "loanBalance": 950.00, "loanId": 789 } }, "metadata": { "totalCount": 3, "numPaid": 1, "numPartial": 1, "numOpen": 1 } } |
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.