Okra API endpoints for Customer
/customers/list
API endpoint to List of Customers
A successful request will return a HTTP 200 status code
page
string
required
Use can specify any page eg, 1
limit
string
required
Use can specify the limit of data you want eg, 1
OK
{
"status": "success",
"message": "Customers successfully retrieved",
"data": {
"customers": [
{
"_id": "5fe1e563798ba608e8f59756",
"credentials": [
{
"bank": {
"_id": "5d6fe57a4099cc4b210bbeb3",
"colors": {
"primary": "#D94F00",
"accent": "#DD4F05",
"button": "#DD4F05",
"icon": "#D94F00"
},
"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Guaranty+Trust+Bank+Logo+Color.svg",
"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/GT+Bank.svg",
"name": "Guaranty Trust Bank",
"v2_icon": "",
"v2_logo": ""
},
"nuban": "2075854027",
"accountName": "Test uSER 0",
"connected": false
},
{
"bank": {
"_id": "5d6fe57a4099cc4b210bbeb3",
"colors": {
"primary": "#D94F00",
"accent": "#DD4F05",
"button": "#DD4F05",
"icon": "#D94F00"
},
"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Guaranty+Trust+Bank+Logo+Color.svg",
"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/GT+Bank.svg",
"name": "Guaranty Trust Bank",
"v2_icon": "",
"v2_logo": ""
},
"nuban": "2075854027",
"accountName": "Test uSER 0",
"connected": false
}
],
"record": [
"1fe1e59ee302eb13f077a7ff",
"1fe31cac9bc54814ac2b578b",
"1fe31e1ffa288e1853728db1",
"1fe32264e23e2235f9afd579",
"1fea5960a2936c64f4ed2c89",
"1fea5ecd87f6d774a4751374",
"1fea66c1c045eb78daf108a8",
"1ff2e6a2cb023510048c455e",
"1ff2f5f29b3fc46a1012bc1d",
"1002bc27668bfc149743c3cd",
"10099d3cc0e5b81eabf10e60",
"1012b01065eb4067875a1955",
"1017fba7ca90790f2c79b5be",
"1017ff547551e306dfc10808",
"1017ff7785f9f22d0fb50424",
"10192d17ad128168008d957a",
"10192ea13e6a7e6bcad32153",
"10193c88fa3333706e2d765f",
"10194bece06c49193103ec4a",
"10194c528d1dba77a0a8d3b4",
"101abb3208d47d351f2e5d8a",
"101ac740c0bdf83ee640415e",
"101c159ede73e412e4afa0e4",
"101c168d18380d036854e2d1",
"101c21165ad02b5b63854267",
"101d6ee699703162e4ae8187",
"10211516c510bd41142a1da8",
"102115faf634a843f1df637e",
"102116d33c071743da1137aa",
"102124c73382d84da5a7423a",
"102128c1745afb670046da1a",
"10228eb62681ea42e986b137",
"10262df07c36800ab727deb6",
"1026642180f2892fc05c5fdc",
"10300a2e7a26ef6177c69df4",
"111ac3c851c11329a5400ff8"
],
"email": [
"Lempi_Bashirian43@gmail.com",
"Katrina51@yahoo.com"
],
"phone": [
"00920637172",
"03327967011"
],
"blocked": false,
"linkLater": [],
"debitLater": [],
"unconnected": false,
"manual": true,
"name": "Indicina Tester 1",
"env": "production-sandbox",
"created_at": "2020-12-22T12:24:03.673Z",
"last_updated": "2021-08-16T20:00:23.275Z",
"__v": 0,
"last_login": "2021-08-16T20:00:23.000Z",
"projects": [
"5ff633889e64635f2629e04d"
],
"identity": "611abfdd3f399928618cd5fc",
"merged": true,
"merged_ids": [],
"current_project": "5ff633889e64635f2629e04d",
"options": {},
"id": "5fe1e563798ba608e8f59756"
}
],
"pagination": {
"totalDocs": 1723,
"limit": 1,
"hasPrevPage": false,
"hasNextPage": true,
"page": 1,
"totalPages": 1723,
"pagingCounter": 1,
"nextPage": 2
}
}
}
/customers/find-customers-by
API endpoint to Find Customers by model keys and values
A successful request will return a HTTP 200 status code
key
string
required
You can specify the email of the customer as the key
value
string
required
Input the actual email of the client you want to find
OK
{
"status": "success",
"message": "Customer search by email succesfully fetched",
"data": {
"_id": "",
"email": [
""
],
"phone": [
""
],
"blocked": false,
"last_login": "2020-08-25T13:01:37.000Z",
"name": "",
"env": "production",
"created_at": "2020-08-25T12:56:36.625Z",
"last_updated": "2020-08-25T13:01:37.788Z",
"__v": 0
}
}
/customers/flag
API endpoint to Flag Customer
A successful request will return a HTTP 200 status code
bank
string
required
The bank id
customer
string
required
The customer id
Empty response
/customers/unflag
API endpoint to UnFlag Customer
A successful request will return a HTTP 200 status code
bank
string
customer
string
unflag
boolean
{
"bank": "// bank id",
"customer": "// customer id",
"unflag": true
}
Empty response
/customers/remove
API endpoint to remove a customer.
customer
string
required
The unique ID of a customer.
{
"customer": "14cd500fd471c22c762ee7d6"
}
OK
{
"status": "success",
"message": "Customer removed",
"data": {
"success": true,
"msg": "Customer removed"
}
}
Was this page helpful?