Skip to content

Commit

Permalink
Synced Postman Collection with https://github.com/Mastercard/finicity…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaaufauvre committed Mar 9, 2023
1 parent 4337a7f commit eb44f1f
Showing 1 changed file with 212 additions and 57 deletions.
269 changes: 212 additions & 57 deletions finicity.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3949,15 +3949,6 @@
"})"
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
Expand Down Expand Up @@ -15946,6 +15937,212 @@
"body": "{\n \"code\": 10100,\n \"message\": \"Cannot find consumer with id 1234.\"\n}"
}
]
},
{
"name": "Get Account Owner Details",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Check status code\", function () {\r",
" pm.expect(pm.response.code).to.equals(200)\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Finicity-App-Key",
"value": "{{appKey}}",
"type": "text"
},
{
"key": "Finicity-App-Token",
"value": "{{appToken}}",
"type": "text"
}
],
"url": {
"raw": "{{baseUrl}}/aggregation/v3/customers/{{customerId}}/accounts/{{accountId}}/owner",
"host": [
"{{baseUrl}}"
],
"path": [
"aggregation",
"v3",
"customers",
"{{customerId}}",
"accounts",
"{{accountId}}",
"owner"
]
},
"description": "This service retrieves the account details for an account holder from an institution. The following data objects are available.\n* Account holders\n* Addresses\n* Emails\n* Phones\n* Documentations\n\nNote: the data returned varies from institution to institution as not all of them make the same data available. This is a premium service, billable per each successful API call.\n\n_Supported regions_: ![🇺🇸](https://flagcdn.com/20x15/us.png)"
},
"response": [
{
"name": "The account owner was successfully retrieved",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "Finicity-App-Key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/aggregation/v3/customers/:customerId/accounts/:accountId/owner",
"host": [
"{{baseUrl}}"
],
"path": [
"aggregation",
"v3",
"customers",
":customerId",
"accounts",
":accountId",
"owner"
],
"variable": [
{
"key": "customerId",
"value": "1005061234",
"description": "(Required) A customer ID"
},
{
"key": "accountId",
"value": "5011648377",
"description": "(Required) The account ID"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{}"
},
{
"name": "The request was rejected",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "Finicity-App-Key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/aggregation/v3/customers/:customerId/accounts/:accountId/owner",
"host": [
"{{baseUrl}}"
],
"path": [
"aggregation",
"v3",
"customers",
":customerId",
"accounts",
":accountId",
"owner"
],
"variable": [
{
"key": "customerId",
"value": "1005061234",
"description": "(Required) A customer ID"
},
{
"key": "accountId",
"value": "5011648377",
"description": "(Required) The account ID"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"code\": \"10010\",\n \"status\": \"400\",\n \"message\": \"\\\"partnerId\\\" is required\",\n \"user_message\": \"One or more of the fields could not be validated. Please ensure you have entered the correct data.\",\n \"tags\": \"\"\n}"
},
{
"name": "The request lacks valid authentication credentials. Check \"Finicity-App-Key\" or \"Finicity-App-Token\".",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "Finicity-App-Key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/aggregation/v3/customers/:customerId/accounts/:accountId/owner",
"host": [
"{{baseUrl}}"
],
"path": [
"aggregation",
"v3",
"customers",
":customerId",
"accounts",
":accountId",
"owner"
],
"variable": [
{
"key": "customerId",
"value": "1005061234",
"description": "(Required) A customer ID"
},
{
"key": "accountId",
"value": "5011648377",
"description": "(Required) The account ID"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"code\": \"10022\",\n \"status\": \"401\",\n \"message\": \"Invalid authorization credentials\",\n \"user_message\": \"The session has expired or is invalid\",\n \"tags\": \"\"\n}"
}
]
}
],
"description": "Fetch ACH details and account balances",
Expand All @@ -15961,11 +16158,12 @@
"const appToken = pm.globals.get(\"appToken\")",
"",
"const savingAccountId = pm.variables.get(\"savingAccountId\")",
"if (savingAccountId) {",
"const accountId = pm.variables.get(\"accountId\")",
"if (savingAccountId && accountId) {",
" return",
"}",
"",
"console.log(\"Fetching 'savings' account ID\")",
"console.log(\"Fetching account IDs\")",
"const options = {",
" url: baseUrl + \"/aggregation/v1/customers/\"+ customerId + \"/accounts\",",
" method: 'GET',",
Expand All @@ -15978,8 +16176,10 @@
"pm.sendRequest(options, function (err, response) {",
" pm.expect(err).to.be.null",
" pm.expect(response.code).to.equals(200)",
" const account = response.json().accounts.filter(a => a.type === \"savings\")[0]",
" const accounts = response.json().accounts;",
" const account = accounts.filter(a => a.type === \"savings\")[0]",
" pm.variables.set(\"savingAccountId\", account.id)",
" pm.variables.set(\"accountId\", accounts[0].id)",
"})"
]
}
Expand Down Expand Up @@ -17860,15 +18060,6 @@
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
Expand All @@ -17878,15 +18069,6 @@
{
"name": "Generate Third Party Access Key",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
Expand Down Expand Up @@ -18603,15 +18785,6 @@
"})"
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
Expand Down Expand Up @@ -24761,15 +24934,6 @@
"})"
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
Expand All @@ -24786,15 +24950,6 @@
"pm.environment.set(\"tomorrowIso8601\", `${moment().add(1, 'days').format(ISO_8601_OFFSET)}Z`);"
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
Expand Down

0 comments on commit eb44f1f

Please sign in to comment.