Investment Team | Ap Repo


The Ap Repo page provides detailed information about the repo transactions available to the Investment Team. It displays a list of repo transactions with relevant details on the transaction, deposit amount, total amount, interest, and date.

API Endpoint

The Ap Repo page uses the /api:BVaDN9hl/asset_management/ap-repo?page=1&per_page=5 API endpoint to retrieve the repo transactions. The endpoint runs the App\Http\Controllers\Admin\AssetManagementController@getFloatTransactions method.

public function getFloatTransactions(Request $request) {
    $validator = Validator::make($request->all(), [
        'per_page' => 'nullable|integer',
        'page' => 'nullable|integer',
    ]);

    $per_page = $request->per_page;
    $page = $request->page;

    $result = GetFloatTransactions::run(
        per_page: $per_page,
        page: $page
    );

    return RespondWithSuccess::run(...[
        'body' => [
            'response' => [
                'transactions' => $result
            ],
        ]
    ]);
}

The API endpoint accepts optional parameters for pagination, allowing the Investment Team to view a specific number of repo transactions per page. It retrieves the repo transactions using the GetFloatTransactions action, which fetches the relevant data from the database.

API Response

The API response includes an array of repo transactions, here is an example of the response format:

{
    "response": {
        "transactions": [
            {
                "name": "Long Term Pool",
                "description": [
                    "Financial Freedom",
                    "Bobo Muth"
                ],
                "deposit": "684.00",
                "value": "684.00",
                "interest": "0.00",
                "invested_at": "2023-03-26 18:29:12"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "School Fees",
                    "Neema Kathure"
                ],
                "deposit": "30,000.00",
                "value": "30,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-01 09:00:29"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "School Fees",
                    "Neema Kathure"
                ],
                "deposit": "30,000.00",
                "value": "30,000.00",
                "interest": "0.00",
                "invested_at": "2025-03-11 18:32:47"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "Financial Freedom",
                    "Neema Kathure"
                ],
                "deposit": "220,000.00",
                "value": "220,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-01 09:00:29"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "Financial Freedom",
                    "Neema Kathure"
                ],
                "deposit": "220,000.00",
                "value": "220,000.00",
                "interest": "0.00",
                "invested_at": "2025-03-11 18:32:47"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "House v1.0",
                    "Neema Kathure"
                ],
                "deposit": "30,000.00",
                "value": "30,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-01 09:00:29"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "House v1.0",
                    "Neema Kathure"
                ],
                "deposit": "30,000.00",
                "value": "30,000.00",
                "interest": "0.00",
                "invested_at": "2025-03-11 18:32:47"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "Happiness",
                    "Melissa Machua"
                ],
                "deposit": "50,000.00",
                "value": "50,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-02 09:00:25"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "Financial Freedom",
                    "Wangui Kariuki"
                ],
                "deposit": "3,000.00",
                "value": "3,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-01 09:00:28"
            },
            {
                "name": "Short Term Pool",
                "description": [
                    "Emergency Fund",
                    "Wangui Kariuki"
                ],
                "deposit": "7,000.00",
                "value": "7,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-01 09:00:28"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "Financial Freedom",
                    "Nicola Okero"
                ],
                "deposit": "50,000.00",
                "value": "50,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-01 09:00:28"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "Financial Freedom",
                    "Nicola Okero"
                ],
                "deposit": "50,000.00",
                "value": "50,000.00",
                "interest": "0.00",
                "invested_at": "2025-06-06 07:27:34"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "Financial Freedom",
                    "Wanjiru Catherine"
                ],
                "deposit": "8,000.00",
                "value": "8,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-01 09:00:27"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "Financial Freedom",
                    "Wanjiru Catherine"
                ],
                "deposit": "8,000.00",
                "value": "8,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-01 14:09:55"
            },
            {
                "name": "Long Term Pool",
                "description": [
                    "Financial Freedom",
                    "Wanjiru Catherine"
                ],
                "deposit": "8,000.00",
                "value": "8,000.00",
                "interest": "0.00",
                "invested_at": "2025-02-05 09:00:27"
            }
        ]
    }
}

The response provides details such as the pool name, description, deposit amount, total amount, interest, and the date the transaction was invested. This information allows the Investment Team to track and manage repo transactions effectively.