Records

Fetch and filter your products records

Okra's Product records helps to ensure that you can fetch , filter your products successfully.

Get Records

curl -X POST https://api.okra.ng/v2/products/records/get
-H 'Content-Type: application/json'
-d '{
        "record_id": "604ba2ea247435813de02e2e"
    }'
const okra_client = require('okra-node');
okra_client.getRecords(accessToken, {record_id:"604ba2ea247435813de02e2e"}, (err, results) => {
    // Handle err
    const records = results.records;
    });
{
    "status": "success",
    "message": "Records successfully sent!",
    "data": {
        "pagination": null,
        "records": {
            "_id": "",
            "usedProduct": {
                "periodic-transactions": {
                    "status": false,
                    "number": 0
                },
                "guarantors": {
                    "status": false,
                    "number": 0
                },
                "directors": {
                    "status": false,
                    "number": 0
                },
                "auth": false,
                "balance": true,
                "accounts": true,
                "transactions": true,
                "income": false,
                "identity": false,
                "direct-debit": false
            },
            "status": {
                "transactions": {
                    "last_success_at": null,
                    "last_fail_at": null
                },
                "process": {
                    "completed": true,
                    "running": false
                }
            },
            "products": [],
            "billable_products": [],
            "source": "",
            "limit": 24,
            "currency": "",
            "bank": {
                "_id": "",
                "__v": 0,
                "active": true,
                "colors": {
                    "primary": "",
                    "accent": "",
                    "button": ""
                },
                "corporate": true,
                "countries": [],
                "created_at": "",
                "icon": "",
                "individual": true,
                "keyboards": {},
                "keywords": [],
                "last_updated": "",
                "logo": "",
                "multi_login": [],
                "name": "",
                "old_icon": "",
                "old_logo": "",
                "only_mobile": false,
                "only_token": false,
                "app_name": "",
                "web_name": "",
                "payments": {
                    "ind": {
                        "exists": true,
                        "recurring": false,
                        "save_bene": true
                    },
                    "corp": {
                        "exists": true,
                        "recurring": false,
                        "save_bene": true
                    },
                    "mobile": {
                        "exists": true,
                        "recurring": true,
                        "save_bene": false,
                        "sso": false
                    },
                    "ussd": {
                        "exists": false,
                        "recurring": false,
                        "save_bene": false
                    }
                },
                "products": [
                    "auth",
                    "transactions",
                    "balance",
                    "identity",
                    "income",
                    "direct-debit",
                    "guarantors",
                    "periodic-transactions",
                    "periodic-balance"
                ],
                "reset_link": "",
                "reset_link_corp": "",
                "sends_not": true,
                "slug": "access-bank",
                "sortcode": 44150149,
                "status": "healthy",
                "ussd": true,
                "ussd_opts": {
                    "auth": {},
                    "accounts": {},
                    "identity": {},
                    "transactions": {},
                    "balance": {}
                },
                "uuid": false,
                "v2_icon": "",
                "v2_logo": "",
                "secret_question_or_otp": false,
                "square_logo": false,
                "sso_corp": true,
                "sso": true,
                "dual": false,
                "hasWeb": false
            },
            "corporate": null,
            "env": "",
            "owner": "",
            "options": null,
            "connectionId": "",
            "created_at": "2020-07-20T06:44:58.789Z",
            "last_updated": "2020-10-06T18:24:59.522Z",
            "__v": 1,
            "link": null,
            "customer": "",
            "connected_account": [],
            "account": []
        }
    }
}

Get Records by Customers Bank

curl -X POST https://api.okra.ng/v2/products/records/getByCustomerByBank
-H 'Content-Type: application/json'
-d '{
        "record_id": "604ba2ea247435813de02e2e"
    }'
const okra_client = require('okra-node');
okra_client.getByCustomerByBank(accessToken, {record_id:"604ba2ea247435813de02e2e"}, (err, results) => {
    // Handle err
    const records = results.records;
    });
{
    "status": "success",
    "message": "Records successfully retrieved",
    "data": {
        "records": [
            {
                "_id": "",
                "usedProduct": {
                    "periodic-transactions": {
                        "status": false,
                        "number": 0
                    },
                    "guarantors": {
                        "status": false,
                        "number": 0
                    },
                    "directors": {
                        "status": false,
                        "number": 0
                    },
                    "auth": true,
                    "balance": false,
                    "accounts": false,
                    "transactions": false,
                    "income": false,
                    "identity": true,
                    "direct-debit": false
                },
                "status": {
                    "transactions": {
                        "last_success_at": null,
                        "last_fail_at": null
                    },
                    "process": {
                        "completed": true,
                        "running": false
                    }
                },
                "products": [],
                "billable_products": [],
                "source": "link",
                "limit": 6,
                "connected_account": [],
                "account": [],
                "currency": "NGN",
                "bank": {
                    "_id": "",
                    "icon": "",
                    "logo": "",
                    "name": "",
                    "v2_icon": "",
                    "v2_logo": ""
                },
                "corporate": false,
                "env": "",
                "link": "",
                "app_v": 2,
                "owner": {
                    "_id": "",
                    "name": "",
                    "app_name": ""
                },
                "options": null,
                "connectionId": "",
                "created_at": "",
                "last_updated": "",
                "__v": 0,
                "customer": {
                    "_id": "",
                    "credentials": [
                        ""
                    ],
                    "record": [],
                    "email": [],
                    "phone": [],
                    "blocked": false,
                    "owner": [],
                    "unconnected": false,
                    "name": "",
                    "env": "",
                    "created_at": "",
                    "last_updated": "",
                    "__v": 0
                },
                "id": ""
            }
        ],
        "record": null,
        "pagination": {
            "totalDocs": 16,
            "limit": 1,
            "hasPrevPage": false,
            "hasNextPage": true,
            "page": 1,
            "totalPages": 16,
            "pagingCounter": 1,
            "prevPage": null,
            "nextPage": 2
        }
    }
}

Run in PostmanRun in Postman

Fetch Transaction Record

curl -X POST https://api.okra.ng/v2/records/transactions/get
-H 'Content-Type: application/json'
-d '{
        "page": 1,
      "limit": 1
    }'
const okra_client = require('okra-node');
okra_client.getRecordTransactions(accessToken, {page:1, limit:1}, (err, results) => {
    // Handle err
    const records = results.records;
    });
{
    "status": "success",
    "message": "Transaction Sets successfully retrieved",
    "data": {
        "total": 346,
        "pagination": {
            "totalDocs": 346,
            "limit": 1,
            "hasPrevPage": false,
            "hasNextPage": true,
            "page": 1,
            "totalPages": 346,
            "pagingCounter": 1,
            "prevPage": null,
            "nextPage": 2
        },
        "trans": [
            {
                "count": 1983,
                "status": "",
                "_id": "",
                "account": {
                    "_id": "",
                    "nuban": "",
                    "name": ""
                },
                "customer": {
                    "_id": "",
                    "name": ""
                },
                "env": "",
                "owner": {
                    "_id": "",
                    "name": "",
                    "app_name": ""
                },
                "__v": 0,
                "bank": {
                    "colors": {
                        "primary": "",
                        "accent": "",
                        "button": "",
                        "icon": ""
                    },
                    "_id": "",
                    "icon": "",
                    "logo": "",
                    "name": "",
                    "v2_icon": ""
                },
                "created_at": "",
                "last_updated": "",
                "record": ""
            }
        ]
    }
}

Run in PostmanRun in Postman


What's Next
Did this page help you?