You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ma...@apache.org on 2023/04/02 05:19:43 UTC

[fineract-cn-docker-compose] branch master updated: least postman collection to run accounting APIs

This is an automated email from the ASF dual-hosted git repository.

manojvm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/fineract-cn-docker-compose.git


The following commit(s) were added to refs/heads/master by this push:
     new 95b954b  least postman collection to run accounting APIs
     new ce9af5c  Merge pull request #28 from logoutdhaval/postman-collection
95b954b is described below

commit 95b954b734de630ce2c1d132af199b08b8cbc7ed
Author: logoutdhaval <dh...@fynarfin.io>
AuthorDate: Fri Feb 24 18:00:25 2023 +0530

    least postman collection to run accounting APIs
---
 ...-Least-Initial-Requests.postman_collection.json | 664 +++++++++++++++++++++
 1 file changed, 664 insertions(+)

diff --git a/postman_scripts/Finceract-CN-Least-Initial-Requests.postman_collection.json b/postman_scripts/Finceract-CN-Least-Initial-Requests.postman_collection.json
new file mode 100644
index 0000000..fde79a0
--- /dev/null
+++ b/postman_scripts/Finceract-CN-Least-Initial-Requests.postman_collection.json
@@ -0,0 +1,664 @@
+{
+	"info": {
+		"_postman_id": "fca30a54-4939-480e-9b9b-98658b847a1e",
+		"name": "Finceract-CN-Least-Initial-Requests",
+		"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
+		"_exporter_id": "20222524"
+	},
+	"item": [
+		{
+			"name": "03.1 Create first tenant 'playground'",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"pm.test(\"Check for Access token\",function(){",
+							"    if(pm.response.to.have.status(202)){",
+							"    (environment.rootUserToken==='')? console.log(\"API is running without Access Token\"): console.log(\"API is running with Access Token\");",
+							"    }",
+							"})",
+							"",
+							"tests[\"Status code is 202\"] = responseCode.code === 202;",
+							""
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "Authorization",
+						"value": "{{rootUserToken}}",
+						"disabled": true
+					},
+					{
+						"key": "User",
+						"value": "{{rootUser}}",
+						"disabled": true
+					},
+					{
+						"key": "Content-Type",
+						"name": "Content-Type",
+						"value": "application/json",
+						"type": "text"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n\t\"identifier\": \"{{tenantIdentifier}}\",\n\t\"name\": \"Playground\",\n\t\"description\": \"Sample tenant for demonstrating Fineract-CN functionality\",\n\t\"cassandraConnectionInfo\": {\n\t\t\"clusterName\": \"datacenter1\",\n\t\t\"contactPoints\": \"cassandra:9042\",\n\t\t\"keyspace\": \"playground\",\n\t\t\"replicationType\": \"Simple\",\n\t\t\"replicas\": \"1\"\n\t},\n\t\"databaseConnectionInfo\": {\n\t\t\"driverClass\": \"org.postgresql.Driver\",\n\t\t\"databaseNa [...]
+					"options": {
+						"raw": {
+							"language": "json"
+						}
+					}
+				},
+				"url": "http://{{provisionerUrl}}/provisioner/v1/tenants"
+			},
+			"response": []
+		},
+		{
+			"name": "Accounting initialize api",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"pm.test(\"Check for Access Token\",function(){",
+							"    if(pm.response.to.have.status(202)){",
+							"    (environment.rootUserToken==='')? console.log(\"API is running without Access Token\"): console.log(\"API is running with Access Token\");",
+							"    }",
+							"})",
+							"tests[\"Status code is 202\"] = responseCode.code === 202;"
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}"
+					},
+					{
+						"key": "",
+						"value": "",
+						"type": "text",
+						"disabled": true
+					}
+				],
+				"url": "http://{{accountingUrl}}/accounting/v1/initialize"
+			},
+			"response": []
+		},
+		{
+			"name": "08.1 Create REVENUE ledgers",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"pm.test(\"Check for Access Token\",function(){",
+							"    if(pm.response.to.have.status(202)){",
+							"    (environment.adminUserToken === '')? console.log(\"API is running without Access Token\"): console.log(\"API is running with Access Token\");",
+							"    }",
+							"})",
+							"tests[\"Status code is 202\"] = responseCode.code === 202;",
+							""
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "Authorization",
+						"value": "{{adminUserToken}}",
+						"disabled": true
+					},
+					{
+						"key": "User",
+						"value": "{{adminUser}}"
+					},
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"description\": null,\n  \"type\": \"REVENUE\",\n  \"identifier\": \"1000\",\n  \"name\": \"Income\",\n  \"subLedgers\": [\n    {\n      \"description\": null,\n      \"type\": \"REVENUE\",\n      \"identifier\": \"1100\",\n      \"name\": \"Income from Loans\",\n      \"subLedgers\": [],\n      \"showAccountsInChart\": true\n    },\n    {\n      \"description\": null,\n      \"type\": \"REVENUE\",\n      \"identifier\": \"1200\",\n      \"name\": \"Investment Income\" [...]
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/ledgers"
+			},
+			"response": []
+		},
+		{
+			"name": "08.2 Create EXPENSE Ledgers",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"pm.test(\"Check for Access Token\",function(){",
+							"    if(pm.response.to.have.status(202)){",
+							"    (environment.adminUserToken === '')? console.log(\"API is running without Access Token\"): console.log(\"API is running with Access Token\");",
+							"    }",
+							"})",
+							"tests[\"Status code is 202\"] = responseCode.code === 202;",
+							""
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "Authorization",
+						"value": "{{adminUserToken}}",
+						"disabled": true
+					},
+					{
+						"key": "User",
+						"value": "{{adminUser}}"
+					},
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"description\": null,\n  \"type\": \"EXPENSE\",\n  \"identifier\": \"2000\",\n  \"name\": \"Expenses\",\n  \"showAccountsInChart\": true,\n  \"subLedgers\": [\n    {\"description\": null, \"type\": \"EXPENSE\", \"identifier\": \"2100\",  \"name\": \"Employee Compensation\", \"subLedgers\": [], \"showAccountsInChart\": true },\n    {\"description\": null, \"type\": \"EXPENSE\", \"identifier\": \"2200\",  \"name\": \"Employee Benefits\", \"subLedgers\": [], \"showAccount [...]
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/ledgers"
+			},
+			"response": []
+		},
+		{
+			"name": "08.3 Create ASSETS ledgers",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"pm.test(\"Check for Access Token\",function(){",
+							"    if(pm.response.to.have.status(202)){",
+							"    (environment.adminUserToken === '')? console.log(\"API is running without Access Token\"): console.log(\"API is running with Access Token\");",
+							"    }",
+							"})",
+							"tests[\"Status code is 202\"] = responseCode.code === 202;",
+							""
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "Authorization",
+						"value": "{{adminUserToken}}",
+						"disabled": true
+					},
+					{
+						"key": "User",
+						"value": "{{adminUser}}"
+					},
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"description\": null,\n  \"type\": \"ASSET\",\n  \"identifier\": \"7000\",\n  \"name\": \"Assets\",\n  \"showAccountsInChart\": true,\n  \"subLedgers\": [\n    {\n      \"description\": null,\n      \"type\": \"ASSET\",\n      \"identifier\": \"7010\",\n      \"name\": \"Loans to Members\",\n      \"subLedgers\": [],\n      \"showAccountsInChart\": true\n    },\n    {\n      \"description\": null,\n      \"type\": \"ASSET\",\n      \"identifier\": \"7020\",\n      \"na [...]
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/ledgers"
+			},
+			"response": []
+		},
+		{
+			"name": "08.4 Create LIABILITY ledgers",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"pm.test(\"Check for Access Token\",function(){",
+							"    if(pm.response.to.have.status(202)){",
+							"    (environment.adminUserToken === '')? console.log(\"API is running without Access Token\"): console.log(\"API is running with Access Token\");",
+							"    }",
+							"})",
+							"tests[\"Status code is 202\"] = responseCode.code === 202;",
+							""
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "Authorization",
+						"value": "{{adminUserToken}}",
+						"disabled": true
+					},
+					{
+						"key": "User",
+						"value": "{{adminUser}}"
+					},
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"description\": null,\n  \"type\": \"LIABILITY\",\n  \"identifier\": \"8000\",\n  \"name\": \"Accounts Payable\",\n  \"showAccountsInChart\": true,\n  \"subLedgers\": [\n    {\n      \"description\": null,\n      \"type\": \"LIABILITY\",\n      \"identifier\": \"8100\",\n      \"name\": \"Accounts Payable\",\n      \"subLedgers\": [],\n      \"showAccountsInChart\": true\n    },\n    {\n      \"description\": null,\n      \"type\": \"LIABILITY\",\n      \"identifier\": [...]
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/ledgers"
+			},
+			"response": []
+		},
+		{
+			"name": "08.5 Create EQUITY ledgers",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"pm.test(\"Check for Access Token\",function(){",
+							"    if(pm.response.to.have.status(202)){",
+							"    (environment.adminUserToken === '')? console.log(\"API is running without Access Token\"): console.log(\"API is running with Access Token\");",
+							"    }",
+							"})",
+							"tests[\"Status code is 202\"] = responseCode.code === 202;",
+							""
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "Authorization",
+						"value": "{{adminUserToken}}",
+						"disabled": true
+					},
+					{
+						"key": "User",
+						"value": "{{adminUser}}"
+					},
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"description\": null,\n  \"type\": \"EQUITY\",\n  \"identifier\": \"9000\",\n  \"name\": \"Equity\",\n  \"showAccountsInChart\": true,\n  \"subLedgers\": [\n    {\n      \"description\": null,\n      \"type\": \"EQUITY\",\n      \"identifier\": \"9100\",\n      \"name\": \"Member Savings\",\n      \"subLedgers\": [],\n      \"showAccountsInChart\": true\n    },\n    {\n      \"description\": null,\n      \"type\": \"EQUITY\",\n      \"identifier\": \"9300\",\n      \"n [...]
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/ledgers"
+			},
+			"response": []
+		},
+		{
+			"name": "08.6 Create An Account A",
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "Accept",
+						"value": "application/json"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}",
+						"type": "text"
+					},
+					{
+						"key": "Authorization",
+						"value": "{{adminUserToken}}",
+						"type": "text",
+						"disabled": true
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"type\" : \"LIABILITY\",\n  \"identifier\" : \"8000\",\n  \"name\" : \"Interest Receivables\",\n  \"holders\" : [ \"First Holder\", \"Second Holder\" ],\n  \"signatureAuthorities\" : [ \"Second To Sign\", \"First To Sign\" ],\n  \"balance\" : 0.0,\n  \"ledger\" : \"8000\"\n}"
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/accounts"
+			},
+			"response": []
+		},
+		{
+			"name": "08.7 Create An Account B",
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "Accept",
+						"value": "application/json"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}",
+						"type": "text"
+					},
+					{
+						"key": "Authorization",
+						"value": "{{adminUserToken}}",
+						"type": "text",
+						"disabled": true
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"type\" : \"LIABILITY\",\n  \"identifier\" : \"8001\",\n  \"name\" : \"Interest Receivables\",\n  \"holders\" : [ \"First Holder\", \"Second Holder\" ],\n  \"signatureAuthorities\" : [ \"Second To Sign\", \"First To Sign\" ],\n  \"balance\" : 0.0,\n  \"ledger\" : \"8000\"\n}"
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/accounts"
+			},
+			"response": []
+		},
+		{
+			"name": "08.8 Create A Journal Entry",
+			"request": {
+				"method": "POST",
+				"header": [
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "Accept",
+						"value": "application/json"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}",
+						"type": "text"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"transactionIdentifier\" : \"F14062036\",\n  \"transactionDate\" : \"2022-01-17T18:35:24.00Z\",\n  \"transactionType\" : \"ADBT\",\n  \"clerk\" : \"Boring Clerk\",\n  \"note\" : \"Account Db\",\n  \"debtors\" : [ {\n    \"accountNumber\" : \"8000\",\n    \"amount\" : \"200.0\"\n  } ],\n  \"creditors\" : [ {\n    \"accountNumber\" : \"8001\",\n    \"amount\" : \"200.0\"\n  } ],\n  \"message\" : \"Account Has Been Debited\"\n}"
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/journal"
+			},
+			"response": []
+		},
+		{
+			"name": "09.1 Find An Account A",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"var jsonData = JSON.parse(responseBody);",
+							"postman.setEnvironmentVariable(\"accountABalance\", jsonData.balance);",
+							""
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"protocolProfileBehavior": {
+				"disableBodyPruning": true
+			},
+			"request": {
+				"method": "GET",
+				"header": [
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "Accept",
+						"value": "*/*"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}",
+						"type": "text"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"type\" : \"LIABILITY\",\n  \"identifier\" : \"8000\",\n  \"name\" : \"Receivables\",\n  \"holders\" : [ \"Holder One\", \"Holder Two\" ],\n  \"signatureAuthorities\" : [ \"Signatory Two\", \"Signatory One\" ],\n  \"balance\" : 906.4,\n  \"referenceAccount\" : \"1000\",\n  \"ledger\" : \"1001\"\n}"
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/accounts/8000"
+			},
+			"response": []
+		},
+		{
+			"name": "09.2 Find An Account B",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"var jsonData = JSON.parse(responseBody);",
+							"postman.setEnvironmentVariable(\"accountBBalance\", jsonData.balance);",
+							""
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"protocolProfileBehavior": {
+				"disableBodyPruning": true
+			},
+			"request": {
+				"method": "GET",
+				"header": [
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "Accept",
+						"value": "*/*"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}",
+						"type": "text"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n  \"type\" : \"LIABILITY\",\n  \"identifier\" : \"8000\",\n  \"name\" : \"Receivables\",\n  \"holders\" : [ \"Holder One\", \"Holder Two\" ],\n  \"signatureAuthorities\" : [ \"Signatory Two\", \"Signatory One\" ],\n  \"balance\" : 906.4,\n  \"referenceAccount\" : \"1000\",\n  \"ledger\" : \"1001\"\n}"
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/accounts/8001"
+			},
+			"response": []
+		},
+		{
+			"name": "09.3 Fetch Journal Entries",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"pm.test(\"Check for Account Balance\",function(){",
+							"    var jsonData = JSON.parse(responseBody);",
+							"    var balanceInAccountA=parseInt(environment.accountABalance);",
+							"    var balanceInAccountB=parseInt(environment.accountBBalance);",
+							"    var balanceA=0; ",
+							"    var balanceB=0;  ",
+							"    jsonData.forEach(function(process){",
+							"        balanceA -= process.debtors[0].amount ",
+							"        balanceB = parseInt(balanceB) + parseInt(process.debtors[0].amount )",
+							"    })",
+							"    pm.expect(balanceInAccountA).eq(balanceA)",
+							"    pm.expect(balanceInAccountB).eq(balanceB) ",
+							"})"
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "GET",
+				"header": [
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "Accept",
+						"value": "*/*"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}",
+						"type": "text"
+					}
+				],
+				"url": {
+					"raw": "http://{{accountingUrl}}/accounting/v1/journal?dateRange=2022-01-10Z..2023-01-19Z&account=8001",
+					"protocol": "http",
+					"host": [
+						"{{accountingUrl}}"
+					],
+					"path": [
+						"accounting",
+						"v1",
+						"journal"
+					],
+					"query": [
+						{
+							"key": "dateRange",
+							"value": "2022-01-10Z..2023-01-19Z"
+						},
+						{
+							"key": "account",
+							"value": "8001"
+						}
+					]
+				}
+			},
+			"response": []
+		},
+		{
+			"name": "Fetch Accounts For Ledger",
+			"protocolProfileBehavior": {
+				"disableBodyPruning": true
+			},
+			"request": {
+				"method": "GET",
+				"header": [
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "Accept",
+						"value": "*/*"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}",
+						"type": "text"
+					}
+				],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n    \"accounts\": [\n        {\n            \"type\": \"LIABILITY\",\n            \"identifier\": \"6100.10\",\n            \"name\": \"First Account Of 6100\",\n            \"holders\": [\n                \"Holder One\"\n            ],\n            \"signatureAuthorities\": [\n                \"Signatory One\"\n            ],\n            \"balance\": 1234.0,\n            \"ledger\": \"8000\"\n        }\n    ],\n    \"totalPages\": 1,\n    \"totalElements\": 1\n}"
+				},
+				"url": "http://{{accountingUrl}}/accounting/v1/ledgers/8000/accounts"
+			},
+			"response": []
+		},
+		{
+			"name": "Find A Journal Entry",
+			"protocolProfileBehavior": {
+				"disabledSystemHeaders": {}
+			},
+			"request": {
+				"method": "GET",
+				"header": [
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "Accept",
+						"value": "*/*"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}",
+						"type": "text"
+					}
+				],
+				"url": "http://{{accountingUrl}}/accounting/v1/journal/F14062018"
+			},
+			"response": []
+		},
+		{
+			"name": "Fetch Account Entries",
+			"request": {
+				"method": "GET",
+				"header": [
+					{
+						"key": "Content-Type",
+						"value": "application/json"
+					},
+					{
+						"key": "Accept",
+						"value": "*/*"
+					},
+					{
+						"key": "X-Tenant-Identifier",
+						"value": "{{tenantIdentifier}}",
+						"type": "text"
+					}
+				],
+				"url": "http://{{accountingUrl}}/accounting/v1/accounts/8000/entries"
+			},
+			"response": []
+		}
+	]
+}
\ No newline at end of file