Transactions

Download Spec

Okra API endpoints for Transactions

Get transaction by id

post /transactions/getById

This endpoint allows you retrieve a paginated list of a specific transaction of a customer.

id

string

Request

{
  "id": "// id"
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Transactions retrieved succesfully",
  "data": {
    "pagination": {
      "totalDocs": 1,
      "limit": 20,
      "hasPrevPage": false,
      "hasNextPage": false,
      "page": 1,
      "totalPages": 1,
      "pagingCounter": 1
    },
    "transaction": [
      {
        "_id": "",
        "notes": {
          "desc": "",
          "topics": [],
          "places": [],
          "people": [],
          "actions": [
            ""
          ],
          "subjects": [
            ""
          ],
          "prepositions": [
            ""
          ]
        },
        "manual": false,
        "reconciled": false,
        "fetched": [
          ""
        ],
        "record": [
          ""
        ],
        "actions": [],
        "trans_date": "",
        "cleared_date": "",
        "unformatted_trans_date": "",
        "unformatted_cleared_date": "",
        "debit": 0.01,
        "ref": " ",
        "bank": {
          "icon": "",
          "logo": "",
          "name": "",
          "status": ""
        },
        "customer": {
          "_id": "",
          "name": ""
        },
        "account": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "checked": [],
        "created_at": "",
        "last_updated": "",
        "__v": 0,
        "id": ""
      }
    ]
  }
}

Get transaction by account

post /transactions/getByAccount

This endpoint allows you retrieve a paginated list of a specific transaction of a customer using the accountId

account

string

page

string

limit

string

Request

{
  "account": "// account id",
  "page": "1",
  "limit": "1"
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Transactions retrieved succesfully",
  "data": {
    "pagination": {
      "totalDocs": 38,
      "limit": 1,
      "hasPrevPage": false,
      "hasNextPage": true,
      "page": 1,
      "totalPages": 38,
      "pagingCounter": 1,
      "nextPage": 2
    },
    "transaction": [
      {
        "_id": "",
        "notes": {
          "desc": "",
          "topics": [],
          "places": [],
          "people": [],
          "actions": [
            ""
          ],
          "subjects": [
            "",
            ""
          ],
          "prepositions": []
        },
        "manual": false,
        "reconciled": false,
        "fetched": [
          ""
        ],
        "record": [
          ""
        ],
        "actions": [],
        "trans_date": "",
        "cleared_date": "",
        "unformatted_trans_date": "",
        "unformatted_cleared_date": "",
        "debit": 0.03,
        "bank": {
          "icon": "",
          "logo": "",
          "name": "",
          "status": ""
        },
        "customer": {
          "_id": "",
          "name": ""
        },
        "account": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "checked": [],
        "created_at": "",
        "last_updated": "",
        "__v": 0,
        "id": ""
      }
    ]
  }
}

Get transaction by date

post /transactions/getByDate

This endpoint allows you retrieve a paginated list of a specific transaction of a customer within a specific date range.

from

string

to

string

page

int

i32

limit

int

i32

Request

{
  "from": "2020-04-25",
  "to": "2020-06-29",
  "page": 1,
  "limit": 1
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Transactions retrieved succesfully",
  "data": {
    "pagination": {
      "totalDocs": 2339,
      "limit": 1,
      "hasPrevPage": false,
      "hasNextPage": true,
      "page": 1,
      "totalPages": 2339,
      "pagingCounter": 1,
      "nextPage": 2
    },
    "transaction": [
      {
        "_id": "",
        "notes": {
          "desc": "",
          "topics": [],
          "places": [],
          "people": [],
          "actions": [
            "",
            ""
          ],
          "subjects": [
            "",
            ""
          ],
          "prepositions": []
        },
        "manual": false,
        "reconciled": false,
        "fetched": [
          ""
        ],
        "record": [
          ""
        ],
        "actions": [],
        "analyzed": [
          ""
        ],
        "ner": {
          "TRANS_TYPE": ""
        },
        "ner_v": 1,
        "trans_date": "",
        "cleared_date": "",
        "unformatted_trans_date": "",
        "unformatted_cleared_date": "",
        "debit": 52.5,
        "ref": " ",
        "bank": {
          "icon": "",
          "logo": "",
          "name": "",
          "status": ""
        },
        "customer": {
          "_id": "",
          "name": ""
        },
        "account": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "checked": [],
        "created_at": "",
        "last_updated": "",
        "__v": 0,
        "id": ""
      }
    ]
  }
}

Get transaction by customer date

post /transactions/getByCustomerDate

This endpoint allows you retrieve a paginated list of a specific transaction of a customer within a specific customer date range.

from

string

to

string

page

int

i32

limit

int

i32

customer_id

string

Request

{
  "from": "2020-04-25",
  "to": "2020-06-29",
  "page": 1,
  "limit": 1,
  "customer_id": "// 6768uhashd9878shga987db8"
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Transactions retrieved succesfully",
  "data": {
    "pagination": {
      "totalDocs": 350,
      "limit": 1,
      "hasPrevPage": false,
      "hasNextPage": true,
      "page": 1,
      "totalPages": 350,
      "pagingCounter": 1,
      "nextPage": 2
    },
    "transaction": [
      {
        "_id": "",
        "notes": {
          "desc": "",
          "topics": [],
          "places": [],
          "people": [],
          "actions": [
            "",
            ""
          ],
          "subjects": [
            "",
            ""
          ],
          "prepositions": []
        },
        "manual": false,
        "reconciled": false,
        "fetched": [
          ""
        ],
        "record": [
          ""
        ],
        "actions": [],
        "analyzed": [
          ""
        ],
        "ner": {
          "TRANS_TYPE": ""
        },
        "ner_v": 1,
        "trans_date": "",
        "cleared_date": "",
        "unformatted_trans_date": "",
        "unformatted_cleared_date": "",
        "debit": 52.5,
        "ref": " ",
        "bank": {
          "icon": "",
          "logo": "",
          "name": "",
          "status": ""
        },
        "customer": {
          "_id": "",
          "name": ""
        },
        "account": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "checked": [],
        "created_at": "",
        "last_updated": "",
        "__v": 0,
        "id": ""
      }
    ]
  }
}

Get transaction by nuban

post /transactions/getByNuban

This endpoint allows you retrieve a paginated list of a specific transaction of a customer by passing the nuban account of that customer

nuban

string

page

int

i32

limit

int

i32

Request

{
  "nuban": "// nuban number",
  "page": 1,
  "limit": 1
}

Response

ExamplesSchema

OK

{
  "status": "success",
  "message": "Transactions retrieved successfully",
  "data": {
    "pagination": {
      "totalDocs": 465,
      "limit": 1,
      "hasPrevPage": false,
      "hasNextPage": true,
      "page": 1,
      "totalPages": 465,
      "pagingCounter": 1,
      "nextPage": 2
    },
    "transaction": [
      {
        "_id": "",
        "notes": {
          "desc": "",
          "topics": [],
          "places": [],
          "people": [],
          "actions": [],
          "subjects": [
            ""
          ],
          "prepositions": []
        },
        "manual": false,
        "reconciled": false,
        "fetched": [
          ""
        ],
        "record": [
          ""
        ],
        "actions": [],
        "trans_date": "",
        "cleared_date": "",
        "unformatted_trans_date": "",
        "unformatted_cleared_date": "",
        "credit": 3.21,
        "ref": "0",
        "branch": "",
        "bank": {
          "icon": "",
          "logo": "",
          "name": "",
          "status": ""
        },
        "customer": {
          "_id": "",
          "name": ""
        },
        "account": {
          "_id": "",
          "name": ""
        },
        "env": "",
        "checked": [],
        "created_at": "",
        "last_updated": "",
        "__v": 0,
        "id": ""
      }
    ]
  }
}

Was this page helpful?