Get All Deposits

This method is used to fetch a record of all settled or unsettled deposits depending on the settlement flag passed.

If settled=true, only settled deposits would be spooled while if false, unsettled deposits would be spooled

HTTP Method : GET
API Endpoint : {{baseurl}}/api/v1/deposits?settled=false OR {{baseurl}}/api/v1/deposit?settled=true

Sample cURL Request

curl --location --request GET 'https://api.ovalfi-app.com/api/v1/deposits?settled=false' \
--header 'Authorization: Bearer eyJidXNpbmVzc0lEIjoiZTY2NWJkYWUtNWE0ZC00ODNiLTk2NTQtZTk0NzViMzRjY2ViIiwidXNlcklEIjoiYTY4NjE1ZGMtMjY5MS00ZmI1LTkyZmMtNTQ1NmRlN2M3YjllIiwia2V5Ijoia3JwIn0='

Response

{
    "status": 200,
    "data": {
        "deposits": {
            "2022-08-11": {
                "deposits": [
                    {
                        "id": "e60125a3-5005-4fcd-a3a4-c17cee142ebe",
                        "customerID": "c56f266e-9382-4f17-8378-20a935b342f0",
                        "businessID": "e665bdae-5a4d-483b-9654-e9475b34cceb",
                        "reference": "ref875797",
                        "currency": "",
                        "amount": 150,
                        "channel": "api",
                        "createdAt": "2022-08-11T11:37:34.944725Z",
                        "settledAt": {
                            "Time": "0001-01-01T00:00:00Z",
                            "Valid": false
                        },
                        "balanceBefore": 0,
                        "balanceAfter": 150,
                        "depositBeforeID": "00000000-0000-0000-0000-000000000000",
                        "batchDate": {
                            "Time": "2022-08-11T00:00:00Z",
                            "Valid": true
                        },
                        "status": "pending"
                    }
                ],
                "total_amount": 150
            }
        },
        "total_amount": 150,
        "paid_deposit_details": null
    },
    "message": "successfully got deposit ",
    "error": null
}

API Endpoint : BaseURL/api/v1/deposit?settled=false OR BaseURL/api/v1/deposit?settled=true
Sample cURL Request

curl --location --request GET 'http://ovalfi-dev-env-1621902102.us-east-2.elb.amazonaws.com:4000/api/v1/deposit?settled=true' \
--header 'Authorization: Bearer eyJidXNpbmVzc0lEIjoiZTY2NWJkYWUtNWE0ZC00ODNiLTk2NTQtZTk0NzViMzRjY2ViIiwidXNlcklEIjoiYTY4NjE1ZGMtMjY5MS00ZmI1LTkyZmMtNTQ1NmRlN2M3YjllIiwia2V5Ijoia3JwIn0='

Response

{
    "status": 200,
    "data": {
        "deposits": {
            "2022-08-11": {
                "deposits": [
                    {
                        "id": "e60125a3-5005-4fcd-a3a4-c17cee142ebe",
                        "customerID": "c56f266e-9382-4f17-8378-20a935b342f0",
                        "businessID": "e665bdae-5a4d-483b-9654-e9475b34cceb",
                        "reference": "ref875797",
                        "currency": "",
                        "amount": 150,
                        "channel": "api",
                        "createdAt": "2022-08-11T11:37:34.944725Z",
                        "settledAt": {
                            "Time": "2022-08-11T12:00:13.716385Z",
                            "Valid": true
                        },
                        "balanceBefore": 0,
                        "balanceAfter": 150,
                        "depositBeforeID": "00000000-0000-0000-0000-000000000000",
                        "batchDate": {
                            "Time": "2022-08-11T00:00:00Z",
                            "Valid": true
                        },
                        "status": "completed"
                    }
                ],
                "total_amount": 150
            }
        },
        "total_amount": 150,
        "paid_deposit_details": [
            {
                "from": "2022-08-11",
                "to": "2022-08-11",
                "total_amount": 150,
                "amount_paid": 150,
                "balance_remaining": 0
            }
        ]
    },
    "message": "successfully get deposit ",
    "error": null
}