Okra API endpoints for Customer
API endpoint to List of Customers
A successful request will return a HTTP 200 status code
/customers/list
page
string
required
Use can specify any page eg, 1
limit
string
required
Use can specify the limit of data you want eg, 1
bearer
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
}
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
status
string
message
string
data
object (data)
customers
array[object (Customer46)]
Customer46
object (Customer46)
_id
string
credentials
array[object (Credential)]
Credential
object (Credential)
bank
object (bank)
_id
string
colors
object (colors)
accent
string
primary
string
button
string
icon
string
icon
string
logo
string
name
string
v2_icon
string
v2_logo
string
nuban
string
accountName
string
connected
boolean
record
array[string]
string
email
array[string]
string
phone
array[string]
string
blocked
boolean
linkLater
array[string]
string
debitLater
array[string]
string
otherInfo
string or null
unconnected
boolean
manual
boolean
name
string
env
string
created_at
string
last_updated
string
__v
int
last_login
string
projects
array[string]
string
identity
string
merged
boolean
merged_ids
array[string]
string
current_project
string
options
object (options)
id
string
pagination
object (pagination)
totalDocs
int
The total number of results that match the request.
limit
int
Returns the value of the limit
parameter. Limit sets the number of results that the API returns in a single page. If you do not specify a value for limit
, the API will limit the response to 10 results per page.
hasPrevPage
boolean
Shows when a previous page of results is available. This field always returns true when the value of page
is greater than 1.
hasNextPage
boolean
Shows when a next page of results is available. When true
, Okra recommends that you make subsequent requests to retrieve the following pages of results.
page
int
Returns the number of the current page. For example, if you set page
to 1 in your request, the API will return the first page of results in the response.
totalPages
int
The total number of pages that the API returns.
pagingCounter
int
The index number of the first result on the current page. For example, if the value of page
is 2 and limit
is set to 10, then pagingCounter
returns 11.
prevPage
string or null
The number of previous result pages. If the value of page
is 1 and there is no previous page, the value of prevPage
is null
.
nextPage
string or null
The number of following result pages. Each page consists of up to 100
items. If there are not enough results for an additional page, the value is null
.
Date
string
Content-Length
string
Connection
string
Set-Cookie
string
Server
string
Content-Security-Policy
string
X-DNS-Prefetch-Control
string
Expect-CT
string
X-Frame-Options
string
Strict-Transport-Security
string
X-Download-Options
string
X-Content-Type-Options
string
X-Permitted-Cross-Domain-Policies
string
Referrer-Policy
string
X-XSS-Protection
string
x-documentation-url
string
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Access-Control-Allow-Credentials
string
ETag
string
API endpoint to Find Customers by model keys and values
A successful request will return a HTTP 200 status code
/customers/find-customers-by
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
bearer
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
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
status
string
message
string
data
object (data)
_id
string
email
array[string]
string
phone
array[string]
string
blocked
boolean
last_login
string
name
string
env
string
created_at
string
last_updated
string
__v
int
X-Powered-By
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
Access-Control-Allow-Credentials
string
Content-Length
string
ETag
string
Date
string
Connection
string
API endpoint to Flag Customer
A successful request will return a HTTP 200 status code
/customers/flag
bank
string
required
The bank id
customer
string
required
The customer id
bearer
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
API endpoint to UnFlag Customer
A successful request will return a HTTP 200 status code
/customers/unflag
bank
string
customer
string
unflag
boolean
bearer
{
"bank": "// bank id",
"customer": "// customer id",
"unflag": true
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
API endpoint to remove a customer.
/customers/remove
customer
string
required
The unique ID of a customer.
{
"customer": "14cd500fd471c22c762ee7d6"
}
OK
{
"status": "success",
"message": "Customer removed",
"data": {
"success": true,
"msg": "Customer removed"
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
status
string
The status of your request.
message
string
The response message.
data
object (data)
success
boolean
Indicates the result of the operation.
msg
string
The response message.
Was this page helpful?