Overview

This document outlines how to call Periculum’s Insights API. Your subscription includes access to 50 free api calls in the first month.

Periculum’s Insights API (Insights) is a product that helps lenders obtain valuable information from consumer bank statements.

Insights offers three main features for consumer bank statements: analytics, affordability, and credit scoring.

Postman collection can be downloaded from here.

Authentication

To utilize any of Insights endpoints, your app is required to first identify and authorize itself against an authorization server by obtaining an access token.

To authenticate against the authorization server, you must ensure that you have received your app’s client_id and client_secret from Periculum. Without these, your app will be unable to obtain an access token and call endpoints on the Insights API. If you have not obtained your client_id or client_secret, then you should contact Periculum’s standard support channel (email support@periculum.io).

In the authentication request, your app will utilize the client_credentials OAuth 2.0 flow. Details on this flow can be found at https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/, and for your convenience an outline of the flow in the context of Insights is covered in the diagram below

  1. Customer’s app (backend, server) authenticates against the Authorization Server using its Client ID and Client Secret.
  2. The Authorization Server validates the Client ID and Client Secret.
  3. The Authorization Server responds with an Access Token.
  4. The customer’s application can use the Access Token to call the Insights API on behalf of itself.
  5. The Insights API responds with requested data.

Authentication Request

The customer is required to make a request as follows (example is in curl)

curl --location --request POST 'https://periculum-technologies-inc.auth0.com/oauth/token'
--header 'Content-Type: application/json'
--data-raw '{
      "client_id": "customer_client_id",
      "client_secret": "customer_client_secret",
      "audience": "https://api.insights-periculum.com",
      "grant_type": "client_credentials"
}'

The response from the authorization server will be as follows:

{
    "access_token": "string_encrypted_access_token",
    "expires_in": 604800,
    "token_type": "Bearer"
}

Error Codes

401 Unauthorized

Additional Notes

A valid access token lasts for the number of seconds specified in the expires_in field. An app should check to make sure that the token is not expired before sending a request to the Insights API, otherwise the Insights API will return an unauthorized response. A reasonable approach would be to obtain a new token some period before the current token expires (5 minutes, 15 minutes before token expiry etc.).

Generate Statement Analytics

Method Endpoint Headers Parameters Body
POST /statements/analytics Authorization value: Bearer string_encrypted_access_token

format

accepted values: periculum, mono, okra, mybankstatement, dojah

statementType

accepted values: consumer,business

application/json body

There are two statement types that you can send JSON statements in. They are outlined in the parameters column in the table above. If it is not included in the request, request will identify statement type as “CONSUMER” bydefault. There are multiple formats that you can send JSON statements in. They are outlined in the parameters column in the table above

curl --location --request POST 'https://api.insights-periculum.com/statements/analytics?format=periculum&statementType=consumer'
--header 'Authorization: Bearer string_encrypted_access_token'
--header 'Content-Type: application/json'
--data-raw '{
"statementName": "Mandatory Statement Name",
"transactions": [
{
"date": "6/17/2020",
"description": "opb opening balance",
"balance": 16162.02,
"amount": 0.0,
"type": "Debit"
},
{
"date": "6/19/2020",
"description": "vansouser trf//frm oladipupo david bello to oladipupo",
"balance": 11151.27,
"amount": 5010.75,
"type": "Debit"
},
{
"date": "7/31/2020",
"description": "vansouser trf//frm bbbbbb to aaaaaa",
"balance": 142279.89,
"amount": 15026.88,
"type": "Debit"
},
{
"date": "8/3/2020",
"description": "accessdev cccccccc/mob/uto/123456789/000001/",
"balance": 143279.89,
"amount": 1000.0,
"type": "Credit"
},
{
"date": "8/3/2020",
"description": "vansouser trf//frm bbbbbb to aaaaaa",
"balance": 140269.14,
"amount": 3010.75,
"type": "Debit"
},
{
"date": "8/3/2020",
"description": "vansouser trf//frm bbbbbb to aaaaaa",
"balance": 138358.39,
"amount": 1910.75,
"type": "Debit"
},
{
"date": "8/4/2020",
"description": "vansouser trf//frm bbbbbb to aaaaaa",
"balance": 128731.51,
"amount": 9626.88,
"type": "Debit"
},
{
"date": "8/5/2020",
"description": "vansouser trf//frm bbbbbb to aaaaaa",
"balance": 94704.63,
"amount": 34026.88,
"type": "Debit"
},
{
"date": "8/7/2020",
"description": "vansouser trf//frm bbbbbb to aaaaaa",
"balance": 79677.75,
"amount": 15026.88,
"type": "Debit"
},
{
"date": "8/7/2020",
"description": "vansouser trf//frm bbbbbb to aaaaaa",
"balance": 69650.87,
"amount": 10026.88,
"type": "Debit"
}
]
}

curl --location --request POST 'https://api.insights-periculum.com/statements/analytics?format=mono&statementType=consumer'
--header 'Authorization: Bearer string_encrypted_access_token'
--header 'Content-Type: application/json'
--data-raw '{"statementName": "MONO Statement 1",
	"meta": {
		"count": 291
	},
	"data": [
		{
			"_id": "6143d0d8fd931f44eb105b62",
			"type": "credit",
			"amount": 1000,
			"narration": "000023210806155803002010439758|ONLINE: TO GTBANK PLC|AAAAAAAAAAAA |109385562106150857||AAAAAAAAAAAAAA REF:000023210806155803002010439758 ",
			"date": "2021-08-06T10:28:00.300Z",
			"balance": 17518498
		},
		{
			"_id": "6143d0d8fd931f44eb105b68",
			"type": "debit",
			"amount": 187,
			"narration": "000013210805104201000261968776 VAT ON NIP TRANSFER FOR 000013210805104201000261968776 VIA GTWORLD TO AAAAAAAAAA REF:GW252239767000000250002108051041",
			"date": "2021-08-05T05:11:00.400Z",
			"balance": 18907498
		},
		{
			"_id": "6143d0d8fd931f44eb105b69",
			"type": "debit",
			"amount": 2500,
			"narration": "000013210805104201000261968776 NIP TRANSFER COMMISSION FOR 000013210805104201000261968776 VIA GTWORLD TO AAAAAAAAAA REF:GW252239767000000250002108051041",
			"date": "2021-08-05T05:11:00.400Z",
			"balance": 18907685
		},
		{
			"_id": "6143d0d8fd931f44eb105b6a",
			"type": "debit",
			"amount": 2500000,
			"narration": "000013210805104201000261968776 VIA GTWORLD TO AAAAAAAAAAAAAAAAAAA /26.875/REF:GW2522397670000002500021080510 F",
			"date": "2021-08-05T05:11:00.400Z",
			"balance": 18910185
		},
		{
			"_id": "6143d0d8fd931f44eb105b6b",
			"type": "credit",
			"amount": 20000000,
			"narration": "110006210805094005007180668001|SALARY ADVANCEBRASS TECHNOLOGIES INC|0007180668001||PAYSTACK REF:110006210805094005007180668001 ",
			"date": "2021-08-05T05:10:00.400Z",
			"balance": 21410185
		},
		{
			"_id": "6143d0d8fd931f44eb105b6c",
			"type": "debit",
			"amount": 10000,
			"narration": "VIA INTERNET BANKING TXD_G0ARIMNQ0F - MONO TEST PAYMENT FROM AAAAAAAAAAAA TO MONO TECHNOLOGIES NIGERIA LTD",
			"date": "2021-08-05T01:42:00.500Z",
			"balance": 1410185
		},
		{
			"_id": "6143d0d8fd931f44eb105b6d",
			"type": "credit",
			"amount": 1000,
			"narration": "VIA GAPSLITE REM REF:292137630000000000102108050135 FROM MONO TECHNOLOGIES NIGERIA LTD TO AAAAAAAAAAAAAAAA",
			"date": "2021-08-04T15:35:00.100Z",
			"balance": 1420185
		},
		{
			"_id": "6143d0d8fd931f44eb105b6e",
			"type": "debit",
			"amount": 5000,
			"narration": "03082021 STAMP DUTY CHARGE - 03/08/2021",
			"date": "2021-08-03T17:46:00.100Z",
			"balance": 1419185
		},
		{
			"_id": "6143d0d8fd931f44eb105b6f",
			"type": "credit",
			"amount": 67000,
			"narration": "110002210803212836000149977591|MONO SETTLEMENT FOR 832021|045732616626||TRF REF:110002210803212836000149977591 ",
			"date": "2021-08-03T15:58:00.500Z",
			"balance": 1424185
		},
		{
			"_id": "6143d0d8fd931f44eb105b70",
			"type": "credit",
			"amount": 100000,
			"narration": "090267210803194305276100001623|SENT FROM KUDA|090267210803194305276100001623||AAAAAAAAAAAAAA REF:090267210803194305276100001623 ",
			"date": "2021-08-03T14:13:00.300Z",
			"balance": 1357185
		}
	]
}'

curl --location --request POST 'https://api.insights-periculum.com/statements/analytics?format=okra&statementType=consumer'
--header 'Authorization: Bearer string_encrypted_access_token'
--header 'Content-Type: application/json'
--data-raw '{
	"statementName": "Okra statement 1",
	"data": {
		"transaction": [			
			{
				"_id": "6168330700ef2ec91fea78e1",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-13T15:38:00.621Z",
				"credit": null,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": 76008,
				"notes": {
					"desc": "Dolores adipisci unde explicabo omnis qui neque minima voluptas vero.",
					"topics": [
						"b"
					],
					"places": [
						"c"
					],
					"people": [
						"a"
					],
					"actions": [
						"b"
					],
					"subjects": [
						"b"
					],
					"prepositions": [
						"a"
					]
				},
				"ref": null,
				"trans_date": "2021-10-14T02:41:10.969Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": null,
				"branch": "PWZUNLY1726",
				"code": "z",
				"created_at": "2021-10-14T13:39:19.539Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"616832ec07b91104fbb09134",
					"616833f6b15a9c05f0ba50cd",
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "14-10-2021",
				"unformatted_trans_date": "13-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "6168330700ef2ec91fea78e1"
			},
			{
				"_id": "6168340700ef2ec91feccb05",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-14T04:35:37.953Z",
				"credit": 31459,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": null,
				"notes": {
					"desc": "Modi ipsa labore esse sit molestiae.",
					"topics": [
						"a"
					],
					"places": [
						"b"
					],
					"people": [
						"b"
					],
					"actions": [
						"a"
					],
					"subjects": [
						"b"
					],
					"prepositions": [
						"c"
					]
				},
				"ref": null,
				"trans_date": "2021-10-14T02:09:28.138Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": null,
				"branch": "YLDACOK1358",
				"code": "r",
				"created_at": "2021-10-14T13:43:35.099Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"616833f6b15a9c05f0ba50cd",
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "14-10-2021",
				"unformatted_trans_date": "14-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "6168340700ef2ec91feccb05"
			},
			{
				"_id": "6168340700ef2ec91feccaf5",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-14T02:36:27.992Z",
				"credit": null,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": 51854,
				"notes": {
					"desc": "Eveniet expedita autem quos qui ab quae eveniet animi ipsa.",
					"topics": [
						"c"
					],
					"places": [
						"b"
					],
					"people": [
						"a"
					],
					"actions": [
						"a"
					],
					"subjects": [
						"c"
					],
					"prepositions": [
						"c"
					]
				},
				"ref": null,
				"trans_date": "2021-10-13T22:58:33.867Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": null,
				"branch": "GALOPSE1",
				"code": "0",
				"created_at": "2021-10-14T13:43:35.099Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"616833f6b15a9c05f0ba50cd",
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "13-10-2021",
				"unformatted_trans_date": "14-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "6168340700ef2ec91feccaf5"
			},
			{
				"_id": "6168353600ef2ec91fef7c8c",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-13T19:53:08.361Z",
				"credit": 69427,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": null,
				"notes": {
					"desc": "Illum soluta est aut iure aliquam voluptatem hic unde a.",
					"topics": [
						"c"
					],
					"places": [
						"a"
					],
					"people": [
						"a"
					],
					"actions": [
						"c"
					],
					"subjects": [
						"b"
					],
					"prepositions": [
						"b"
					]
				},
				"ref": null,
				"trans_date": "2021-10-13T21:07:26.888Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": null,
				"branch": "PKFIKGI1",
				"code": "g",
				"created_at": "2021-10-14T13:48:38.685Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "13-10-2021",
				"unformatted_trans_date": "13-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "6168353600ef2ec91fef7c8c"
			},
			{
				"_id": "616744f600ef2ec91f94b5b8",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-13T00:06:19.704Z",
				"credit": null,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": 2645,
				"notes": {
					"desc": "Commodi sunt deleniti illo molestiae quia autem iste illo.",
					"topics": [
						"b"
					],
					"places": [
						"b"
					],
					"people": [
						"c"
					],
					"actions": [
						"c"
					],
					"subjects": [
						"a"
					],
					"prepositions": [
						"c"
					]
				},
				"ref": null,
				"trans_date": "2021-10-13T20:24:32.784Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": null,
				"branch": "DXEEISW1405",
				"code": "5",
				"created_at": "2021-10-13T20:43:34.339Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"616744e12e384404fb40b983",
					"616832ec07b91104fbb09134",
					"616833f6b15a9c05f0ba50cd",
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "13-10-2021",
				"unformatted_trans_date": "13-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "616744f600ef2ec91f94b5b8"
			},
			{
				"_id": "6167428600ef2ec91f91df38",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-13T19:37:33.787Z",
				"credit": null,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": 99473,
				"notes": {
					"desc": "Porro dolores architecto fugit inventore.",
					"topics": [
						"c"
					],
					"places": [
						"a"
					],
					"people": [
						"b"
					],
					"actions": [
						"a"
					],
					"subjects": [
						"c"
					],
					"prepositions": [
						"c"
					]
				},
				"ref": null,
				"trans_date": "2021-10-13T19:58:50.268Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": null,
				"branch": "RTRAGIK1",
				"code": "n",
				"created_at": "2021-10-13T20:33:10.765Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"616741c53cbe3802d561d877",
					"616743f260ee8c041496102a",
					"6167449cab6b5404b9d861cc",
					"616744e12e384404fb40b983",
					"616832ec07b91104fbb09134",
					"616833f6b15a9c05f0ba50cd",
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "13-10-2021",
				"unformatted_trans_date": "13-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "6167428600ef2ec91f91df38"
			},
			{
				"_id": "6167441100ef2ec91f93825f",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-13T17:50:18.083Z",
				"credit": null,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": 91436,
				"notes": {
					"desc": "Sequi voluptatem eveniet fugit.",
					"topics": [
						"a"
					],
					"places": [
						"a"
					],
					"people": [
						"b"
					],
					"actions": [
						"c"
					],
					"subjects": [
						"a"
					],
					"prepositions": [
						"c"
					]
				},
				"ref": null,
				"trans_date": "2021-10-13T19:36:58.961Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": null,
				"branch": "CZWEROQ1903",
				"code": "g",
				"created_at": "2021-10-13T20:39:45.752Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"616743f260ee8c041496102a",
					"6167449cab6b5404b9d861cc",
					"616744e12e384404fb40b983",
					"616832ec07b91104fbb09134",
					"616833f6b15a9c05f0ba50cd",
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "13-10-2021",
				"unformatted_trans_date": "13-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "6167441100ef2ec91f93825f"
			},
			{
				"_id": "6168353600ef2ec91fef7c4f",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-14T07:33:16.044Z",
				"credit": 21723,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": null,
				"notes": {
					"desc": "Voluptates perspiciatis eligendi.",
					"topics": [
						"c"
					],
					"places": [
						"a"
					],
					"people": [
						"a"
					],
					"actions": [
						"a"
					],
					"subjects": [
						"a"
					],
					"prepositions": [
						"c"
					]
				},
				"ref": null,
				"trans_date": "2021-10-13T19:18:59.859Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": null,
				"branch": "NOQESTT1",
				"code": "p",
				"created_at": "2021-10-14T13:48:38.685Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "13-10-2021",
				"unformatted_trans_date": "14-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "6168353600ef2ec91fef7c4f"
			},
			{
				"_id": "616744b000ef2ec91f946334",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-13T04:58:54.939Z",
				"credit": 99842,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": null,
				"notes": {
					"desc": "Eum provident unde architecto enim maxime autem aut quas.",
					"topics": [
						"c"
					],
					"places": [
						"b"
					],
					"people": [
						"c"
					],
					"actions": [
						"b"
					],
					"subjects": [
						"c"
					],
					"prepositions": [
						"b"
					]
				},
				"ref": null,
				"trans_date": "2021-10-13T18:44:24.535Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": null,
				"branch": "SPKURUR1",
				"code": "f",
				"created_at": "2021-10-13T20:42:24.623Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"6167449cab6b5404b9d861cc",
					"616744e12e384404fb40b983",
					"616832ec07b91104fbb09134",
					"616833f6b15a9c05f0ba50cd",
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "13-10-2021",
				"unformatted_trans_date": "13-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "616744b000ef2ec91f946334"
			},
			{
				"_id": "616744b000ef2ec91f94633a",
				"bank": {
					"name": "Access Bank",
					"logo": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo.svg",
					"icon": "https://okra-images.s3.eu-west-3.amazonaws.com/Access+Bank+PLC+Logo+Color.svg",
					"status": "healthy"
				},
				"cleared_date": "2021-10-12T23:18:02.599Z",
				"credit": null,
				"customer": {
					"_id": "61674268915892001d846230",
					"name": "Zabeeh",
					"bvn": "16012704546"
				},
				"debit": 76972,
				"notes": {
					"desc": "Voluptates eveniet voluptatem eum.",
					"topics": [
						"a"
					],
					"places": [
						"c"
					],
					"people": [
						"c"
					],
					"actions": [
						"a"
					],
					"subjects": [
						"b"
					],
					"prepositions": [
						"b"
					]
				},
				"ref": null,
				"trans_date": "2021-10-13T18:34:24.108Z",
				"account": {
					"_id": "6139db2525038a6e175d7bb1",
					"nuban": null,
					"name": "CHIBUNNA HENRY ONUOHA"
				},
				"balance": 188821.11,
				"branch": "KVIENOR1",
				"code": "4",
				"created_at": "2021-10-13T20:42:24.623Z",
				"currency": null,
				"env": "production-sandbox",
				"last_updated": "2021-10-19T04:15:10.601Z",
				"record": [
					"6167449cab6b5404b9d861cc",
					"616744e12e384404fb40b983",
					"616832ec07b91104fbb09134",
					"616833f6b15a9c05f0ba50cd",
					"61683524bcd101076a896ef6",
					"616ac5e774aed701cd99abed",
					"616d5d6dc70813001d7662f5",
					"616d5ebac70813001d766461",
					"616d6798ca86cf001c5b1d6c",
					"616d6856ca86cf001c5b1de2",
					"616d68d3ca86cf001c5b1eb8",
					"616d7f0baae4d7001d5506d3",
					"616dcca5fb3f4b001d19d447"
				],
				"unformatted_cleared_date": "13-10-2021",
				"unformatted_trans_date": "12-10-2021",
				"projects": [
					"6155cc23c95022e15b9fe2e2"
				],
				"fetched": [
					"6155cc23a0727c001d04a290",
					null
				],
				"id": "616744b000ef2ec91f94633a"
			}
		]
	}
}'

curl --location --request POST 'https://api.insights-periculum.com/statements/analytics?format=dojah&statementType=consumer'
--header 'Authorization: Bearer string_encrypted_access_token'
--header 'Content-Type: application/json'
--data-raw '{
    "statementName":"Dojah from prod",
    "entity": {
        "transactions": [
            {
                "transaction_date": "2021-04-12",
                "value_date": "2021-04-12",
                "trans_type": "debit",
                "bank_name": "Access Bank",
                "amount": "2000.00",
                "available_balance": "94625",
                "reference": "",
                "narration": "901Airtime- 2348126323601"
            },
            {
                "transaction_date": "2021-04-13",
                "value_date": "2021-04-13",
                "trans_type": "credit",
                "bank_name": "Access Bank",
                "amount": "2000.00",
                "available_balance": "2946.25",
                "reference": "",
                "narration": "EITEOBHOR, RICHARD"
            },
            {
                "transaction_date": "2021-04-13",
                "value_date": "2021-04-13",
                "trans_type": "credit",
                "bank_name": "Access Bank",
                "amount": "25000.00",
                "available_balance": "27946.25",
                "reference": "",
                "narration": "TRF//FRM AINA OLUYEMI"
            },
            {
                "transaction_date": "2021-04-15",
                "value_date": "2021-04-15",
                "trans_type": "debit",
                "bank_name": "Access Bank",
                "amount": "2100.00",
                "available_balance": "25846.25",
                "reference": "",
                "narration": "AIRTIME/"
            },
            {
                "transaction_date": "2021-04-15",
                "value_date": "2021-04-15",
                "trans_type": "debit",
                "bank_name": "Access Bank",
                "amount": "1000.00",
                "available_balance": "24846.25",
                "reference": "",
                "narration": "AIRTIME/"
            },
            {
                "transaction_date": "2021-04-19",
                "value_date": "2021-04-19",
                "trans_type": "debit",
                "bank_name": "Access Bank",
                "amount": "2000.00",
                "available_balance": "22846.25",
                "reference": "",
                "narration": "AIRTIME/"
            },
            {
                "transaction_date": "2021-04-21",
                "value_date": "2021-04-21",
                "trans_type": "debit",
                "bank_name": "Access Bank",
                "amount": "2000.00",
                "available_balance": "20846.25",
                "reference": "",
                "narration": "AIRTIME/"
            },
            {
                "transaction_date": "2021-04-25",
                "value_date": "2021-04-25",
                "trans_type": "credit",
                "bank_name": "Access Bank",
                "amount": "3000.00",
                "available_balance": "23846.25",
                "reference": "",
                "narration": "OSO  AYOMIDE"
            },
            {
                "transaction_date": "2021-04-26",
                "value_date": "2021-04-26",
                "trans_type": "debit",
                "bank_name": "Access Bank",
                "amount": "2000.00",
                "available_balance": "21846.25",
                "reference": "",
                "narration": "AIRTIME/"
            },
            {
                "transaction_date": "2021-04-26",
                "value_date": "2021-04-26",
                "trans_type": "debit",
                "bank_name": "Access Bank",
                "amount": "32.00",
                "available_balance": "21814.25",
                "reference": "",
                "narration": "SMS Alert Fee-24/03-"
            },
            {
                "transaction_date": "2021-04-26",
                "value_date": "2021-04-26",
                "trans_type": "debit",
                "bank_name": "Access Bank",
                "amount": "200.00",
                "available_balance": "21614.25",
                "reference": "",
                "narration": "AIRTIME/"
            }
        ],
        "total": 440,
        "previous_page": "",
        "next_page": "",
        "total_pages": 1,
        "current_page": 1
    }
}'

curl --location --request POST 'https://api.insights-periculum.com/statements/analytics?format=mybankstatement&statementType=consumer'
--header 'Authorization: Bearer string_encrypted_access_token'
--header 'Content-Type: application/json'
--data-raw '{
    "bankStatement": {
        "mbs": {
            "jsonData": {
                "statementName": "statement my bank 1",
                "status": "success",
                "Name": "xxxxx",
                "Nuban": "0725460028",
                "AccountCategory": "IND",
                "AccountType": "SAVINGS",
                "TicketNo": "1395814-6",
                "AvailableBal": "4894.6400",
                "BookBal": "4894.6400",
                "TotalCredit": "1369432.54",
                "TotalDebit": "1380699.92",
                "Tenor": "3",
                "Period": "6/17/2020 12:00:00 AM to 9/17/2020 12:00:00 AM",
                "Currency": "NGN",
                "Address": "NYSC SECRETARIAT SOKOTO NO 8 SPRING DRIVE  ABUJA FCT SOKOTO SOKOTO NG",
                "Applicants": "Periculum Applicant",
                "Signatories": [
                    {
                        "Name": "N/A",
                        "BVN": "98765"
                    }
                ],
                "Details": [
                    {
                        "PTransactionDate": "6/17/2020",
                        "PValueDate": "6/17/2020",
                        "PNarration": "OPB Opening Balance",
                        "PCredit": 0,
                        "PDebit": 0,
                        "PBalance": 16162.02
                    },                    
                    {
                        "PTransactionDate": "9/7/2020",
                        "PValueDate": "9/7/2020",
                        "PNarration": "VANSOUSER TRF//FRM AO TO B",
                        "PCredit": 0,
                        "PDebit": 6126.88,
                        "PBalance": 36895.15
                    },
                    {
                        "PTransactionDate": "9/7/2020",
                        "PValueDate": "9/7/2020",
                        "PNarration": "VANSOUSER TRF//FRM A TO B",
                        "PCredit": 0,
                        "PDebit": 4210.75,
                        "PBalance": 32684.40
                    },
                    {
                        "PTransactionDate": "9/7/2020",
                        "PValueDate": "9/7/2020",
                        "PNarration": "VANSOUSER TRF//FRM A TO B",
                        "PCredit": 0,
                        "PDebit": 2360.75,
                        "PBalance": 30323.65
                    },
                    {
                        "PTransactionDate": "9/7/2020",
                        "PValueDate": "9/7/2020",
                        "PNarration": "VANSOUSER TRF//FRM A TO B",
                        "PCredit": 0,
                        "PDebit": 3810.75,
                        "PBalance": 26512.90
                    },
                    {
                        "PTransactionDate": "9/7/2020",
                        "PValueDate": "9/7/2020",
                        "PNarration": "VANSOUSER TRF//FRM A TO B",
                        "PCredit": 0,
                        "PDebit": 5126.88,
                        "PBalance": 21386.02
                    },
                    {
                        "PTransactionDate": "9/9/2020",
                        "PValueDate": "9/9/2020",
                        "PNarration": "VANSOUSER TRF//FRM A TO B",
                        "PCredit": 0,
                        "PDebit": 4010.75,
                        "PBalance": 17375.27
                    },
                    {
                        "PTransactionDate": "9/10/2020",
                        "PValueDate": "9/10/2020",
                        "PNarration": "VANSOUSER TRF//FRM A TO B",
                        "PCredit": 0,
                        "PDebit": 2010.75,
                        "PBalance": 15364.52
                    },
                    {
                        "PTransactionDate": "9/10/2020",
                        "PValueDate": "9/10/2020",
                        "PNarration": "VANSOUSER BILLS/9Mobile  e-top  up/08188555611",
                        "PCredit": 0,
                        "PDebit": 1000,
                        "PBalance": 14364.52
                    },
                    {
                        "PTransactionDate": "9/11/2020",
                        "PValueDate": "9/11/2020",
                        "PNarration": "VANSOUSER TRF//FRM A TO B",
                        "PCredit": 0,
                        "PDebit": 5126.88,
                        "PBalance": 9237.64
                    }                    
                ]
            },
            "bank": "access"
        }
    }
}'

Common Request Body Parameters For Periculum, MONO, OKRA and DOJAH Statements

Body Parameter Name Required Body Parameter Description Type
statementName Yes A unique name for a statement. string
clientFullName No The full name of the consumer for which the statement is being analyzed. string
bankName No The name of the bank which issued the statement. string
accountType No The type of the account. string
accountName No The name of the account. string
transactions Yes An array of transactions array
transactions[i].date Yes A date representation of when the transaction occurred. Preferably in ISO 8601. Date string (preferably in ISO 8601 format: ex. yyyy-MM-dd)
transactions[i].description Yes A description of the transaction string
transactions[i].balance Yes A balance of the account when the transaction occurred. double
transactions[i].amount Yes The amount of money in the transaction. double
transactions[i].type Yes The type of transaction, must be either DEBIT or CREDIT. string

Response

{	
        "key": 1,
	"name": "Mandatory Statement Name",
	"source": "PERICULUM",
	"clientFullName": "somename",
	"clientPhoneNumber": number,
	"accountType": "account type",
	"accountBalance": "account balance",
	"accountName": "account name",
	"bankName": "bank name",
	"statementType": "CONSUMER",
	"startDate": "2020-06-17T00:00:00",
	"endDate": "2020-06-17T00:00:00",
	"createdDate": "2021-11-10T15:57:13.2546941Z",
	"processingStatus": "PROCESSED",
	"clientIdentification": [
	{
		"identifierName": "bvn",
		"identifierValue": null
	},
	{
		"identifierName": "nin",
		"identifierValue": null
	}
	],
	"spendAnalysis": {
		"averageMonthlySpendOnTransfer": 17761.56,
		"averageMonthlySpendOnAtmAndPOS": 0,
		"averageMonthlySpendOnUSSD": 485.38,
		"averageMonthlySpendOnGambling": 0,
		"averageMonthlySpendOnAirtimeAndData": 1000,
		"averageMonthlySpendOnUtilities": 0,
		"averageMonthlySpendOnOnlineAndWeb": 0,
		"averageMonthlySpendOnTransportation": 0,
		"averageMonthlySpendOnHealth": 0,
		"averageMonthlySpendOnTravel": 0,
		"averageMonthlySpendOnEntertainment": 0,
		"averageMonthlySpendOnHospitalityAndFood": 0,
		"averageMonthlySpendOnRent": 0,
		"averageMonthlySpendOnInsurance": 0,
		"averageMonthlySpendOnChargesAndStampDuty": 0,
		"averageMonthlySpendOnInternationalTransactions": 0,
		"averageMonthlyTotalExpenses": 19246.94,
		"averageMonthlyRecurringExpense": 236361.93,
		"averageMonthlySpendOnSavingsAndInvestments": 0,
		"averageMonthlySpendOnOthers": 51888.67,
		"mostRecurringExpense": "transfer_transactions",
		"totalSpendOnTransfer": 589921.4,
		"totalSpendOnAtmAndPOS": 356066.8,
		"totalSpendOnUSSD": 0,
		"totalSpendOnGambling": 0,
		"totalSpendOnAirtimeAndData": 11050,
		"totalSpendOnUtilities": 0,
		"totalSpendOnOnlineAndWeb": 0,
		"totalSpendOnTransportation": 0,
		"totalSpendOnHealth": 0,
		"totalSpendOnTravel": 0,
		"totalSpendOnEntertainment": 0,
		"totalSpendOnHospitalityAndFood": 0,
		"totalSpendOnRent": 0,
		"totalSpendOnInsurance": 0,
		"totalSpendOnChargesAndStampDuty": 521.4,
		"totalSpendOnInternationalTransactions": 0,
		"totalMonthlyExpenses": 957559.6,
		"totalRecurringExpense": 0,
		"totalExpenses": 1264049.98,
		"totalMonthlySpendOnSavingsAndInvestments": 0,
		"totalSpendOnOthers": 207554.68,
		"atmLocations": ["xyz","abc"],
		"mostFrequentSpendCategory": "transfer_transactions",
		"monthWithHighestSpend": "4/2020",
		"highestSpend": 540591.36,
		"mostFrequentExpense": "nip cr olajide oluwatimilehin adedotun eco",
		"mostFrequentExpenseAmount": 5000,
	},
	"transactionPatternAnalysis": {
		"lastDayOfCredit": "2020-09-14",
		"lastDayOfDebit": "2020-09-14",
		"percentDebitTransactions": 0.88,
		"percentCreditTransactions": 0.12,
		"totalNumberOfTransactions": 128,
		"percentOfTransactionsLessThan10ThousandNaira": 0.71,
		"percentOfTransactionsBetween10ThousandTo100ThousandNaira": 0.25,
		"percentOfTransactionsBetween100ThousandTo500ThousandNaira": 0.05,
		"percentOfTransactionsBetween500ThousandToOneMillionNaira": 0,
		"percentOfTransactionsGreaterThanOneMillionNaira": 0,
		"percentNumberOfDaysTransactionsWasLessThan10ThousandNaira": 0.79,
		"percentOfBalancesLessThan10ThousandNaira": 0.25,
		"percentOfBalancesBetween10ThousandTo100ThousandNaira": 0.31,
		"percentOfBalancesBetween100ThousandTo500ThousandNaira": 0.44,
		"percentOfBalancesBetween500ThousandToOneMillionNaira": 0,
		"percentOfBalancesGreaterThanOneMillionNaira": 0,
		"percentNumberOfDaysBalanceWasLessThan10ThousandNaira": 0.35,
		"mostFrequentBalanceRange": "100k-500k",
		"mostFrequentTransactionRange": "<=10k",
		"numberOfCardRequests": 0,
		"mostFrequentCreditTransfer": "nip/abn/lagos bus services ltd",
		"mostFrequentDebitTransfer": "nip/abn/lagos bus services ltd",
		"returnCheque": 0,
		"balanceBreakdown": [
		{
		    "min": -1E+18,
		    "max": 500,
		    "percentageOfTransactionsInBucket": 0.058
		},
		{
		    "min": 500,
		    "max": 1000,
		    "percentageOfTransactionsInBucket": 0.017
		},
		{
		    "min": 1000,
		    "max": 10000,
		    "percentageOfTransactionsInBucket": 0.017
		},
		{
		    "min": 10000,
		    "max": 100000,
		    "percentageOfTransactionsInBucket": 0.149
		},
		{
		    "min": 100000,
		    "max": 500000,
		    "percentageOfTransactionsInBucket": 0.76
		},
		{
		    "min": 500000,
		    "max": 1000000,
		    "percentageOfTransactionsInBucket": 0
		},
		{
		    "min": 1000000,
		    "max": 1E+18,
		    "percentageOfTransactionsInBucket": 0
		}
		],
		"transactionBreakdown": [
		{
		    "min": -1E+18,
		    "max": 500,
		    "percentageOfTransactionsInBucket": 0.306
		},
		{
		    "min": 500,
		    "max": 1000,
		    "percentageOfTransactionsInBucket": 0.033
		},
		{
		    "min": 1000,
		    "max": 10000,
		    "percentageOfTransactionsInBucket": 0.339
		},
		{
		    "min": 10000,
		    "max": 100000,
		    "percentageOfTransactionsInBucket": 0.256
		},
		{
		    "min": 100000,
		    "max": 500000,
		    "percentageOfTransactionsInBucket": 0.066
		},
		{
		    "min": 500000,
		    "max": 1000000,
		    "percentageOfTransactionsInBucket": 0
		},
		{
		    "min": 1000000,
		    "max": 1E+18,
		    "percentageOfTransactionsInBucket": 0
		}
		],
		"percentNumberOfDaysTransactionsInSmallestBucket": 0.634,
		"percentNumberOfDaysBalancesInSmallestBucket": 0.146,
	},
	"behavioralAnalysis": {
		"monthToMonthInflowToOutflowRate": "Equal Cash Flow",
		"overallInflowToOutflowRate": "Equal Cash Flow",
		"totalLoanAmount": 13000,
		"totalLoanRepaymentAmount": 0,
		"loanToInflowRate": 0.01,
		"loanRepaymentToInflowRate": 0,
		"numberLoanTransactions": 1,
		"numberRepaymentTransactions": 0,
		"gamblingStatus": "No Gambling Transactions Found",
		"gamblingRate": 0,
		"accountActivity": 0.5,
		"percentOfInflowIrregularity": 0.14,
		"averageMonthlyLoanAmount": 0.5,
		"averageMonthlyLoanRepaymentAmount": 0.5,
		"accountSweep": "No"
	},
	"cashFlowAnalysis": {
		"totalCreditTurnover": 1369432.54,
		"totalDebitTurnOver": 1380699.92,
		"averageMonthlyCredits": 342358.14,
		"averageMonthlyDebits": 345174.98,
		"averageWeeklyCredits": 105340.96,
		"averageWeeklyDebits": 98621.42,
		"averageMonthlyBalance": 96925.31,
		"averageWeeklyBalance": 82462.91,
		"numberOfTransactingMonths": 4,
                "monthlyOutflow": [
		{
		    "year": "2021",
		    "month-name": "January",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "April",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "May",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "June",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "July",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "August",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "September",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "October",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "November",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "December",
		    "amount": 749336.54
		},
		{
		    "year": "2022",
		    "month-name": "January",
		    "amount": 295526.89
		},
		{
		    "year": "2022",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "April",
		    "amount": 0
		}
		],
		"monthlyInflow": [
		{
		    "year": "2021",
		    "month-name": "January",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "April",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "May",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "June",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "July",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "August",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "September",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "October",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "November",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "December",
		    "amount": 749336.54
		},
		{
		    "year": "2022",
		    "month-name": "January",
		    "amount": 295526.89
		},
		{
		    "year": "2022",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "April",
		    "amount": 0
		}
		],
		"periodInStatement": "June - September",
		"yearInStatement": "2020",
		"firstDateInStatement": "2020-06-17",
		"lastDateInStatement": "2020-09-14",
		"closingBalance": 4894.64
	},
	"incomeAnalysis": {
                "salaryTransactions": [
	        {
		    "date": "2021-12-16 18:45:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-04 16:33:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-12 14:35:00",
		    "description": "Some description",
		    "amount": 5000
		},
		{
		    "date": "2022-01-12 14:38:00",
		    "description": "Some description",
		    "amount": 25000
		},
		{
		    "date": "2022-01-29 13:19:00",
		    "description": "Some description",
		    "amount": 10000
		}
		],
		"averagePredictedSalary": 374385.22,
		"isSalaryEarner": "Yes",
		"expectedSalaryPaymentDay": 24,
		"frequencyOfSalaryPayments": "1",
		"lastDateOfSalaryPayment": "2020-08-24",
		"numberOfSalaryPayments": 3,
		"hasOtherIncome": "No",
                "otherIncomeTransactions": [
		{
		    "date": "2021-12-16 18:45:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-04 16:33:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-12 14:35:00",
		    "description": "Some description",
		    "amount": 5000
		},
		{
		    "date": "2022-01-12 14:38:00",
		    "description": "Some description",
		    "amount": 25000
		},
		{
		    "date": "2022-01-29 13:19:00",
		    "description": "Some description",
		    "amount": 10000
		}
		],
		"averageOtherIncome": 0,
		"numberOfOtherIncomePayments": 0,
		"lowestSalary": 374385.22,
		"mostRecentSalary": 374385.22,
	}
}

Additional Notes

A minimum of ten transactions are required, otherwise a 404 bad request will be returned by the Insights API.

Generate Statement Analytics Via Upload PDF

When you submit a PDF for processing, the analytics are not generated immediately. PDF processing can take a while depending on the size of the PDF. The PUT endpoint will return metadata about the PDF statement immediately, and one field in particular, processingStatus, will initially be UPLOADED. After you call this PUT endpoint, poll the GET Statement Analytics Endpoint periodically (30 seconds to a minute is a reasonable polling interval) for the analytics. If the processingStatus changes to PROCESSED, the analytics will be available in the GET Statement Analytics Endpoint.

Method Endpoint Headers Parameters Body
PUT /statements Authorization value: Bearer string_encrypted_access_token file, password, statementType application/multipart/form-data

curl --location --request PUT 'https://api.insights-periculum.com/statements' 
--header 'Authorization: Bearer string_encrypted_accesst_token' 
--header 'Content-Type: application/multipart/form-data' 
--data-body'{
    "file": file,
    "password:"",
    "statementType":"consumer"
}'

Request Parameters

Name Description Type Required
File
PDF which needs to be analysed file Yes
Password Password for the PDF (If PDF is password protected) string No
statementType There are two statement types that you can send JSON statements in. They are outlined in the parameters column in the table above. If it is not included in the request, request will identify statement type as “CONSUMER” bydefault. string No

{	
        "key": 1,
	"name": "Mandatory Statement Name",
	"source": "PERICULUM",
	"clientFullName": "somename",
	"clientPhoneNumber": number,
	"accountType": "account type",
	"accountBalance": "account balance",
	"accountName": "account name",
	"bankName": "bank name",
	"statementType": "CONSUMER",
	"startDate": "2020-06-17T00:00:00",
	"endDate": "2020-06-17T00:00:00",
	"createdDate": "2021-11-10T15:57:13.2546941Z",
	"processingStatus": "PROCESSED",
	"clientIdentification": [
	{
		"identifierName": "bvn",
		"identifierValue": null
	},
	{
		"identifierName": "nin",
		"identifierValue": null
	}
	],
	"spendAnalysis": {
		"averageMonthlySpendOnTransfer": 17761.56,
		"averageMonthlySpendOnAtmAndPOS": 0,
		"averageMonthlySpendOnUSSD": 485.38,
		"averageMonthlySpendOnGambling": 0,
		"averageMonthlySpendOnAirtimeAndData": 1000,
		"averageMonthlySpendOnUtilities": 0,
		"averageMonthlySpendOnOnlineAndWeb": 0,
		"averageMonthlySpendOnTransportation": 0,
		"averageMonthlySpendOnHealth": 0,
		"averageMonthlySpendOnTravel": 0,
		"averageMonthlySpendOnEntertainment": 0,
		"averageMonthlySpendOnHospitalityAndFood": 0,
		"averageMonthlySpendOnRent": 0,
		"averageMonthlySpendOnInsurance": 0,
		"averageMonthlySpendOnChargesAndStampDuty": 0,
		"averageMonthlySpendOnInternationalTransactions": 0,
		"averageMonthlyTotalExpenses": 19246.94,
		"averageMonthlyRecurringExpense": 236361.93,
		"averageMonthlySpendOnSavingsAndInvestments": 0,
		"averageMonthlySpendOnOthers": 51888.67,
		"mostRecurringExpense": "transfer_transactions",
		"totalSpendOnTransfer": 589921.4,
		"totalSpendOnAtmAndPOS": 356066.8,
		"totalSpendOnUSSD": 0,
		"totalSpendOnGambling": 0,
		"totalSpendOnAirtimeAndData": 11050,
		"totalSpendOnUtilities": 0,
		"totalSpendOnOnlineAndWeb": 0,
		"totalSpendOnTransportation": 0,
		"totalSpendOnHealth": 0,
		"totalSpendOnTravel": 0,
		"totalSpendOnEntertainment": 0,
		"totalSpendOnHospitalityAndFood": 0,
		"totalSpendOnRent": 0,
		"totalSpendOnInsurance": 0,
		"totalSpendOnChargesAndStampDuty": 521.4,
		"totalSpendOnInternationalTransactions": 0,
		"totalMonthlyExpenses": 957559.6,
		"totalRecurringExpense": 0,
		"totalExpenses": 1264049.98,
		"totalMonthlySpendOnSavingsAndInvestments": 0,
		"totalSpendOnOthers": 207554.68,
		"atmLocations": ["xyz","abc"],
		"mostFrequentSpendCategory": "transfer_transactions",
		"monthWithHighestSpend": "4/2020",
		"highestSpend": 540591.36,
		"mostFrequentExpense": "nip cr olajide oluwatimilehin adedotun eco",
		"mostFrequentExpenseAmount": 5000,
	},
	"transactionPatternAnalysis": {
		"lastDayOfCredit": "2020-09-14",
		"lastDayOfDebit": "2020-09-14",
		"percentDebitTransactions": 0.88,
		"percentCreditTransactions": 0.12,
		"totalNumberOfTransactions": 128,
		"percentOfTransactionsLessThan10ThousandNaira": 0.71,
		"percentOfTransactionsBetween10ThousandTo100ThousandNaira": 0.25,
		"percentOfTransactionsBetween100ThousandTo500ThousandNaira": 0.05,
		"percentOfTransactionsBetween500ThousandToOneMillionNaira": 0,
		"percentOfTransactionsGreaterThanOneMillionNaira": 0,
		"percentNumberOfDaysTransactionsWasLessThan10ThousandNaira": 0.79,
		"percentOfBalancesLessThan10ThousandNaira": 0.25,
		"percentOfBalancesBetween10ThousandTo100ThousandNaira": 0.31,
		"percentOfBalancesBetween100ThousandTo500ThousandNaira": 0.44,
		"percentOfBalancesBetween500ThousandToOneMillionNaira": 0,
		"percentOfBalancesGreaterThanOneMillionNaira": 0,
		"percentNumberOfDaysBalanceWasLessThan10ThousandNaira": 0.35,
		"mostFrequentBalanceRange": "100k-500k",
		"mostFrequentTransactionRange": "<=10k",
		"numberOfCardRequests": 0,
		"mostFrequentCreditTransfer": "nip/abn/lagos bus services ltd",
		"mostFrequentDebitTransfer": "nip/abn/lagos bus services ltd",
		"returnCheque": 0,
		"balanceBreakdown": [
		{
		    "min": -1E+18,
		    "max": 500,
		    "percentageOfTransactionsInBucket": 0.058
		},
		{
		    "min": 500,
		    "max": 1000,
		    "percentageOfTransactionsInBucket": 0.017
		},
		{
		    "min": 1000,
		    "max": 10000,
		    "percentageOfTransactionsInBucket": 0.017
		},
		{
		    "min": 10000,
		    "max": 100000,
		    "percentageOfTransactionsInBucket": 0.149
		},
		{
		    "min": 100000,
		    "max": 500000,
		    "percentageOfTransactionsInBucket": 0.76
		},
		{
		    "min": 500000,
		    "max": 1000000,
		    "percentageOfTransactionsInBucket": 0
		},
		{
		    "min": 1000000,
		    "max": 1E+18,
		    "percentageOfTransactionsInBucket": 0
		}
		],
		"transactionBreakdown": [
		{
		    "min": -1E+18,
		    "max": 500,
		    "percentageOfTransactionsInBucket": 0.306
		},
		{
		    "min": 500,
		    "max": 1000,
		    "percentageOfTransactionsInBucket": 0.033
		},
		{
		    "min": 1000,
		    "max": 10000,
		    "percentageOfTransactionsInBucket": 0.339
		},
		{
		    "min": 10000,
		    "max": 100000,
		    "percentageOfTransactionsInBucket": 0.256
		},
		{
		    "min": 100000,
		    "max": 500000,
		    "percentageOfTransactionsInBucket": 0.066
		},
		{
		    "min": 500000,
		    "max": 1000000,
		    "percentageOfTransactionsInBucket": 0
		},
		{
		    "min": 1000000,
		    "max": 1E+18,
		    "percentageOfTransactionsInBucket": 0
		}
		],
		"percentNumberOfDaysTransactionsInSmallestBucket": 0.634,
		"percentNumberOfDaysBalancesInSmallestBucket": 0.146,
	},
	"behavioralAnalysis": {
		"monthToMonthInflowToOutflowRate": "Equal Cash Flow",
		"overallInflowToOutflowRate": "Equal Cash Flow",
		"totalLoanAmount": 13000,
		"totalLoanRepaymentAmount": 0,
		"loanToInflowRate": 0.01,
		"loanRepaymentToInflowRate": 0,
		"numberLoanTransactions": 1,
		"numberRepaymentTransactions": 0,
		"gamblingStatus": "No Gambling Transactions Found",
		"gamblingRate": 0,
		"accountActivity": 0.5,
		"percentOfInflowIrregularity": 0.14,
		"averageMonthlyLoanAmount": 0.5,
		"averageMonthlyLoanRepaymentAmount": 0.5,
		"accountSweep": "No"
	},
	"cashFlowAnalysis": {
		"totalCreditTurnover": 1369432.54,
		"totalDebitTurnOver": 1380699.92,
		"averageMonthlyCredits": 342358.14,
		"averageMonthlyDebits": 345174.98,
		"averageWeeklyCredits": 105340.96,
		"averageWeeklyDebits": 98621.42,
		"averageMonthlyBalance": 96925.31,
		"averageWeeklyBalance": 82462.91,
		"numberOfTransactingMonths": 4,
                "monthlyOutflow": [
		{
		    "year": "2021",
		    "month-name": "January",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "April",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "May",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "June",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "July",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "August",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "September",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "October",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "November",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "December",
		    "amount": 749336.54
		},
		{
		    "year": "2022",
		    "month-name": "January",
		    "amount": 295526.89
		},
		{
		    "year": "2022",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "April",
		    "amount": 0
		}
		],
		"monthlyInflow": [
		{
		    "year": "2021",
		    "month-name": "January",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "April",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "May",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "June",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "July",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "August",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "September",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "October",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "November",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "December",
		    "amount": 749336.54
		},
		{
		    "year": "2022",
		    "month-name": "January",
		    "amount": 295526.89
		},
		{
		    "year": "2022",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "April",
		    "amount": 0
		}
		],
		"periodInStatement": "June - September",
		"yearInStatement": "2020",
		"firstDateInStatement": "2020-06-17",
		"lastDateInStatement": "2020-09-14",
		"closingBalance": 4894.64
	},
	"incomeAnalysis": {
                "salaryTransactions": [
	        {
		    "date": "2021-12-16 18:45:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-04 16:33:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-12 14:35:00",
		    "description": "Some description",
		    "amount": 5000
		},
		{
		    "date": "2022-01-12 14:38:00",
		    "description": "Some description",
		    "amount": 25000
		},
		{
		    "date": "2022-01-29 13:19:00",
		    "description": "Some description",
		    "amount": 10000
		}
		],
		"averagePredictedSalary": 374385.22,
		"isSalaryEarner": "Yes",
		"expectedSalaryPaymentDay": 24,
		"frequencyOfSalaryPayments": "1",
		"lastDateOfSalaryPayment": "2020-08-24",
		"numberOfSalaryPayments": 3,
		"hasOtherIncome": "No",
                "otherIncomeTransactions": [
		{
		    "date": "2021-12-16 18:45:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-04 16:33:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-12 14:35:00",
		    "description": "Some description",
		    "amount": 5000
		},
		{
		    "date": "2022-01-12 14:38:00",
		    "description": "Some description",
		    "amount": 25000
		},
		{
		    "date": "2022-01-29 13:19:00",
		    "description": "Some description",
		    "amount": 10000
		}
		],
		"averageOtherIncome": 0,
		"numberOfOtherIncomePayments": 0,
		"lowestSalary": 374385.22,
		"mostRecentSalary": 374385.22,
	}
}

Variable Definition

The response contains the generated statement analytics metadata along with all the analytics variables. Below is a table outlining all the analytics variables, their descriptions and types.

The bucket of analysis regarding the consumer’s spending patterns.

Variable Name Description Type
spendAnalysis.averageMonthlySpendOnTransfer Captures the average monthly amount spent on transfer. double
spendAnalysis.averageMonthlySpendOnAtmAndPOS Captures the average monthly amount spent on ATM and POS transactions. double
spendAnalysis.averageMonthlySpendOnChargesAndStampDuty Captures the average monthly amount spent on Bank Charges and Stamp Duty. double
spendAnalysis.averageMonthlySpendOnEntertainment Captures the average monthly amount spent on Entertainment. double
spendAnalysis.averageMonthlySpendOnGambling Captures the average monthly amount spent on Gambling. double
spendAnalysis.averageMonthlySpendOnHealth Captures the average monthly amount spent on Health. double
spendAnalysis.averageMonthlySpendOnHospitalityandFood Captures the average monthly amount spent on Hospitality and Food. double
spendAnalysis.averageMonthlySpendOnInsurance Captures the average monthly amount spent on Insurance double
spendAnalysis.averageMonthlySpendOnOnlineandWeb Captures the average monthly amount spent on Online and Web Transactions double
spendAnalysis.averageMonthlySpendOnRent Captures the average monthly amount spent on rent double
spendAnalysis.averageMonthlySpendOnTravel Captures the average monthly spend on travel double
spendAnalysis.averageMonthlySpendOnUSSD Captures the average monthly spend on USSD Transactions double
spendAnalysis.averageMonthlySpendOnAirtimeandData Captures the average monthly spend on Airtime and Data double
spendAnalysis.averageMonthlySpendOnUtilities Captures the average monthly spend on Utilities double
spendAnalysis.averageMonthlySpendOnTransportation Captures the average monthly spend on transportation double
spendAnalysis.averageMonthlySpendOnInternationalTransactions Captures the average amount spent on international transactions double
spendAnalysis.averageMonthlyTotalExpenses Captures the average monthly total expenses double
spendAnalysis.averageMonthlySpendOnSavingsAndInvestments Captures the average monthly spend on savings and investments double
spendAnalysis.averageMonthlySpendOnOthers Captures the average monthly value of debit transactions executed on other transactions not listed in the spend bucket double
spendAnalysis.averageMonthlyRecurringExpense Captures the average monthly recurring expenses double
spendAnalysis.mostRecurringExpense Captures the most recurring expense string
spendAnalysis.totalSpendOnTransfer Captures the total amount spent on transfer. double
spendAnalysis.totalSpendOnAtmAndPOS Captures the total amount spent on ATM and POS transactions. double
spendAnalysis.totalSpendOnChargesAndStampDuty Captures the total amount spent on Bank Charges and Stamp Duty. double
spendAnalysis.totalSpendOnEntertainment Captures the total amount spent on Entertainment. double
spendAnalysis.totalSpendOnGambling Captures the total amount spent on Gambling. double
spendAnalysis.totalSpendOnHealth Captures the total amount spent on Health. double
spendAnalysis.totalSpendonHospitalityandFood Captures the total amount spent on Hospitality and Food. double
spendAnalysis.totalSpendOnInsurance Captures the total amount spent on Insurance double
spendAnalysis.totalSpendOnOnlineandWeb Captures the total amount spent on Online and Web Transactions double
spendAnalysis.totalSpendOnRent Captures the total amount spent on rent double
spendAnalysis.totalSpendOnTravel Captures the total spend on travel double
spendAnalysis.totalSpendOnUSSD Captures the total spend on USSD Transactions double
spendAnalysis.totalSpendOnAirtimeandData Captures the total spend on Airtime and Data double
spendAnalysis.totalSpendOnUtilities Captures the total spend on Utilities double
spendAnalysis.totalSpendOnTransportation Captures the total spend on transportation double
spendAnalysis.totalSpendOnInternationalTransactions Captures the total amount spent on international transactions double
spendAnalysis.totalMonthlyExpenses Captures the total monthly expenses double
spendAnalysis.totalSpendOnSavingsAndInvestments Captures the total monthly value of debit transactions spent on savings and investments double
spendAnalysis.totalSpendOnOthers Captures the total spend in others: total monthly value of debit transactions executed on other transactions not listed in the spend bucket double
spendAnalysis.totalRecurringExpense Captures total amount for the recurring expense double
spendAnalysis.totalExpenses Captures total amount for the expense double
spendAnalysis.atmLocations Captures all of the ATM Locations string
spendAnalysis.mostFrequentSpendCategory Spend category with the highest debit transactions string
spendAnalysis.monthWithHighestSpend Month with the highest debit amount string
spendAnalysis.highestSpend The highest debit amount in the bank statement string
spendAnalysis.mostFrequentExpense Expense with the highest transactions string
spendAnalysis.mostFrequentExpenseAmount Amount spent on the most frequent expense double

The bucket of analysis regarding the consumer’s spending patterns.

Variable Name Description  Type
patternAnalysis.lastDayofCredit The last date a credit was made within the statement. string
patternAnalysis.lastDayofDebit The last date a debit was made within the statement. string
patternAnalysis.percentDebitTransactions The percentage of debit transactions within the statement double
patternAnalysis.percentCreditTransactions The percentage of credit transactions within the statement double
patternAnalysis.totalNumberOfTransactions The total number of transactions within the statement double
patternAnalysis.percentOfTransactionsLessThan10ThousandNaira The percentage of transactions less than 10k within the statement double
patternAnalysis.percentOfTransactionsBetween10ThousandTo100ThousandNaira The percentage of transactions between 10k and 100k within the statement double
patternAnalysis.percentOfTransactionsBetween100ThousandTo500ThousandNaira The percentage of transactions between 100k and 500k within the statement double
patternAnalysis.percentOfTransactionsBetween500ThousandToOneMillionNaira The percentage of transactions between 500k and 1M within the statement double
patternAnalysis.percentOfTransactionsGreaterThanOneMillionNaira The percentage of transactions greater than 1M within the statement double
patternAnalysis.percentNumberOfDaysTransactionsWasLessThan10ThousandNaira The percentage number of days with less than 10k transactions within the statement double
patternAnalysis.percentOfBalancesLessThan10ThousandNaira The percentage of balance less than 10k within the statement double
patternAnalysis.percentOfBalancesBetween10ThousandTo100ThousandNaira The percentage of balance between 10k and 100k within the statement double
patternAnalysis.percentOfBalancesBetween100ThousandTo500ThousandNaira The percentage of balance between 100k and 500k within the statement double
patternAnalysis.percentOfBalancesBetween500ThousandToOneMillionNaira The percentage of balance between 500k and 1M within the statement double
patternAnalysis.percentOfBalancesGreaterThanOneMillionNaira The percentage of balance greater than 1M within the statement double
patternAnalysis.percentNumberOfDaysBalanceWasLessThan10ThousandNaira The percentage number of days with less than 10k balance within the statement double
patternAnalysis.mostFrequentBalanceRange The most frequent balance range within the statement string
patternAnalysis.mostFrequentTransactionRange The most frequent transaction range within the statement string
patternAnalysis.numberOfCardRequests The number of card requests within the statements double
patternAnalysis.mostFrequentCreditTransfer Most occuring incoming transfer transaction string
patternAnalysis.mostFrequentDebitTransfer Most frequent outgoing transfer transaction string
patternAnalysis.returnCheque Cheque returned int
patternAnalysis.balanceBreakdown An array of buckets that categorize transactions based on the minimum and maximum values of the bucket. The minimum and maximum values of a bucket define a continous interval that categorizes transaction balance amounts for that bucket. The first bucket will contain an extremely large negative min value for the bucket to capture negative transaction balances. The last bucket will contain an extremely large max value to capture all large transaction balances. array
patternAnalysis.balanceBreakdown[i].min The minimum balance (inclusive) of a transaction that can fit inside a balanceBreakdown.bucket double
patternAnalysis.balanceBreakdown[i].max The maximum balance (exclusive) of a transaction that can fit inside a balanceBreadown.bucket double
patternAnalysis.balanceBreakdown[i].percentageOfTransactionsInBucket The percentage of transactions that fill within the bucket.For every other bucket that is not first or last the min is the minimum amount of a transaction to be categorized in the bucket, while the max is the amount that is the upper range for the bucket exclusive. double
patternAnalysis.transactionBreakdown An array of buckets that categorize transactions based on the minimum and maximum values of the bucket. The minimum and maximum values of a bucket define a continous interval that categorizes transaction amounts. The first bucket will contain an extremely large negative min value for the bucket to capture negative transaction amounts. The last bucket will contain an extremely large max value to capture all large transaction amounts. double
patternAnalysis.transactionBreakdown[i].min The minimum amount (inclusive) of a transaction that can fit inside a transactionBreakdown.bucket double
patternAnalysis.transactionBreakdown[i].max The maximum amount (exclusive) of a transaction that can fit inside a transactionBreakdown.bucket double
patternAnalysis.transactionBreakdown[i].percentageOfTransactionsInBucket The percentage of transactions that fill within the bucket.For every other bucket that is not first or last the min is the minimum amount of a transaction to be categorized in the bucket, while the max is the amount that is the upper range for the bucket exclusive. double
patternAnalysis.percentNumberOfDaysTransactionsInSmallestBucket Percent number of days transactions were in smallest bucket double
patternAnalysis.percentNumberOfDaysBalancesInSmallestBucket Percent number of days balance were in smallest bucket double

NOTE: Highlighted fields will be deprecated soon. Please use the bucket transactions and balance instead.

The bucket of analysis regarding the customer’s behavioral pattern. It gives information on the following:

Variable Name Description Type
behavioralAnalysis.monthToMonthInflowToOutflowRate Captures the month to month inflow to outflow rate within the statement string
behavioralAnalysis.overallInflowToOutflowRate Captures the overall inflow to outflow rate string
behavioralAnalysis.totalLoanAmount Captures the total loan amount within the statement double
behavioralAnalysis.totalLoanRepaymentAmount Captures the total loan repayment amount within the statement double
behavioralAnalysis.loanToInflowRate Captures the loan to inflow rate within the statement double
behavioralAnalysis.loanRepaymentToInflowRate Captures the loan repayment to inflow rate within the statement double
behavioralAnalysis.numberLoanTransactions Captures the total number of loan transactions within the statement double
behavioralAnalysis.numberRepaymentTransactions Captures the number of repayment transactions within the statement double
behavioralAnalysis.gamblingStatus Captures the customer’s  gambling status within the statement string
behavioralAnalysis.gamblingRate Captures the customer’s gambling rater double
behavioralAnalysis.accountActivity Captures the percentage of active transactions within the statement double
behavioralAnalysis.percentOfInflowIrregularity Captures the percentage of irregularities in credit amount within the statement double
behavioralAnalysis.averageMonthlyLoanAmount Captures the average monthly loan amount double
behavioralAnalysis.averageMonthlyLoanRepaymentAmount Captures the average monthly loan repayment amount double
behavioralAnalysis.accountSweep Shows if recycling of funds is seen or balance field is of a similar amount for large parts of the statement string

The bucket of analysis regarding the customer’s cash flow pattern depicted on the statement. It gives information on the following:

Variable Name Description Type
cashFlowAnalysis.totalCreditTurnover The customer’s total credit turnover captured within the statement double
cashFlowAnalysis.totalDebitTurnOver The customer’s total debit turnover captured within the statement double
cashFlowAnalysis.averageMonthlyCredits The customer’s average monthly credit transactions within the statement double
cashFlowAnalysis.averageMonthlyDebits The customer’s average monthly debit transactions within the statement double
cashFlowAnalysis.averageWeeklyCredits The customer’s average weekly credit transactions within the statement double
cashFlowAnalysis.averageWeeklyDebits The customer’s average weekly debit transactions within the statement double
cashFlowAnalysis.averageMonthlyBalance The customer’s average monthly balance within the statement double
cashFlowAnalysis.averageWeeklyBalance The customer’s average weekly balance within the statement double
cashFlowAnalysis.numberOfTransactingMonths The number of transacting months within the statement double
cashFlowAnalysis.periodInStatement The statement period string
cashFlowAnalysis.yearInStatement The year in the statement string
cashFlowAnalysis.firstDateInStatement The first date within the statement string
cashFlowAnalysis.lastDateInStatement The last date within the statement string
cashFlowAnalysis.closingBalance The balance at the statement end double
cashFlowAnalysis.monthlyOutflow
cashFlowAnalysis.monthlyInflow

The bucket of analysis regarding the end user’s income. This variable gives information on the following:

Variable Name Description Type
incomeAnalysis.averagePredictedSalary The average salary predicted within the statement double
incomeAnalysis.isSalaryEarner Indicates if the customer is a salary earner string
incomeAnalysis.expectedSalaryPaymentDay The expected salary payment date double
incomeAnalysis.frequencyOfSalaryPayments The frequency of salary payments string
incomeAnalysis.lastDateOfSalaryPayment The last date of salary payment string
incomeAnalysis.numberOfSalaryPayments The number of salary payment within the statement double
incomeAnalysis.hasOtherIncome Indicates if the end user has other income string
incomeAnalysis.NetAverageMonthlyEarning Captures the total income left in the account less loans, bills and utilities, charges, expenses, etc double
incomeAnalysis.averageOtherIncome The average non-salary income within the statement double
incomeAnalysis.numberOfOtherIncomePayments The number of other income payment captured within the statement double
incomeAnalysis.lowestSalary Lowest salary across all months in the bank statement double
incomeAnalysis.mostRecentSalary Latest salary in the bank statement string
incomeAnalysis.salaryTransactions
incomeAnalysis.otherIncomeTransactions

Get Existing Statement Analytics

This endpoint assumes that you have previously generated analytics for a statement. You must specify the key of the previously generated analytics to recieve its details. 

Method Endpoint Headers Parameters
GET /statements/{statementKey} Authorization value: Bearer string_encrypted_access_token accepted values: key for an existing statement

curl --location --request GET 'https://api.insights-periculum.com/statements/{statementKey}'
--header 'Authorization: Bearer string_encrypted_access_token'
--header 'Content-Type: application/json'
--data- none

{	
        "key": 1,
	"name": "Mandatory Statement Name",
	"source": "PERICULUM",
	"clientFullName": "somename",
	"clientPhoneNumber": number,
	"accountType": "account type",
	"accountBalance": "account balance",
	"accountName": "account name",
	"bankName": "bank name",
	"statementType": "CONSUMER",
	"startDate": "2020-06-17T00:00:00",
	"endDate": "2020-06-17T00:00:00",
	"createdDate": "2021-11-10T15:57:13.2546941Z",
	"processingStatus": "PROCESSED",
	"clientIdentification": [
	{
		"identifierName": "bvn",
		"identifierValue": null
	},
	{
		"identifierName": "nin",
		"identifierValue": null
	}
	],
	"spendAnalysis": {
		"averageMonthlySpendOnTransfer": 17761.56,
		"averageMonthlySpendOnAtmAndPOS": 0,
		"averageMonthlySpendOnUSSD": 485.38,
		"averageMonthlySpendOnGambling": 0,
		"averageMonthlySpendOnAirtimeAndData": 1000,
		"averageMonthlySpendOnUtilities": 0,
		"averageMonthlySpendOnOnlineAndWeb": 0,
		"averageMonthlySpendOnTransportation": 0,
		"averageMonthlySpendOnHealth": 0,
		"averageMonthlySpendOnTravel": 0,
		"averageMonthlySpendOnEntertainment": 0,
		"averageMonthlySpendOnHospitalityAndFood": 0,
		"averageMonthlySpendOnRent": 0,
		"averageMonthlySpendOnInsurance": 0,
		"averageMonthlySpendOnChargesAndStampDuty": 0,
		"averageMonthlySpendOnInternationalTransactions": 0,
		"averageMonthlyTotalExpenses": 19246.94,
		"averageMonthlyRecurringExpense": 236361.93,
		"averageMonthlySpendOnSavingsAndInvestments": 0,
		"averageMonthlySpendOnOthers": 51888.67,
		"mostRecurringExpense": "transfer_transactions",
		"totalSpendOnTransfer": 589921.4,
		"totalSpendOnAtmAndPOS": 356066.8,
		"totalSpendOnUSSD": 0,
		"totalSpendOnGambling": 0,
		"totalSpendOnAirtimeAndData": 11050,
		"totalSpendOnUtilities": 0,
		"totalSpendOnOnlineAndWeb": 0,
		"totalSpendOnTransportation": 0,
		"totalSpendOnHealth": 0,
		"totalSpendOnTravel": 0,
		"totalSpendOnEntertainment": 0,
		"totalSpendOnHospitalityAndFood": 0,
		"totalSpendOnRent": 0,
		"totalSpendOnInsurance": 0,
		"totalSpendOnChargesAndStampDuty": 521.4,
		"totalSpendOnInternationalTransactions": 0,
		"totalMonthlyExpenses": 957559.6,
		"totalRecurringExpense": 0,
		"totalExpenses": 1264049.98,
		"totalMonthlySpendOnSavingsAndInvestments": 0,
		"totalSpendOnOthers": 207554.68,
		"atmLocations": ["xyz","abc"],
		"mostFrequentSpendCategory": "transfer_transactions",
		"monthWithHighestSpend": "4/2020",
		"highestSpend": 540591.36,
		"mostFrequentExpense": "nip cr olajide oluwatimilehin adedotun eco",
		"mostFrequentExpenseAmount": 5000,
	},
	"transactionPatternAnalysis": {
		"lastDayOfCredit": "2020-09-14",
		"lastDayOfDebit": "2020-09-14",
		"percentDebitTransactions": 0.88,
		"percentCreditTransactions": 0.12,
		"totalNumberOfTransactions": 128,
		"percentOfTransactionsLessThan10ThousandNaira": 0.71,
		"percentOfTransactionsBetween10ThousandTo100ThousandNaira": 0.25,
		"percentOfTransactionsBetween100ThousandTo500ThousandNaira": 0.05,
		"percentOfTransactionsBetween500ThousandToOneMillionNaira": 0,
		"percentOfTransactionsGreaterThanOneMillionNaira": 0,
		"percentNumberOfDaysTransactionsWasLessThan10ThousandNaira": 0.79,
		"percentOfBalancesLessThan10ThousandNaira": 0.25,
		"percentOfBalancesBetween10ThousandTo100ThousandNaira": 0.31,
		"percentOfBalancesBetween100ThousandTo500ThousandNaira": 0.44,
		"percentOfBalancesBetween500ThousandToOneMillionNaira": 0,
		"percentOfBalancesGreaterThanOneMillionNaira": 0,
		"percentNumberOfDaysBalanceWasLessThan10ThousandNaira": 0.35,
		"mostFrequentBalanceRange": "100k-500k",
		"mostFrequentTransactionRange": "<=10k",
		"numberOfCardRequests": 0,
		"mostFrequentCreditTransfer": "nip/abn/lagos bus services ltd",
		"mostFrequentDebitTransfer": "nip/abn/lagos bus services ltd",
		"returnCheque": 0,
		"balanceBreakdown": [
		{
		    "min": -1E+18,
		    "max": 500,
		    "percentageOfTransactionsInBucket": 0.058
		},
		{
		    "min": 500,
		    "max": 1000,
		    "percentageOfTransactionsInBucket": 0.017
		},
		{
		    "min": 1000,
		    "max": 10000,
		    "percentageOfTransactionsInBucket": 0.017
		},
		{
		    "min": 10000,
		    "max": 100000,
		    "percentageOfTransactionsInBucket": 0.149
		},
		{
		    "min": 100000,
		    "max": 500000,
		    "percentageOfTransactionsInBucket": 0.76
		},
		{
		    "min": 500000,
		    "max": 1000000,
		    "percentageOfTransactionsInBucket": 0
		},
		{
		    "min": 1000000,
		    "max": 1E+18,
		    "percentageOfTransactionsInBucket": 0
		}
		],
		"transactionBreakdown": [
		{
		    "min": -1E+18,
		    "max": 500,
		    "percentageOfTransactionsInBucket": 0.306
		},
		{
		    "min": 500,
		    "max": 1000,
		    "percentageOfTransactionsInBucket": 0.033
		},
		{
		    "min": 1000,
		    "max": 10000,
		    "percentageOfTransactionsInBucket": 0.339
		},
		{
		    "min": 10000,
		    "max": 100000,
		    "percentageOfTransactionsInBucket": 0.256
		},
		{
		    "min": 100000,
		    "max": 500000,
		    "percentageOfTransactionsInBucket": 0.066
		},
		{
		    "min": 500000,
		    "max": 1000000,
		    "percentageOfTransactionsInBucket": 0
		},
		{
		    "min": 1000000,
		    "max": 1E+18,
		    "percentageOfTransactionsInBucket": 0
		}
		],
		"percentNumberOfDaysTransactionsInSmallestBucket": 0.634,
		"percentNumberOfDaysBalancesInSmallestBucket": 0.146,
	},
	"behavioralAnalysis": {
		"monthToMonthInflowToOutflowRate": "Equal Cash Flow",
		"overallInflowToOutflowRate": "Equal Cash Flow",
		"totalLoanAmount": 13000,
		"totalLoanRepaymentAmount": 0,
		"loanToInflowRate": 0.01,
		"loanRepaymentToInflowRate": 0,
		"numberLoanTransactions": 1,
		"numberRepaymentTransactions": 0,
		"gamblingStatus": "No Gambling Transactions Found",
		"gamblingRate": 0,
		"accountActivity": 0.5,
		"percentOfInflowIrregularity": 0.14,
		"averageMonthlyLoanAmount": 0.5,
		"averageMonthlyLoanRepaymentAmount": 0.5,
		"accountSweep": "No"
	},
	"cashFlowAnalysis": {
		"totalCreditTurnover": 1369432.54,
		"totalDebitTurnOver": 1380699.92,
		"averageMonthlyCredits": 342358.14,
		"averageMonthlyDebits": 345174.98,
		"averageWeeklyCredits": 105340.96,
		"averageWeeklyDebits": 98621.42,
		"averageMonthlyBalance": 96925.31,
		"averageWeeklyBalance": 82462.91,
		"numberOfTransactingMonths": 4,
                "monthlyOutflow": [
		{
		    "year": "2021",
		    "month-name": "January",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "April",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "May",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "June",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "July",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "August",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "September",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "October",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "November",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "December",
		    "amount": 749336.54
		},
		{
		    "year": "2022",
		    "month-name": "January",
		    "amount": 295526.89
		},
		{
		    "year": "2022",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "April",
		    "amount": 0
		}
		],
		"monthlyInflow": [
		{
		    "year": "2021",
		    "month-name": "January",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "April",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "May",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "June",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "July",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "August",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "September",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "October",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "November",
		    "amount": 0
		},
		{
		    "year": "2021",
		    "month-name": "December",
		    "amount": 749336.54
		},
		{
		    "year": "2022",
		    "month-name": "January",
		    "amount": 295526.89
		},
		{
		    "year": "2022",
		    "month-name": "Febuary",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "March",
		    "amount": 0
		},
		{
		    "year": "2022",
		    "month-name": "April",
		    "amount": 0
		}
		],
		"periodInStatement": "June - September",
		"yearInStatement": "2020",
		"firstDateInStatement": "2020-06-17",
		"lastDateInStatement": "2020-09-14",
		"closingBalance": 4894.64
	},
	"incomeAnalysis": {
                "salaryTransactions": [
	        {
		    "date": "2021-12-16 18:45:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-04 16:33:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-12 14:35:00",
		    "description": "Some description",
		    "amount": 5000
		},
		{
		    "date": "2022-01-12 14:38:00",
		    "description": "Some description",
		    "amount": 25000
		},
		{
		    "date": "2022-01-29 13:19:00",
		    "description": "Some description",
		    "amount": 10000
		}
		],
		"averagePredictedSalary": 374385.22,
		"isSalaryEarner": "Yes",
		"expectedSalaryPaymentDay": 24,
		"frequencyOfSalaryPayments": "1",
		"lastDateOfSalaryPayment": "2020-08-24",
		"numberOfSalaryPayments": 3,
		"hasOtherIncome": "No",
                "otherIncomeTransactions": [
		{
		    "date": "2021-12-16 18:45:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-04 16:33:00",
		    "description": "Some description",
		    "amount": 10000
		},
		{
		    "date": "2022-01-12 14:35:00",
		    "description": "Some description",
		    "amount": 5000
		},
		{
		    "date": "2022-01-12 14:38:00",
		    "description": "Some description",
		    "amount": 25000
		},
		{
		    "date": "2022-01-29 13:19:00",
		    "description": "Some description",
		    "amount": 10000
		}
		],
		"averageOtherIncome": 0,
		"numberOfOtherIncomePayments": 0,
		"lowestSalary": 374385.22,
		"mostRecentSalary": 374385.22,
	}
}

Get Statement Transactions

Method Endpoint Headers Parameters Body
GET statements/{statementKey}/transactions Authorization value: Bearer string_encrypted_access_token accepted values: key for an existing statement application/json body

This section outlines how to get statement transactions. These calls assume that you have generated analytics for a statement by calling the generate statement analytics endpoint.

curl --location --request GET 'https://api.insights-periculum.com/statements/{statementKey}/transactions' 
--header 'Authorization: Bearer string_encrypted_accesst_token' 
--header 'Content-Type: application/json' 
--data-raw 'none'

Request Parameters

Name Description Type Required
statementKey The key of the statement to get the transactions for. int Yes

    {
        "date": "2020-06-29",
        "amount": 1300,
        "type": "debit",
        "description": "online to access bank teeplanet lim ited onepay transfer to teeplanet l imited access bank (trf)",
        "balance": 206755.15
    },
    {
        "date": "2020-09-17",
        "amount": 25,
        "type": "debit",
        "description": "nipfee/online to united bank for af rica ikenwa chidiebere juliana onep ay transfer to ikenwa chidiebere ju li",
        "balance": 80830.99
    },
    {
        "date": "2020-09-17",
        "amount": 1.88,
        "type": "debit",
        "description": "nipvat/online to united bank for af rica ikenwa chidiebere juliana onep ay transfer to ikenwa chidiebere ju li",
        "balance": 80829.11
    }

Attach Customer Identification Information To A Statement

Method Endpoint Headers Parameters Body
PATCH /statements/identification Authorization value: Bearer string_encrypted_access_token none application/json body

Periculum allows their customer to attach their customers (end-user) identification information to each statement. For Nigerian customers, they can attach NIN and BVN to statements, while for Kenyan customers only ID can be attached to a statement. Below is an example for an arbitrary customer where Periculum has configured the customer’s tenancy to allow them to attach an arbitrary identifier called “customIdentifier” to statements.

curl --location --request PATCH 'https://api.insights-periculum.com/statements/identification' 
--header 'Authorization: Bearer string_encrypted_accesst_token' 
--header 'Content-Type: application/json' 
--data-raw '{
    "statementKey": 3,
    "identificationData":[
		{
			"IdentifierName": "customIdentifier",
			"Value": "111"
		}
]
}'

Request Parameters

Name Description Type Required
statementKey The key of the statement to attach customer identification information for. int Yes
identificationData[i].

identifierName

A predefined identifier in the configuration string Yes
identificationData[i].value Value for the identifier string Yes

NOTE: You must contact us if you want custom identifiers that are not standard to your country of origin.

Generate Statement Affordability Analysis

Method Endpoint Headers Parameters Body
POST /affordability Authorization value: Bearer string_encrypted_access_token none application/json body

This section outlines how to call Periculum’s Affordability API. These calls assume that you have generated analytics for a statement by calling the generate statement analytics endpoint. If you do not specify the optional parameters (averageMonthlyTotalExpenses, averageMonthlyLoanRepaymentAmount) then the endpoint will default to using the values for these fields from the corresponding statement analytics.

curl --location --request POST 'https://api.insights-periculum.com/affordability' 
--header 'Authorization: Bearer string_encrypted_accesst_token' 
--header 'Content-Type: application/json' 
--data-raw '{
    "dti": 0.3,
    "statementKey": 3,
    "loanTenure": 6,
    "averageMonthlyTotalExpenses": 4000,
    "averageMonthlyLoanRepaymentAmount": 1000
}'

Request Parameters

Name Description Type Required
statementKey The key of the statement to generate the affordability analysis for. int Yes
dti Debt to income ratio for the affordability analysis. double (between 0-1) Yes
loanTenure The period of the loan in months. int Yes
averageMonthlyTotalExpenses Average Monthly Total Expenses double No
averageMonthlyLoanRepaymentAmount Average Monthly Loan Repayment Amount double No

Response

{
    "dti": 0.5,
    "loanTenure": 12,
    "monthly_disposable_income/monthly_affordability_amount": 313920.45,
    "affordability_amount": 3767045.35,
    "average_monthly_total_expenses": 16738,
    "average_monthly_loan_repayment_amount": 600,
}

Response Parameters

Name Description Type
monthly_disposable_income/monthly_affordability_amount Captures the monthly disposable income/monthly affordability amount double
affordability_amount Captures the affordability amount double

Get Existing Statement Affordability Analysis

This endpoint assumes that you have previously generated affordability for a statement. You must specify the key of the previously generated affordability to recieve its details. 

Method Endpoint Headers Parameters
GET /affordability/{statementKey} Authorization value: Bearer string_encrypted_access_token accepted values: key for an existing statement

curl --location --request GET 'https://api.insights-periculum.com/affordability/{statementKey}'
--header 'Authorization: Bearer string_encrypted_access_token'
--header 'Content-Type: application/json'
--data- none

[
    {
        "statementKey": 121,
        "dti": 0.5,
        "loanTenure": 10,
        "monthly_disposable_income/monthly_affordability_amount": 12000,
        "affordability_amount": 120000,
        "createdDate": "2022-01-27T18:34:53.994-08:00",
        "average_predicted_salary": 315149.25,
        "average_other_income": 0,
        "average_monthly_total_expenses": 34474.51,
        "average_monthly_loan_repayment_amount": 33836.46
    },
    {
        "statementKey": 121,
        "dti": 0.2,
        "loanTenure": 36,
        "monthly_disposable_income/monthly_affordability_amount": 0,
        "affordability_amount": 0,
        "createdDate": "2022-01-27T15:32:34.828-08:00",
        "average_predicted_salary": 315149.25,
        "average_other_income": 0,
        "average_monthly_total_expenses": 34474.51,
        "average_monthly_loan_repayment_amount": 33836.46
    }
]

Generate Credit Score For A Statement

Method Endpoint Headers Parameters Body
POST /creditscore Authorization value: Bearer string_encrypted_access_token accepted values: {statementKey} application/json body

This section outlines how to generate credit score. These calls assume that you have generated analytics for a statement by calling the generate statement analytics endpoint.

curl --location --request POST 'https://api.insights-periculum.com/creditscore/{statementKey}' 
--header 'Authorization: Bearer string_encrypted_accesst_token' 
--header 'Content-Type: application/json' 
--data-raw 'none'

Request Parameters

Name Description Type Required
statementKey The key of the statement to generate the creditscore for. int Yes

{
    "rulesScore": 405,
    "baseScore": 300,
    "calculatedScore": 705,
    "didPass": null,
    "passReasons": [
        "Rule AccountActivityBetween30-49% was met because $Statement.AccountActivity was BETWEEN 0.29-0.50 and 15 were added to the score",
        "Rule AccountSweepNo was met because $Statement.AccountSweep was EQUALS No and 60 were added to the score",
        "Rule AveragePredictedSalaryBetween100kTo249k was met because $Statement.AveragePredictedSalary was BETWEEN 99999-250000 and 60 were added to the score",
        "Rule GamblingRateEqualsTo0% was met because $Statement.GamblingRate was EQUALS 0 and 60 were added to the score",
        "Rule MostFrequentBalanceRangeBetween100k-500k was met because $Statement.MostFrequentBalanceRange was EQUALS 100k-500k and 60 were added to the score",
        "Rule NetAverageMonthlyEarningBetween100kTo249k was met because $Statement.NetAverageMonthlyEarning was BETWEEN 99999-250000 and 60 were added to the score",
        "Rule TotalLoanAmountEqualstoZero was met because $Statement.TotalLoanAmount was EQUALS 0 and 90 were added to the score"
    ],
    "failReasons": [
        "Rule AccountActivityBetween10-19% was not met because $Statement.AccountActivity was not BETWEEN 0.09-0.20 and 3 were not added to the score",
        "Rule AccountActivityBetween20-29% was not met because $Statement.AccountActivity was not BETWEEN 0.19-0.30 and 6 were not added to the score",
        "Rule AccountActivityBetween50-100% was not met because $Statement.AccountActivity was not BETWEEN 0.49-1.1 and 30 were not added to the score",
        "Rule AccountActivityLessThan10% was not met because $Statement.AccountActivity was not LESS_THAN 0.1 and 0 were not added to the score",
        "Rule AccountSweepYes was not met because $Statement.AccountSweep was not EQUALS Yes and 0 were not added to the score",
        "Rule AveragePredictedSalaryBetween250kTo499k was not met because $Statement.AveragePredictedSalary was not BETWEEN 249999-500000 and 90 were not added to the score",
        "Rule AveragePredictedSalaryBetween500kTo999k was not met because $Statement.AveragePredictedSalary was not BETWEEN 499999-1000000 and 120 were not added to the score",
        "Rule AveragePredictedSalaryBetween50kTo99k was not met because $Statement.AveragePredictedSalary was not BETWEEN 49999-100000 and 30 were not added to the score",
        "Rule AveragePredictedSalaryGreaterThan1m was not met because $Statement.AveragePredictedSalary was not GREATER_THAN 1000000 and 150 were not added to the score",
        "Rule AveragePredictedSalaryLessThan50k was not met because $Statement.AveragePredictedSalary was not LESS_THAN 50000 and 0 were not added to the score",
        "Rule GamblingRateBetween1-20% was not met because $Statement.GamblingRate was not BETWEEN 0-0.21 and 30 were not added to the score",
        "Rule GamblingRateBetween20-40% was not met because $Statement.GamblingRate was not BETWEEN 0.20-0.41 and 12 were not added to the score",
        "Rule GamblingRateGreaterThan40% was not met because $Statement.GamblingRate was not GREATER_THAN 0.40 and 0 were not added to the score",
        "Rule MostFrequentBalanceRangeBetween10k-100k was not met because $Statement.MostFrequentBalanceRange was not EQUALS 10k-100k and 30 were not added to the score",
        "Rule MostFrequentBalanceRangeBetween500k-1m was not met because $Statement.MostFrequentBalanceRange was not EQUALS 500k-1m and 90 were not added to the score",
        "Rule MostFrequentBalanceRangeGreaterThan1m was not met because $Statement.MostFrequentBalanceRange was not EQUALS >1m and 90 were not added to the score",
        "Rule MostFrequentBalanceRangeLessThan10k was not met because $Statement.MostFrequentBalanceRange was not EQUALS <=10k and 0 were not added to the score",
        "Rule NetAverageMonthlyEarningBetween249kTo500k was not met because $Statement.NetAverageMonthlyEarning was not BETWEEN 249999-500000 and 90 were not added to the score",
        "Rule NetAverageMonthlyEarningBetween25kTo49k was not met because $Statement.NetAverageMonthlyEarning was not BETWEEN 24999-50000 and 15 were not added to the score",
        "Rule NetAverageMonthlyEarningBetween50kTo99k was not met because $Statement.NetAverageMonthlyEarning was not BETWEEN 49999-100000 and 30 were not added to the score",
        "Rule NetAverageMonthlyEarningGreaterThan500k was not met because $Statement.NetAverageMonthlyEarning was not GREATER_THAN 500000 and 120 were not added to the score",
        "Rule NetAverageMonthlyEarningLessThan25k was not met because $Statement.NetAverageMonthlyEarning was not LESS_THAN 25000 and 0 were not added to the score",
        "Rule TotalLoanAmountBetween100kTo249k was not met because $Statement.TotalLoanAmount was not BETWEEN 99999-250000 and 36 were not added to the score",
        "Rule TotalLoanAmountBetween1To49k was not met because $Statement.TotalLoanAmount was not BETWEEN 0-50000 and 72 were not added to the score",
        "Rule TotalLoanAmountBetween249kTo500k was not met because $Statement.TotalLoanAmount was not BETWEEN 249999-500000 and 18 were not added to the score",
        "Rule TotalLoanAmountBetween50kTo99k was not met because $Statement.TotalLoanAmount was not BETWEEN 49999-100000 and 54 were not added to the score",
        "Rule TotalLoanAmountGreaterThan500k was not met because $Statement.TotalLoanAmount was not GREATER_THAN 500000 and 0 were not added to the score"
    ],
    "type": "POINTS"
}

Get An Existing Credit Score For A Statement

Method Endpoint Headers Parameters Body
GET /creditscore/{statementKey} Authorization value: Bearer string_encrypted_access_token accepted values: key for an existing statement application/json body

This section outlines how to get an existing credit score for a statement. These calls assume that you have generated analytics for a statement by calling the generate statement analytics endpoint.

curl --location --request GET 'https://api.insights-periculum.com/creditscore/{statementKey}' 
--header 'Authorization: Bearer string_encrypted_accesst_token' 
--header 'Content-Type: application/json' 
--data-raw 'none'

Request Parameters

Name Description Type Required
statementKey The key of the statement to obtain the creditscore for. int Yes

[
    {
        "rulesScore": 297,
        "baseScore": 300,
        "calculatedScore": 597,
        "didPass": false,
        "passReasons": [
            "Rule AccountActivityBetween30-49% was met because $Statement.AccountActivity was BETWEEN 0.29-0.50 and 15 were added to the score",
            "Rule AccountSweepNo was met because $Statement.AccountSweep was EQUALS No and 60 were added to the score",
            "Rule AveragePredictedSalaryBetween250kTo499k was met because $Statement.AveragePredictedSalary was BETWEEN 249999-500000 and 90 were added to the score",
            "Rule GamblingRateEqualsTo0% was met because $Statement.GamblingRate was EQUALS 0 and 60 were added to the score",
            "Rule NetAverageMonthlyEarningLessThan25k was met because $Statement.NetAverageMonthlyEarning was LESS_THAN 25000 and 0 were added to the score",
            "Rule TotalLoanAmountBetween1To49k was met because $Statement.TotalLoanAmount was BETWEEN 0-50000 and 72 were added to the score"
        ],
        "failReasons": [
            "Rule AccountActivityBetween10-19% was not met because $Statement.AccountActivity was not BETWEEN 0.09-0.20 and 3 were not added to the score",
            "Rule AccountActivityBetween20-29% was not met because $Statement.AccountActivity was not BETWEEN 0.19-0.30 and 6 were not added to the score",
            "Rule AccountActivityBetween50-100% was not met because $Statement.AccountActivity was not BETWEEN 0.49-1.1 and 30 were not added to the score",
            "Rule AccountActivityLessThan10% was not met because $Statement.AccountActivity was not LESS_THAN 0.1 and 0 were not added to the score",
            "Rule AccountSweepYes was not met because $Statement.AccountSweep was not EQUALS Yes and 0 were not added to the score",
            "Rule AveragePredictedSalaryBetween100kTo249k was not met because $Statement.AveragePredictedSalary was not BETWEEN 99999-250000 and 60 were not added to the score",
            "Rule AveragePredictedSalaryBetween500kTo999k was not met because $Statement.AveragePredictedSalary was not BETWEEN 499999-1000000 and 120 were not added to the score",
            "Rule AveragePredictedSalaryBetween50kTo99k was not met because $Statement.AveragePredictedSalary was not BETWEEN 49999-100000 and 30 were not added to the score",
            "Rule AveragePredictedSalaryGreaterThan1m was not met because $Statement.AveragePredictedSalary was not GREATER_THAN 1000000 and 150 were not added to the score",
            "Rule AveragePredictedSalaryLessThan50k was not met because $Statement.AveragePredictedSalary was not LESS_THAN 50000 and 0 were not added to the score",
            "Rule GamblingRateBetween1-20% was not met because $Statement.GamblingRate was not BETWEEN 0-0.21 and 30 were not added to the score",
            "Rule GamblingRateBetween20-40% was not met because $Statement.GamblingRate was not BETWEEN 0.20-0.41 and 12 were not added to the score",
            "Rule GamblingRateGreaterThan40% was not met because $Statement.GamblingRate was not GREATER_THAN 0.40 and 0 were not added to the score",
            "Rule MostFrequentBalanceRangeBetween100k-500k was not met because $Statement.MostFrequentBalanceRange was not EQUALS 100k-500k and 60 were not added to the score",
            "Rule MostFrequentBalanceRangeBetween10k-100k was not met because $Statement.MostFrequentBalanceRange was not EQUALS 10k-100k and 30 were not added to the score",
            "Rule MostFrequentBalanceRangeBetween500k-1m was not met because $Statement.MostFrequentBalanceRange was not EQUALS 500k-1m and 90 were not added to the score",
            "Rule MostFrequentBalanceRangeGreaterThan1m was not met because $Statement.MostFrequentBalanceRange was not EQUALS >1m and 90 were not added to the score",
            "Rule MostFrequentBalanceRangeLessThan10k was not met because $Statement.MostFrequentBalanceRange was not EQUALS <=10k and 0 were not added to the score",
            "Rule NetAverageMonthlyEarningBetween100kTo249k was not met because $Statement.NetAverageMonthlyEarning was not BETWEEN 99999-250000 and 60 were not added to the score",
            "Rule NetAverageMonthlyEarningBetween249kTo500k was not met because $Statement.NetAverageMonthlyEarning was not BETWEEN 249999-500000 and 90 were not added to the score",
            "Rule NetAverageMonthlyEarningBetween25kTo49k was not met because $Statement.NetAverageMonthlyEarning was not BETWEEN 24999-50000 and 15 were not added to the score",
            "Rule NetAverageMonthlyEarningBetween50kTo99k was not met because $Statement.NetAverageMonthlyEarning was not BETWEEN 49999-100000 and 30 were not added to the score",
            "Rule NetAverageMonthlyEarningGreaterThan500k was not met because $Statement.NetAverageMonthlyEarning was not GREATER_THAN 500000 and 120 were not added to the score",
            "Rule TotalLoanAmountBetween100kTo249k was not met because $Statement.TotalLoanAmount was not BETWEEN 99999-250000 and 36 were not added to the score",
            "Rule TotalLoanAmountBetween249kTo500k was not met because $Statement.TotalLoanAmount was not BETWEEN 249999-500000 and 18 were not added to the score",
            "Rule TotalLoanAmountBetween50kTo99k was not met because $Statement.TotalLoanAmount was not BETWEEN 49999-100000 and 54 were not added to the score",
            "Rule TotalLoanAmountEqualstoZero was not met because $Statement.TotalLoanAmount was not EQUALS 0 and 90 were not added to the score",
            "Rule TotalLoanAmountGreaterThan500k was not met because $Statement.TotalLoanAmount was not GREATER_THAN 500000 and 0 were not added to the score"
        ],
        "type": "POINTS"
    }
]