This article will detail how to add deal balances from MCA SUITE.  This API is through our version 2 REST API and requires a different URL than the V1.  There is a limit of 1000 records returned.
 
URLS: 
 
The Base REST URL will be provided to the customer upon API request.  The URL will be different than our version 1 API.


Function:
Name: deal/getBalances
Type: GET
Query Parameters: 


Field NameRequired?TypeDescription
status[]
StringFilter to include deals only with this Deal Status.  The status must match exactly in MCA Suite.  You can pass this parameter multiple times for multiple statuses.
dealId[]
IntegerFilter to include deals only with matching deal ids.  You can pass up to 100 deal ids.
startDate

String
Filter by date created.  This will filter out deals created before the supplied Start Date
endDate
StringFilter by date created.  This will filter out deals created after the End Eate
nextId
IntegerThis function will limit to 1000 records.  If returned 1000 results, you can call the same method passing in the id in the the last record returned.
limit
IntegerBy default the results will be limited to 1000 but if you want to get a smaller set for testing pagination, you can supply the limit field.  You cannot set this above 1000.


Example Request:


https://xyz.mcasuite.com/deal/getBalances?status[]=New&status[]=Funded


Or


https://xyz.mcasuite.com/deal/getBalances?dealId[]=412311&dealId[]=321231


Example Return:


This is an example return, the fields includes ID, company name, amount repaid, amount outstanding and deal status.

{
    "success": true,
    "deals": [
        {
            "id": 1180,
            "dealName": "Deal 1",
            "companyName": "Morgan's Kitchen",
            "amountRepaid": "11511.21",
            "amountOutstanding": "688.79",
            "dealStatus": "Troubled",
            "lastTransactionDate: "03/01/20"
        },
        {
            "id": 1190,
            "dealName": "Deal 1",
            "companyName": "Ally Law Partners",
            "amountRepaid": "57619.68",
            "amountOutstanding": "71980.32",
            "dealStatus": "Funded",
            "lastTransactionDate: "03/01/20"
        }
    ]
}