Postman Collection
Aerosync Postman Collection
The provided instructions were designed to assist any team member/tester/stakeholder in following and executing properly the Postman Collection. The Aerosync Postman Collection can be used to validate requests and responses from the Aerosync API suite.
Step 1 - Import Environment and Collection files
Copy and paste the following environment as shown in the following steps.
Step 1- Click the Import
button.

Step 2- Copy the JSON that is in this guide so you can add the environment, remember to copy it in the bar.
Aerosync APIs- Staging
{
"id": "1756d231-8186-4d84-8ce6-7667fc4d7ee1",
"name": "Aerosync APIs- Staging",
"values": [
{
"key": "base_url",
"value": "http://api.staging.aerosync.com",
"type": "default",
"enabled": true
},
{
"key": "api_key",
"value": "51e42e61-654d-4c61-896d-fca1e5799015",
"type": "default",
"enabled": true
},
{
"key": "api_secret",
"value": "7da4be5d-4750-49dd-b03e-906d5af2808a",
"type": "default",
"enabled": true
},
{
"key": "user_id",
"value": "b93c061c3ad44fa8acb786fa958f64e9",
"type": "default",
"enabled": true
},
{
"key": "admin_key",
"value": "5fc261ba-1341-4111-b1c0-224dcb6bf0ec",
"type": "default",
"enabled": true
},
{
"key": "admin_secret",
"value": "0ceb8a44-d7a5-4e21-90ed-b00db37b1ca9",
"type": "default",
"enabled": true
},
{
"key": "token",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "migration_tool_url",
"value": "http://migration-api.staging-sync.aero.inc",
"type": "default",
"enabled": true
},
{
"key": "migration_api_key",
"value": "gZnm7lZuW13NfozO7Y0fj2f3LxL0NXh6800gUzdq",
"type": "default",
"enabled": true
},
{
"key": "base_url_admin",
"value": "https://admin-api.staging-sync.aero.inc",
"type": "default",
"enabled": true
},
{
"key": "api_key_admin",
"value": "RZBRxWALWFaGEq90efgey3q1q7boVlJU3J3YJWCh",
"type": "default",
"enabled": true
},
{
"key": "x-api-key",
"value": "51e42e61-654d-4c61-896d-fca1e5799015",
"type": "default",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2025-07-18T14:18:00.689Z",
"_postman_exported_using": "Postman/11.53.3"
}
Step 3- Click to accept the import.
Step 4- Validate that the environment was imported correctly.

AEROSYNC APIs- External V2
Next, you'll need to import the collection. Importing the collection is similar to importing the environment, except you'll be using the "Collections" tab to verify that it was imported successfully.
{
"info": {
"_postman_id": "04c41eda-8e25-443c-9172-8debc1ebe998",
"name": "AEROSYNC APIS- External V2",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "27310382",
"_collection_link": "https://aeropay.postman.co/workspace/Aerosync-APIs-2.0~46013fcc-da4a-412a-99d1-d4e49037f56a/collection/27310382-04c41eda-8e25-443c-9172-8debc1ebe998?action=share&source=collection_link&creator=27310382"
},
"item": [
{
"name": "Token",
"item": [
{
"name": "/token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json()\r",
"token = jsonData.token\r",
"\r",
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"TTL\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"token\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"TTL\",\r",
" \"token\"\r",
" ]\r",
"}\r",
"\r",
"pm.environment.set(\"token\",token)\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});\r",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"apiKey\":\"{{api_key}}\",\r\n \"apiSecret\": \"{{api_secret}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base_url}}/v2/token",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"token"
]
},
"description": "Generated from cURL: curl --location 'http://api.qa.aerosync.com/v1/token' \\\r\n--header 'Content-Type: application/json' \\\r\n--data '{\r\n \"apiKey\":\"test1\",\r\n \"apiSecret\": \"test1\"\r\n}'"
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"apiKey\":\"{{api_key}}\",\r\n \"apiSecret\": \"{{api_secret}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base_url}}/v2/token",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"token"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "289"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:26:47 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae0c3-700f895430dfaa3277eccb98"
},
{
"key": "x-amzn-RequestId",
"value": "8c0c09d9-1d0e-4469-8e9e-4e953c12ef44"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTgOqEcdoAMED7A="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 b3f79c7629585fd4818d306efdc55e44.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "awYpUqrm0t6CmiY3708Mk4CsQ_DEdmxN-5lJYtpcDCOm_jV4hFzgsA=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"TTL\": \"1800\",\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJhMWY5ZWMxZS0wMjMwLTQ2YTktYmI4Yi1mYzFjNjYyYTRmOTciLCJleHAiOjE3MzUwNTk0MDcsIkNsaWVudElkIjoidGVzdDEiLCJDbGllbnROYW1lIjoiQWVyb3BheSJ9.NWOxkBh39EByCVZ6zdQPlw-86ORl4UnWtdcIKPfyn9s\"\n}"
},
{
"name": "failure (missing apiKey or apiSecret)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \r\n \"apiSecret\": \"{{api_secret}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base_url}}/v2/token",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"token"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "114"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:27:12 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae0e0-686405d655f015ad58f5119a"
},
{
"key": "x-amzn-RequestId",
"value": "19289438-45e2-4e9c-bfc8-591c88a8461b"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTgTLHgiIAMETTg="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 b3f79c7629585fd4818d306efdc55e44.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "18a9n3hC3OXcDK9zKokCDt_V6K_XaWdsVFaUUDGzmNmsbueGjbk2Dw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-100\",\n \"message\": \"Validation error; apiKey or apiSecret missing or in an invalid format.\"\n }\n}"
},
{
"name": "failure (invalid apiKey or apiSecret)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"apiKey\":\"{{api_key}}\",\r\n \"apiSecret\": \"{{api_secret}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base_url}}/v2/token",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"token"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "72"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:28:33 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae131-035086c621103e9370c1826e"
},
{
"key": "x-amzn-RequestId",
"value": "8782fa6e-d9d3-4ec5-b691-1b1bb625ce67"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTgfyHJ7IAMEMKA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 bcf3714653b91c162db4f8a673af0716.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "Xp-l5OZaJmoR87zJ7-tVGjJiDHBVVgehPfOq1irViHyx1r4NLdlAGA=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-101\",\n \"message\": \"Invalid apiKey or apiSecret.\"\n }\n}"
}
]
}
]
},
{
"name": "Account",
"item": [
{
"name": "/accounts_check",
"event": [
{
"listen": "test",
"script": {
"exec": [
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"account\": {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"accountNickname\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"accountNumber\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"routingNumber\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"accountType\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"bankName\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"canFetchBalance\": {\r",
" \"type\": \"boolean\"\r",
" },\r",
" \"connectionMethod\": {\r",
" \"type\": \"integer\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"accountNickname\",\r",
" \"accountNumber\",\r",
" \"routingNumber\",\r",
" \"accountType\",\r",
" \"bankName\",\r",
" \"canFetchBalance\",\r",
" \"connectionMethod\"\r",
" ]\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"account\"\r",
" ]\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 15000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(15000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});\r",
""
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{token}}"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "301"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Thu, 12 Dec 2024 21:10:10 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675b512b-72e0c99b09ebf601395e7755"
},
{
"key": "x-amzn-RequestId",
"value": "3de51016-768d-4ebc-a2ee-7d510ce6c85c"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "Csme7HIroAMEt0g="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 0eae140cb47e1df2572b33198dae08ca.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "6lOH5Efpysn8HqnZ0ji1Zch2bojTX-CKmZG3uazJ6HaG-PFv7DY4Qg=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"account\": {\n \"accountNickname\": \"PREMIER PLATINUM CHECK\",\n \"accountNumber\": \"12345\",\n \"routingNumber\": \"307074551\",\n \"accountType\": \"checking\",\n \"bankName\": \"Fiserv - Direct Connect\",\n \"canFetchBalance\": true,\n \"supportsFasterPayments\": false,\n \"connectionMethod\": 1\n }\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 17 Dec 2024 14:28:13 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-67618a7d-1542715e059a022770da9acf"
},
{
"key": "x-amzn-RequestId",
"value": "31711075-76a0-4832-8836-b9ea41002b4d"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C8KTpHm5oAMEoKw="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 f21e3e9a304f8d928ae6a7ae28c35ce8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "byo2fYy876O4fDNUe_qK6m0vKOY0QSzoK_3E1LhDxvWbAGXTGNBD0A=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
},
{
"name": "failure (missing or expired token)",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "159"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:31:16 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae1d4-37519ae5314959bf0caefff0"
},
{
"key": "x-amzn-RequestId",
"value": "6b1f852a-4530-44c0-9f70-82ba668ad393"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Headers",
"value": "*"
},
{
"key": "x-amzn-ErrorType",
"value": "UnauthorizedException"
},
{
"key": "x-amz-apigw-id",
"value": "DTg5RGtMIAMElAg="
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 f21e3e9a304f8d928ae6a7ae28c35ce8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "SbP4jK4pLc5TqszBjTk7GbtXpCkucLnmFJpkg6CfB6OUFOr7eLBzUw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-120\",\n \"message\": \"Unauthorized request. Please make sure you have an unexpired and properly scoped token to perform this action.\"\n }\n}"
},
{
"name": "failure (missing user_id parameter variable)",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "67"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:32:19 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae209-0c1cd81463465dd818446535"
},
{
"key": "x-amzn-RequestId",
"value": "9e3e0b61-f4f4-4a40-b382-340915c665e7"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DThBgFTLoAMEttg="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 f21e3e9a304f8d928ae6a7ae28c35ce8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "IjsDmPzXT-UDnxw62kaKSTDlS0b1dFUsXp1SvunD3895Vntg8bKJHQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User :user_id not found\"\n }\n}"
}
]
},
{
"name": "/account_info",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"\r",
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"account\": {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"accountNickname\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"accountHolderName\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"accountNumber\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"routingNumber\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"accountType\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"bankName\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"availableBalance\": {\r",
" \"type\": \"number\"\r",
" },\r",
" \"currentBalance\": {\r",
" \"type\": \"number\"\r",
" },\r",
" \"currency\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"lastRefreshTimestamp\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"canFetchBalance\": {\r",
" \"type\": \"boolean\"\r",
" },\r",
" \"connectionMethod\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"connectionStatus\": {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"code\": {\r",
" \"type\": \"null\"\r",
" },\r",
" \"details\": {\r",
" \"type\": \"null\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"code\",\r",
" \"details\"\r",
" ]\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"accountNickname\",\r",
" \"accountHolderName\",\r",
" \"accountNumber\",\r",
" \"routingNumber\",\r",
" \"accountType\",\r",
" \"bankName\",\r",
" \"availableBalance\",\r",
" \"currentBalance\",\r",
" \"currency\",\r",
" \"lastRefreshTimestamp\",\r",
" \"canFetchBalance\",\r",
" \"connectionMethod\",\r",
" \"connectionStatus\"\r",
" ]\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"account\"\r",
" ]\r",
"\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});\r",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base_url}}/v2/account_info/:user_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"account_info",
":user_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base_url}}/v2/account_info/:user_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"account_info",
":user_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "519"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Thu, 12 Dec 2024 21:08:36 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675b50c9-0c39114545845ec43881cc92"
},
{
"key": "x-amzn-RequestId",
"value": "4cf297c6-236a-4d91-a6a6-25549d5ee6a3"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CsmPiGF0oAMEe2g="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 0d28f7015cfb69cd3eb6e14359add86e.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "iARTuMafybYQ3lBwD7uY6J746mfHQVIeHxoMgRhG4o2yz8XMZudcFw=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"account\": {\n \"bankName\": \"Fiserv - Direct Connect\",\n \"accountHolderName\": null,\n \"accountNumber\": \"12345\",\n \"routingNumber\": \"307074551\",\n \"accountType\": \"CHECKING\",\n \"accountNickname\": \"PREMIER PLATINUM CHECK\",\n \"availableBalance\": 0,\n \"currentBalance\": 5,\n \"currency\": \"USD\",\n \"lastRefreshTimestamp\": \"2024-12-12T18:59:07Z\",\n \"connectionMethod\": 1,\n \"canFetchBalance\": true,\n \"supportsFasterPayments\": false,\n \"connectionStatus\": {\n \"status\": \"CONNECTED\",\n \"code\": null,\n \"details\": null\n }\n }\n}"
},
{
"name": "failure (invalid credentials)",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"userId\": \"4c73976af23a4a63a939d6c05a9585f7\",\n \"userPassword\": \"3e8293ceb64c473e80e8b6e7c16b150d\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://api.qa.aerosync.com/v1/account_info",
"protocol": "http",
"host": [
"api",
"qa",
"aerosync",
"com"
],
"path": [
"v1",
"account_info"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "131"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Mon, 08 Jul 2024 20:05:48 GMT"
},
{
"key": "x-amzn-RequestId",
"value": "52cbdf70-381d-4b1f-b36e-ed6fd499e713"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "am_4fGXZIAMEUhw="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-668c469c-0b91211f42edb43043c4babf"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 5385bfb0a91e0a945790f9ce0c0045ac.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "SCL51-P3"
},
{
"key": "X-Amz-Cf-Id",
"value": "kFBgaTxJAf851qnK7kPi70rs_z7F59yNCHjljUfP8A43L326Ex4N-g=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-202\",\n \"message\": \"Invalid bank login credentials provided. We were unable to authenticate with your bank.\"\n }\n}"
},
{
"name": "failure (null on param)",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"userId\": null,\n \"userPassword\": \"3e8293ceb64c473e80e8b6e7c16b150d\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://api.qa.aerosync.com/v1/account_info",
"protocol": "http",
"host": [
"api",
"qa",
"aerosync",
"com"
],
"path": [
"v1",
"account_info"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "101"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Mon, 08 Jul 2024 20:06:24 GMT"
},
{
"key": "x-amzn-RequestId",
"value": "9d707f52-436a-45dd-a556-8ce250a0bf8c"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "am_-IHMkIAMEgdQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-668c46c0-78f4bd9112ab4e440eace050"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 5385bfb0a91e0a945790f9ce0c0045ac.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "SCL51-P3"
},
{
"key": "X-Amz-Cf-Id",
"value": "6ZyOfODNApczzbN_8TBfUB_5xI45f4yPvwovUK9X_4ybUoll1057zQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-100\",\n \"message\": \"Required attributes are missing or not in a valid format.\"\n }\n}"
},
{
"name": "failure (missing or expired token)",
"originalRequest": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base_url}}/v2/account_info/:user_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"account_info",
":user_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "159"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:35:46 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae2e2-12e2f953327ce2e64a4facf0"
},
{
"key": "x-amzn-RequestId",
"value": "439d7247-568d-44e8-a36f-9940dfe43b28"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Headers",
"value": "*"
},
{
"key": "x-amzn-ErrorType",
"value": "UnauthorizedException"
},
{
"key": "x-amz-apigw-id",
"value": "DThjaE4eoAMEYVw="
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 996b499c4a9b7f20b33db1aa6167db6c.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "7kddpcd3AAitIIfq7dWJzBaPT0CZXDFWsY7emjlC-TEA-HTBaGCjOw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-120\",\n \"message\": \"Unauthorized request. Please make sure you have an unexpired and properly scoped token to perform this action.\"\n }\n}"
},
{
"name": "failure(missing user_id parameter variable)",
"originalRequest": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base_url}}/v2/account_info/:user_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"account_info",
":user_id"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "73"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:36:55 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae322-5a7d56a3068c14510a9be9d2"
},
{
"key": "x-amzn-RequestId",
"value": "4f088d1b-a844-47e6-9822-225917198690"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DThtaHO9IAMEnMg="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 0e3c225d58500145a5360bc7903299fe.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "x7OwytYb2ThMeUhguz9jaEIBRrgtDXYan_-J0HfzT6RmLVO-pA17zQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"user_id: [:user_id] not found\"\n }\n}"
}
]
}
]
},
{
"name": "Identity",
"item": [
{
"name": "/identity",
"event": [
{
"listen": "test",
"script": {
"exec": [
"\r",
"const Schema = {\r",
"\"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"identity\": {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"accountHolderName\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"address\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"email\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"phone\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"userId\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"accountHolderName\",\r",
" \"address\",\r",
" \"email\",\r",
" \"phone\",\r",
" \"userId\"\r",
" ]\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"identity\"\r",
" ]\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "174"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:24:59 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c6dea-43415b8158fe736d33046db4"
},
{
"key": "x-amzn-RequestId",
"value": "7ee6ea4e-6556-47dc-a504-9730ed652921"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvYcpHOUIAMEDpQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 60a4019a365a195cb4f354a7c8fdb39a.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "bKcULTCTaamqvZg47P_gECL0-p_xusNrZJHKyhr4w0JcJ3UAiSMEtA=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"identity\": {\n \"accountHolderName\": null,\n \"address\": null,\n \"email\": null,\n \"phone\": null,\n \"userId\": \"070c4836340a430286a3a0299681ef3d\"\n }\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 15:10:29 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e5e5-2fce5acc2d41f4167416f569"
},
{
"key": "x-amzn-RequestId",
"value": "a4313e24-29de-4d34-a888-7de2cc99fa9f"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_jb4HMyIAMEMrw="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 b3f79c7629585fd4818d306efdc55e44.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "1IlR38o9mu536diV3VojJaCxgTuuW1RNZVGFweP4H_5cQT7j8E4bqQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
},
{
"name": "failure(missing or expired token)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "159"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:39:35 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae3c7-472099c9318d937a5d964b42"
},
{
"key": "x-amzn-RequestId",
"value": "89e71a9b-09f7-468a-84ea-a998908d3524"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Headers",
"value": "*"
},
{
"key": "x-amzn-ErrorType",
"value": "UnauthorizedException"
},
{
"key": "x-amz-apigw-id",
"value": "DTiHLGt5IAMEjeg="
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 141cc765667839ffa8c4ad646af354cc.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "veckerZxlrBUv2Nv5ZHoCReyzKdxvURpw6-3CSGam2hf09DkAsp2mw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-120\",\n \"message\": \"Unauthorized request. Please make sure you have an unexpired and properly scoped token to perform this action.\"\n }\n}"
},
{
"name": "failure(missing user_id parameter variable)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "67"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:40:03 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae3df-52f88f4138a9736c75c5fd6f"
},
{
"key": "x-amzn-RequestId",
"value": "c46fd359-e069-4d41-ae4e-a061e20c0594"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTiK_F-iIAMELsw="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 141cc765667839ffa8c4ad646af354cc.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "8-NqZ11bivh5eAWuPCiN518O9H2aqmtzXpHFMapAMpgPmzwKCOm6Ew=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User :user_id not found\"\n }\n}"
},
{
"name": "failure(missing user_identity path parameter)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
"identity"
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "67"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:42:20 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae467-2a96a7cd551ce2a458239ee9"
},
{
"key": "x-amzn-RequestId",
"value": "823a3431-2139-4add-9788-935ab3a778da"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTigPFj6IAMEhQQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 746f6e170e429fc94de6ac30e08ca30c.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "JtVnT4Ed8GWzlIQBX1k-yPi35It_KELOysbKja9BqXTQMsnhSyt2PA=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User identity not found\"\n }\n}"
}
]
},
{
"name": "/identity_post",
"event": [
{
"listen": "test",
"script": {
"exec": [
"//Response object\r",
"var jsonData = pm.response.json();\r",
"job= jsonData.jobId;\r",
"//Set job_id collection variables for next apis (job_status)\r",
"pm.collectionVariables.set(\"job_id\", job);\r",
"\r",
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"identityStatus\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"jobId\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"userId\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"identityStatus\",\r",
" \"jobId\",\r",
" \"userId\"\r",
" ]\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "166"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:25:27 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c6e06-2b8b0d546eecf2a32fdcafad"
},
{
"key": "x-amzn-RequestId",
"value": "72d13dba-c996-4867-aac9-aca9a45c3731"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvYhIHFjIAMEVqQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 60a4019a365a195cb4f354a7c8fdb39a.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "cMBUz_UVKAcQWwU6t9QWB0l7JVgaF2AcTnFMZzZnsqpbKGyRJeOrTQ=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"identityStatus\": \"Initiated\",\n \"jobId\": \"IDT-6ac9236ba91c40159eacc78219c3ac80\",\n \"userId\": \"070c4836340a430286a3a0299681ef3d\"\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 15:11:11 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e60b-6bf54c682fc636123d77042d"
},
{
"key": "x-amzn-RequestId",
"value": "d9ed2820-d6e5-4a13-ac2e-77f9465fa644"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_jhzGCTIAMEZ3Q="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 b3f79c7629585fd4818d306efdc55e44.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "vahucf-3X9TaIRx6DqyTfH5kO1TB_yfSknmnSCnSStFMD_s01GYUmg=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
},
{
"name": "failure(missing or expired token)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "159"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:46:12 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae554-3e8ef8662695639470b20996"
},
{
"key": "x-amzn-RequestId",
"value": "3df362cf-f00b-4767-bec6-207ccb345260"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Headers",
"value": "*"
},
{
"key": "x-amzn-ErrorType",
"value": "UnauthorizedException"
},
{
"key": "x-amz-apigw-id",
"value": "DTjFPE84IAMEX9g="
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 252d91a64bfdc4045e9d843f4a37a3e6.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "xtuzu-bRbLkk-LRNuH12LYrhcjFlN28wnfGbCPeazeJ7ojJYEqbORw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-120\",\n \"message\": \"Unauthorized request. Please make sure you have an unexpired and properly scoped token to perform this action.\"\n }\n}"
},
{
"name": "failure(missing user_id parameter variable)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/identity",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"identity"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "67"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:46:43 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae56f-0d4692fc087e37977b58e1d8"
},
{
"key": "x-amzn-RequestId",
"value": "be98cf01-2938-45b0-8d45-d5f71ef2b5fd"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTjJcFtWoAMEGhA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 252d91a64bfdc4045e9d843f4a37a3e6.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "kxwk9OpY0Q6WxGLLnes63NyFHTbCN1cs9BEeh7a_FAzBFTBig978cw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User :user_id not found\"\n }\n}"
}
]
},
{
"name": "/job-status",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"jobStatus\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"mfaTriggered\": {\r",
" \"type\": \"boolean\"\r",
" },\r",
" \"jobId\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"userId\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"jobStatus\",\r",
" \"mfaTriggered\",\r",
" \"jobId\",\r",
" \"userId\"\r",
" ]\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "184"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:50:43 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c73ef-3cc2214234281be338af01e0"
},
{
"key": "x-amzn-RequestId",
"value": "68bf7bea-a34e-4ea6-8b19-04d9bbc92bfa"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvcNaHHXIAMEdJA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 87d7664d4d5a16632f7453ca9cc45a74.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "9SxMfHGA95iBkvd95Lswjt5giJCw36owz_Hpgid3vf348WGEqO-x4g=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"jobStatus\": \"Completed\",\n \"mfaTriggered\": false,\n \"jobId\": \"REF-7951da09a0844aa5a330b2b19ac2e78d\",\n \"userId\": \"070c4836340a430286a3a0299681ef3d\"\n}"
},
{
"name": "success (pending MFA)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "185"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 20 Dec 2024 18:42:16 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6765ba87-227dff47458cd8f21dd67f7d"
},
{
"key": "x-amzn-RequestId",
"value": "8880ff3c-dc97-4525-8b93-30d961f884b3"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DGoVTGQCIAMEDnQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 564509e1f4d165c1797432f39748ffd8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "SCL51-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "dmxF7LGVZP2SHc6DdAvkw6-E_lRimMn0OOHBZk9K5hs5s13BCJ18nA=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"jobStatus\": \"Pending MFA\",\n \"mfaTriggered\": true,\n \"jobId\": \"TRN-854eb1f13e4b4f57a4a4b93832f3006b\",\n \"userId\": \"79170b615e56411ea275868fca126785\"\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 14:46:54 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e059-2c517f9526abec987ad2d418"
},
{
"key": "x-amzn-RequestId",
"value": "508bf765-8d83-4c95-9155-46ec010cfe7b"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_f-AFxDIAMElGg="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 141cc765667839ffa8c4ad646af354cc.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "01SyMUPSizXEQzvO-rjQHDLFhHvu2JwI-9FKe5tdGruqLaMKfH42dw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
},
{
"name": "failure(missing job_id parameter)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "89"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:50:52 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae66c-5e649d501aeb11c07de9ba66"
},
{
"key": "x-amzn-RequestId",
"value": "5b6a3b44-3b57-422d-98b5-9de6eb20519d"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTjxCHP9oAMEhhA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 a791ece59ab90f323cd986ba2aeaf9c4.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "JdPWU1Ro0g2mm3k1tB9FX58WTl_6uLC0RU1CiEVQg4E6P8xHg-SXSQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-100\",\n \"message\": \"Missing required request parameters: [job_id]\"\n }\n}"
}
]
}
]
},
{
"name": "Balance",
"item": [
{
"name": "/balance",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"account\": {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"availableBalance\": {\r",
" \"type\": \"number\"\r",
" },\r",
" \"currentBalance\": {\r",
" \"type\": \"number\"\r",
" },\r",
" \"currency\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"lastRefreshTimestamp\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"userId\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"connectionId\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"availableBalance\",\r",
" \"currentBalance\",\r",
" \"currency\",\r",
" \"lastRefreshTimestamp\",\r",
" \"userId\",\r",
" \"connectionId\"\r",
" ]\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"account\"\r",
" ]\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});\r",
"\r",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/balance",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"balance"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/balance",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"balance"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "214"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:49:46 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c73b4-74aba39741aafd0236a531ee"
},
{
"key": "x-amzn-RequestId",
"value": "b113edf4-4019-4c91-96fd-40d78287a3b4"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvcEPGC4IAMEZ3Q="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 87d7664d4d5a16632f7453ca9cc45a74.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "P7jAI4AXaki_BI6I1JOwIWRiPWJ3BDEMN6hM1AJGart0DXPl0Moijw=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"account\": {\n \"availableBalance\": 0,\n \"currentBalance\": 5,\n \"currency\": \"USD\",\n \"lastRefreshTimestamp\": \"2024-12-12T21:12:07Z\",\n \"userId\": \"070c4836340a430286a3a0299681ef3d\"\n }\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/balance",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"balance"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "58"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 14:40:09 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762dec9-320449bb4b7644cf100a6d4b"
},
{
"key": "x-amzn-RequestId",
"value": "a98cbe87-2a9c-44cd-960e-34dc45409437"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_e_jGK5IAMEb-Q="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 f21e3e9a304f8d928ae6a7ae28c35ce8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "Ht_amSS-lK545XO4papusZ9SHnArAeguCmZYJZEqRaOzK3iigCW5CA=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User not found\"\n }\n}"
},
{
"name": "failure (missing or expired token)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/balance",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"balance"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "159"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 17:10:30 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676aeb06-1285e0795bb1fe3b6b8cf4b2"
},
{
"key": "x-amzn-RequestId",
"value": "fb10d1ed-6796-4dc5-97d7-d53d94fca725"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Headers",
"value": "*"
},
{
"key": "x-amzn-ErrorType",
"value": "UnauthorizedException"
},
{
"key": "x-amz-apigw-id",
"value": "DTmpJF9ZIAMEc9Q="
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 f21e3e9a304f8d928ae6a7ae28c35ce8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "OHr5wupotarbd2ciXS2THFSztqZ2CZMWzZUYrtBvrbQrdHRT9WjweQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-120\",\n \"message\": \"Unauthorized request. Please make sure you have an unexpired and properly scoped token to perform this action.\"\n }\n}"
},
{
"name": "failure (missing user_id parameter variable)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/balance",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"balance"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "58"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 17:11:07 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676aeb21-77caf90c4e8bd5d146f5513a"
},
{
"key": "x-amzn-RequestId",
"value": "338d42a9-2a0e-4390-a4e7-faeb844d173d"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTmtXGxMoAMEudg="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 f21e3e9a304f8d928ae6a7ae28c35ce8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "IN-qyFCEux_wAJ6zDtVmdGSJFlg3fCJDfXw23msIHyVC0M2kxYrKbA=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User not found\"\n }\n}"
},
{
"name": "failure (missing user_id path parameter)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/balance",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
"balance"
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "66"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 17:11:47 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676aeb4e-3ae6a584251f5d4b583db162"
},
{
"key": "x-amzn-RequestId",
"value": "245fe40d-30a1-44db-9eb4-04a58b3a561b"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTm0UGB_IAMEk3Q="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 f21e3e9a304f8d928ae6a7ae28c35ce8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "rz0ZF6VpbU6TXtYi2WZ9qeOYTOE92v4toCmDcqwxDXu43RUb95_lsQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User balance not found\"\n }\n}"
}
]
},
{
"name": "/refresh",
"event": [
{
"listen": "test",
"script": {
"exec": [
"//Response object\r",
"var jsonData = pm.response.json();\r",
"job= jsonData.account.jobId;\r",
"//Set job_id collection variables for next apis (job_status)\r",
"pm.collectionVariables.set(\"job_id\", job);\r",
"\r",
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"account\": {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"refreshStatus\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"jobId\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"userId\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"refreshStatus\",\r",
" \"jobId\",\r",
" \"userId\"\r",
" ]\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"account\"\r",
" ]\r",
"\r",
"}\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});\r",
"\r",
"\r",
""
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/refresh",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"refresh"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/refresh",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"refresh"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "178"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:50:18 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c73d3-796d66cd4f0c41af3fcd7ccf"
},
{
"key": "x-amzn-RequestId",
"value": "f3271d8a-8c9c-452c-ae77-6800b0f68309"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvcJJFN0IAMEl2g="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 87d7664d4d5a16632f7453ca9cc45a74.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "VvEy18bloHXvDMRKsy2H0HSwgsRsuyu6n0LBUtWQb6asrnq-h1jNkA=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"account\": {\n \"refreshStatus\": \"Initiated\",\n \"jobId\": \"REF-7951da09a0844aa5a330b2b19ac2e78d\",\n \"userId\": \"070c4836340a430286a3a0299681ef3d\"\n }\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/refresh",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"refresh"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "92"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 14:43:06 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762df7a-6357e0576a52fe0b23a2506d"
},
{
"key": "x-amzn-RequestId",
"value": "0ba0cfda-29f6-44f5-ac13-8d23b73af447"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_fbQH8RoAMEVxw="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 0d28f7015cfb69cd3eb6e14359add86e.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "1IvodXZFhIAZt0Sb5B6hxhHP-HXjBUKYlmF85VXzg5Pw4JEBRKhJZg=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User [761268fe79af4bcca602b3cdb307962] not found\"\n }\n}"
},
{
"name": "failure(missing or expired token)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/refresh",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"refresh"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "159"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 17:12:58 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676aeb9a-3ff6cf0c2117a4f154d4a5d3"
},
{
"key": "x-amzn-RequestId",
"value": "e70d147a-1641-4803-aa88-73999341f4cd"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Headers",
"value": "*"
},
{
"key": "x-amzn-ErrorType",
"value": "UnauthorizedException"
},
{
"key": "x-amz-apigw-id",
"value": "DTnAOFoaoAMEfMw="
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 f21e3e9a304f8d928ae6a7ae28c35ce8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "ylONQxFghUsYY8W9C9azqQY0heapnFeU2SzReUlFimDnoQPvhVdCdQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-120\",\n \"message\": \"Unauthorized request. Please make sure you have an unexpired and properly scoped token to perform this action.\"\n }\n}"
},
{
"name": "failure(missing user_id parameter variable)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/refresh",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"refresh"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "69"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 17:13:31 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676aebb6-5766c6572c57eb3f2d5f7fc1"
},
{
"key": "x-amzn-RequestId",
"value": "7e1a445d-1537-4102-9d0e-5c141a3f08cb"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTnElE3UIAMEVDg="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 f21e3e9a304f8d928ae6a7ae28c35ce8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "CO0_Nl0u34DR02MQoildX3XoBboD5sFhv6Rf61JSS6o0HjO5KRejZg=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User [:user_id] not found\"\n }\n}"
}
]
},
{
"name": "/job-status",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"jobStatus\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"mfaTriggered\": {\r",
" \"type\": \"boolean\"\r",
" },\r",
" \"jobId\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"userId\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"jobStatus\",\r",
" \"mfaTriggered\",\r",
" \"jobId\",\r",
" \"userId\"\r",
" ]\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "184"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:50:43 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c73ef-3cc2214234281be338af01e0"
},
{
"key": "x-amzn-RequestId",
"value": "68bf7bea-a34e-4ea6-8b19-04d9bbc92bfa"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvcNaHHXIAMEdJA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 87d7664d4d5a16632f7453ca9cc45a74.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "9SxMfHGA95iBkvd95Lswjt5giJCw36owz_Hpgid3vf348WGEqO-x4g=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"jobStatus\": \"Completed\",\n \"mfaTriggered\": false,\n \"jobId\": \"REF-7951da09a0844aa5a330b2b19ac2e78d\",\n \"userId\": \"070c4836340a430286a3a0299681ef3d\"\n}"
},
{
"name": "success (pending MFA)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "185"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 20 Dec 2024 18:42:16 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6765ba87-227dff47458cd8f21dd67f7d"
},
{
"key": "x-amzn-RequestId",
"value": "8880ff3c-dc97-4525-8b93-30d961f884b3"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DGoVTGQCIAMEDnQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 564509e1f4d165c1797432f39748ffd8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "SCL51-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "dmxF7LGVZP2SHc6DdAvkw6-E_lRimMn0OOHBZk9K5hs5s13BCJ18nA=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"jobStatus\": \"Pending MFA\",\n \"mfaTriggered\": true,\n \"jobId\": \"TRN-854eb1f13e4b4f57a4a4b93832f3006b\",\n \"userId\": \"79170b615e56411ea275868fca126785\"\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 14:46:54 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e059-2c517f9526abec987ad2d418"
},
{
"key": "x-amzn-RequestId",
"value": "508bf765-8d83-4c95-9155-46ec010cfe7b"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_f-AFxDIAMElGg="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 141cc765667839ffa8c4ad646af354cc.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "01SyMUPSizXEQzvO-rjQHDLFhHvu2JwI-9FKe5tdGruqLaMKfH42dw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
},
{
"name": "failure(missing job_id path parameter)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "89"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:50:52 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae66c-5e649d501aeb11c07de9ba66"
},
{
"key": "x-amzn-RequestId",
"value": "5b6a3b44-3b57-422d-98b5-9de6eb20519d"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTjxCHP9oAMEhhA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 a791ece59ab90f323cd986ba2aeaf9c4.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "JdPWU1Ro0g2mm3k1tB9FX58WTl_6uLC0RU1CiEVQg4E6P8xHg-SXSQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-100\",\n \"message\": \"Missing required request parameters: [job_id]\"\n }\n}"
}
]
}
]
},
{
"name": "MFA",
"item": [
{
"name": "/MFA",
"event": [
{
"listen": "test",
"script": {
"exec": [
"// Fixed TypeError by checking for existence of mfaAttributes\r",
"var jsonData = pm.response.json();\r",
"var guid = (jsonData.verifyPollAttributes.mfaAttributes && jsonData.verifyPollAttributes.mfaAttributes.length > 0) ? jsonData.verifyPollAttributes.mfaAttributes[0].guid : null;\r",
"console.log(guid);\r",
"\r",
"// Set mfa_type collection variables for next APIs (resolve-mfa)\r",
"pm.collectionVariables.set(\"mfa_type\", guid);\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/mfa/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"mfa",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/mfa/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"mfa",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "1707"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 18:18:17 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c7a64-5b149b726de7df302e3b6b8a"
},
{
"key": "x-amzn-RequestId",
"value": "f8af0593-e9bb-4e14-a05a-9775f50d27a9"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvgPuFsvoAMEnjQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 f05c21b1a65ba96f308520ba91f14d92.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "dfH-VZrI_75XqnPdFxMkXKydvvFuGAp-3nDK5IkrzT3apHtckj5P3g=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"verifyPollAttributes\": {\n \"connectionStatus\": \"CHALLENGED\",\n \"isBeingAggregated\": true,\n \"mfaAttributes\": [\n {\n \"field_name\": null,\n \"guid\": \"CRD-89350623-f81b-4bbe-bf49-8286cde4ad7a\",\n \"label\": \"What city were you born in?\",\n \"type\": \"TEXT\"\n }\n ]\n },\n \"jobId\": \"IDT-a50049dd15a64a2fae0afba067fe0d68\",\n \"bankInfo\": {\n \"id\": 38900,\n \"institutionId\": \"mxbank\",\n \"institutionName\": \"Aerosync Bank (MFA Trigger)\",\n \"institutionWebsite\": \"https://www.aerosync.com/\",\n \"defaultLogo\": \"https://assets.aerosync.com/bankLogos/38900.svg\",\n \"fallbackLogo\": \"https://d2ufr9ji57xwvj.cloudfront.net/30087.png\",\n \"configurationDetails\": {\n \"url\": \"https://www.mx.com\",\n \"code\": \"mxbank\",\n \"name\": \"MX Bank\",\n \"small_logo_url\": \"https://content.moneydesktop.com/storage/MD_Assets/Ipad%20Logos/50x50/INS-1572a04c-912b-59bf-5841-332c7dfafaef_50x50.png\",\n \"supports_oauth\": false,\n \"medium_logo_url\": \"https://content.moneydesktop.com/storage/MD_Assets/Ipad%20Logos/100x100/INS-1572a04c-912b-59bf-5841-332c7dfafaef_100x100.png\",\n \"instructional_text\": null,\n \"supports_tax_document\": false,\n \"supports_account_statement\": false,\n \"supports_transaction_history\": true,\n \"supports_account_verification\": true,\n \"supports_account_identification\": true\n },\n \"country\": \"US\",\n \"connectionType\": \"MX\"\n },\n \"account\": {\n \"sessionId\": \"IDT-a50049dd15a64a2fae0afba067fe0d68\",\n \"loginParameterInfo\": {\n \"credentials\": [\n {\n \"guid\": \"CRD-9f61fb4c-912c-bd1e-b175-ccc7f0275cc1\",\n \"type\": \"LOGIN\",\n \"label\": \"Username\",\n \"field_name\": \"LOGIN\",\n \"field_type\": \"LOGIN\",\n \"display_order\": 1\n },\n {\n \"guid\": \"CRD-e3d7ea81-aac7-05e9-fbdd-4b493c6e474d\",\n \"type\": \"PASSWORD\",\n \"label\": \"Password\",\n \"field_name\": \"PASSWORD\",\n \"field_type\": \"PASSWORD\",\n \"display_order\": 2\n }\n ]\n }\n }\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/mfa/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"mfa",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 15:14:29 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e6cf-62ad31ea4c6eb7224cf9a7f8"
},
{
"key": "x-amzn-RequestId",
"value": "db218c48-308c-4407-80ba-c8f9bf42863a"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_kAfHzeIAMEjhA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 0e3c225d58500145a5360bc7903299fe.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "8EhHsCgxDnYQpZcR3EJDJhXLL9qe5OFm8ohXXv-BacrerHGnYqnAig=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
}
]
},
{
"name": "/resolve-mfa",
"event": [
{
"listen": "test",
"script": {
"exec": [
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"verifyAttributes\": {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"connectionStatus\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"connectionStatus\"\r",
" ]\r",
" },\r",
" \"sessionId\": {\r",
" \"type\": \"null\"\r",
" },\r",
" \"jobId\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"verifyAttributes\",\r",
" \"sessionId\",\r",
" \"jobId\"\r",
" ]\r",
"\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"mfaAttributes\": {\r\n \"type\": \"{{mfa_type}}\",\r\n \"answer\": \"correct\"\r\n }\r\n}"
},
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/mfa/:job_id/resolve",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"mfa",
":job_id",
"resolve"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"mfaAttributes\": {\r\n \"type\": \"{{mfa_type}}\",\r\n \"answer\": \"correct\"\r\n }\r\n}"
},
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/mfa/:job_id/resolve",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"mfa",
":job_id",
"resolve"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "161"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 18:19:14 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c7a9c-01a5e7b440d59cb74b684cf8"
},
{
"key": "x-amzn-RequestId",
"value": "169caf63-fc70-4620-8936-7eb95ee9a7b5"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvgYlEvjIAMEFgA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 f05c21b1a65ba96f308520ba91f14d92.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "BH2_emSoeC83Cn34QM70PVqQb8gjmi2paSYHOG_Zz_wMWRS-f8V_DA=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"verifyAttributes\": {\n \"connectionStatus\": \"RESUMED\"\n },\n \"sessionId\": null,\n \"jobId\": \"IDT-a50049dd15a64a2fae0afba067fe0d68\"\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"mfaAttributes\": {\r\n \"type\": \"{{mfa_type}}\",\r\n \"answer\": \"correct\"\r\n }\r\n}"
},
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/mfa/:job_id/resolve",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"mfa",
":job_id",
"resolve"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 15:22:12 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e89f-31486c210cd0d8502015feed"
},
{
"key": "x-amzn-RequestId",
"value": "8911924d-bd31-4f99-bca7-e1d77c47ebfc"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_lI_EZhIAMEjoQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 4b1f2d5e8ba06f891aac0914bfcf0ce0.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "zjeCY2SFwN3AmOohp-RFfOluctd7EyD2DcmoRgNS-Dv-QOUzSqBGEA=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
},
{
"name": "failure (invalid or missing attributes)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"mfaAttributes\": {\r\n \"type\": \"{{mfa_type}}\",\r\n \"answer\": \"correct\"\r\n }\r\n}"
},
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/mfa/:job_id/resolve",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"mfa",
":job_id",
"resolve"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "101"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 15:24:13 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e91d-72d0ccca648fd8e33b96e121"
},
{
"key": "x-amzn-RequestId",
"value": "e4214a3b-6d0d-4af5-adb9-e0e18a9cac94"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_lcoEfRIAMEKtA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 4b1f2d5e8ba06f891aac0914bfcf0ce0.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "zp1vfYMDhLwzKCZxnigl_fRiuX05frk1zU4fmaafjLdTr5K8Rbquow=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-100\",\n \"message\": \"Required attributes are missing or not in a valid format.\"\n }\n}"
}
]
}
]
},
{
"name": "Transactions",
"item": [
{
"name": "/transactions",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions?start_date=2023-11-01&end_date=2023-12-13",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"query": [
{
"key": "start_date",
"value": "2023-11-01"
},
{
"key": "end_date",
"value": "2023-12-13"
}
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions?start_date=2023-11-01&end_date=2023-12-13",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"query": [
{
"key": "start_date",
"value": "2023-11-01"
},
{
"key": "end_date",
"value": "2023-12-13"
}
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "446"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:51:47 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c742d-07d75066329cbf831c0e1a4e"
},
{
"key": "x-amzn-RequestId",
"value": "20d7aa3e-1e32-46b0-8271-bbc2f210049f"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvcXGEWEoAMEdKQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 252d91a64bfdc4045e9d843f4a37a3e6.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "0ypMuPL2TQ21Z4ppap27Ti-ppNI8QSHC4ayhYl2k1IyCwEOqaBLDMg=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"transactions\": [\n {\n \"id\": 23293260,\n \"type\": \"Debit\",\n \"date\": \"2023-12-10\",\n \"amount\": 100,\n \"currency\": \"USD\",\n \"description\": \"THE ACADEMY OF PERFORM\",\n \"category\": \"Uncategorized\",\n \"subcategory\": \"Uncategorized\"\n },\n {\n \"id\": 23293261,\n \"type\": \"Debit\",\n \"date\": \"2023-11-10\",\n \"amount\": 10,\n \"currency\": \"USD\",\n \"description\": \"TRANSFER To 6010504-5\",\n \"category\": \"Uncategorized\",\n \"subcategory\": \"Uncategorized\"\n }\n ]\n}"
},
{
"name": "failure (missing path parameters)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "129"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:52:09 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c7449-733177ee10600c9119446419"
},
{
"key": "x-amzn-RequestId",
"value": "ba065513-6c69-474d-967a-09ee99a1d501"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvcbhEwTIAMEAJw="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 252d91a64bfdc4045e9d843f4a37a3e6.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "66mVYTuiLs8hsdh06xqLmQoPB1f6oLMeAL1sXVELgiNEb90I9a-sFw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-100\",\n \"message\": \"Validation error; user_id, start_date, or end_date is missing or in an invalid format\"\n }\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions?start_date=2023-11-01&end_date=2023-12-13",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"query": [
{
"key": "start_date",
"value": "2023-11-01"
},
{
"key": "end_date",
"value": "2023-12-13"
}
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 15:15:09 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e6f8-3c3b19417e87dff71efa1aa7"
},
{
"key": "x-amzn-RequestId",
"value": "e4cb0189-9ec9-4c79-86f9-c4887c5d1020"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_kG7GJjIAMELjA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 0e3c225d58500145a5360bc7903299fe.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "LiBiWsfKmgrPspx8BRZgOqAMsNwJJ8cFXNDYAvslAVWne5u3sKz7Pg=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
},
{
"name": "failure(missing or expired token)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions?start_date=2023-11-01&end_date=2023-12-13",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"query": [
{
"key": "start_date",
"value": "2023-11-01"
},
{
"key": "end_date",
"value": "2023-12-13"
}
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "159"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 17:00:41 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae8b9-37c02ab979cb41551f7f0988"
},
{
"key": "x-amzn-RequestId",
"value": "b95f96bd-f9a3-412d-83f1-8e1c4b57172b"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Headers",
"value": "*"
},
{
"key": "x-amzn-ErrorType",
"value": "UnauthorizedException"
},
{
"key": "x-amz-apigw-id",
"value": "DTlNFFFaIAMEa9Q="
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 d6eccaed6bcab76e8b9ccd6b59f866ba.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "32pExIC2YEDwjmWgwP3IAIa4O-wRp5FLL33zFOO1ALRcABGgs9fZSw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-120\",\n \"message\": \"Unauthorized request. Please make sure you have an unexpired and properly scoped token to perform this action.\"\n }\n}"
},
{
"name": "failure(missing user_id parameter variable)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions?start_date=2023-11-01&end_date=2023-12-13",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"query": [
{
"key": "start_date",
"value": "2023-11-01"
},
{
"key": "end_date",
"value": "2023-12-13"
}
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "67"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 17:01:21 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae8dc-69faeb257d34f53e32156bf0"
},
{
"key": "x-amzn-RequestId",
"value": "62026776-2bc9-426d-9d95-38a2daad5441"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTlSdHZ_oAMEvAA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 d6eccaed6bcab76e8b9ccd6b59f866ba.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "vgwfPr_nQ8X2mka3zVYJHAdFvC05n0e4TXuY9eWBH3jVYEqYR7N4Aw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User :user_id not found\"\n }\n}"
},
{
"name": "failure(missing user_id path parameter)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/transactions?start_date=2023-11-01&end_date=2023-12-13",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
"transactions"
],
"query": [
{
"key": "start_date",
"value": "2023-11-01"
},
{
"key": "end_date",
"value": "2023-12-13"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "71"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 17:02:37 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae928-40e772f56d8b2eac25536393"
},
{
"key": "x-amzn-RequestId",
"value": "e25c7bb4-20c9-4bcf-8ebc-5be3010812ab"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTleYG_gIAMEGZQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 252d91a64bfdc4045e9d843f4a37a3e6.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "z5l5ljg5LagUBTi_6v4IOZ8ELdc0uFBFjr_ZWVCRZaiT5VL-KLh9cA=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User transactions not found\"\n }\n}"
}
]
},
{
"name": "/transaction_post",
"event": [
{
"listen": "test",
"script": {
"exec": [
"//Response object\r",
"var jsonData = pm.response.json();\r",
"job= jsonData.jobId;\r",
"//Set job_id collection variables for next apis (job_status)\r",
"pm.collectionVariables.set(\"job_id\", job);\r",
"\r",
"\r",
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"transactionStatus\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"jobId\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"userId\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"transactionStatus\",\r",
" \"jobId\",\r",
" \"userId\"\r",
" ]\r",
"\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 15000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(15000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "169"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:53:14 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c7486-5902c0de39529cc320e89784"
},
{
"key": "x-amzn-RequestId",
"value": "1e75f50f-249d-4ac4-9aa6-6c6f0b53c57c"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvclAEwZoAMERDQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 141cc765667839ffa8c4ad646af354cc.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "98qbjkNDaZ7-SRTqp3p_pR4GhTPcfdnLbfiNzGVNj8jkxycgWQ0Jxg=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"transactionStatus\": \"Initiated\",\n \"jobId\": \"TRN-3cd2c2d9d19045678fb5bde45884e4ae\",\n \"userId\": \"070c4836340a430286a3a0299681ef3d\"\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 15:15:53 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e724-0cb3e8d7415c1c9f77b8643e"
},
{
"key": "x-amzn-RequestId",
"value": "e0170019-9ef3-4186-9e4a-afa9f60ba5da"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_kN0GKNIAMEKhw="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 0e3c225d58500145a5360bc7903299fe.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "sTtu9ZGkqMi20E5lmfflJG_RcpVLCh7AoIFSbvWG5ad2XMQ0zkrDRA=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
},
{
"name": "failure(missing or expired token)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "159"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:58:36 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae83c-604024282a97565a7bb0e023"
},
{
"key": "x-amzn-RequestId",
"value": "8ad57380-38ce-4f88-b52c-ebdc281c6dc0"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Headers",
"value": "*"
},
{
"key": "x-amzn-ErrorType",
"value": "UnauthorizedException"
},
{
"key": "x-amz-apigw-id",
"value": "DTk5lEMIoAMEMKA="
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 d6eccaed6bcab76e8b9ccd6b59f866ba.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "caCyNI7gryYsApKpi1mJsvjFPXsoFE1DpynqGZU5_dZY3frLEyTelw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-120\",\n \"message\": \"Unauthorized request. Please make sure you have an unexpired and properly scoped token to perform this action.\"\n }\n}"
},
{
"name": "failure(missing user_id parameter variable)",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/transactions",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"transactions"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "67"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:59:25 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae869-46a8be92546c0f0e14b8e6a9"
},
{
"key": "x-amzn-RequestId",
"value": "390ed688-19ad-4dd8-a2c4-4442e5aca1c0"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTlAfHtVIAMEVGg="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 d6eccaed6bcab76e8b9ccd6b59f866ba.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "CkGZCRlV5dhbU29URQ10exTvps6X3pvFhaL73ZVZv1ruj8iZbmQ4Dw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User :user_id not found\"\n }\n}"
}
]
},
{
"name": "/job-status",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"const baseUrl = pm.environment.get(\"base_url\");\r",
"const xApiKey = pm.environment.get(\"x-api-key\");\r",
"\r",
"pm.sendRequest({\r",
" url: baseUrl+'/v2/token',\r",
" method: 'POST',\r",
" header: {\r",
" 'Content-Type': 'application/json',\r",
" 'x-api-key': xApiKey\r",
" },\r",
" body: {\r",
" mode: 'raw',\r",
" raw: JSON.stringify({\r",
" apiKey: apiKey,\r",
" apiSecret: apiSecret\r",
" })\r",
" }\r",
"}, function (err, res) {\r",
" if (err) {\r",
" console.log(\"Token request failed:\", err);\r",
" } else {\r",
" // Parse the response to extract the token\r",
" const jsonData = res.json();\r",
" // Assuming the token is in jsonData.token\r",
" pm.environment.set(\"token\", jsonData.token);\r",
" }\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"const Schema = {\r",
" \"type\": \"object\",\r",
" \"properties\": {\r",
" \"status\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"statusCode\": {\r",
" \"type\": \"integer\"\r",
" },\r",
" \"jobStatus\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"mfaTriggered\": {\r",
" \"type\": \"boolean\"\r",
" },\r",
" \"jobId\": {\r",
" \"type\": \"string\"\r",
" },\r",
" \"userId\": {\r",
" \"type\": \"string\"\r",
" }\r",
" },\r",
" \"required\": [\r",
" \"status\",\r",
" \"statusCode\",\r",
" \"jobStatus\",\r",
" \"mfaTriggered\",\r",
" \"jobId\",\r",
" \"userId\"\r",
" ]\r",
"}\r",
"\r",
"pm.test(\"Response time is less than 8000ms\", function () {\r",
" pm.expect(pm.response.responseTime).to.be.below(8000);\r",
"});\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"Validate the json response Schema\",function()\r",
"{\r",
"pm.response.to.have.jsonSchema(Schema);\r",
"\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
},
{
"key": "x-api-key",
"value": "{{x-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"response": [
{
"name": "success",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
},
{
"key": "x-api-key",
"value": "{{api_key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "184"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 13 Dec 2024 17:50:43 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-675c73ef-3cc2214234281be338af01e0"
},
{
"key": "x-amzn-RequestId",
"value": "68bf7bea-a34e-4ea6-8b19-04d9bbc92bfa"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "CvcNaHHXIAMEdJA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 87d7664d4d5a16632f7453ca9cc45a74.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "9SxMfHGA95iBkvd95Lswjt5giJCw36owz_Hpgid3vf348WGEqO-x4g=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"jobStatus\": \"Completed\",\n \"mfaTriggered\": false,\n \"jobId\": \"REF-7951da09a0844aa5a330b2b19ac2e78d\",\n \"userId\": \"070c4836340a430286a3a0299681ef3d\"\n}"
},
{
"name": "success (pending MFA)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "185"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Fri, 20 Dec 2024 18:42:16 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6765ba87-227dff47458cd8f21dd67f7d"
},
{
"key": "x-amzn-RequestId",
"value": "8880ff3c-dc97-4525-8b93-30d961f884b3"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DGoVTGQCIAMEDnQ="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Miss from cloudfront"
},
{
"key": "Via",
"value": "1.1 564509e1f4d165c1797432f39748ffd8.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "SCL51-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "dmxF7LGVZP2SHc6DdAvkw6-E_lRimMn0OOHBZk9K5hs5s13BCJ18nA=="
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"statusCode\": 200,\n \"jobStatus\": \"Pending MFA\",\n \"mfaTriggered\": true,\n \"jobId\": \"TRN-854eb1f13e4b4f57a4a4b93832f3006b\",\n \"userId\": \"79170b615e56411ea275868fca126785\"\n}"
},
{
"name": "failure (user not found)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job/:job_id",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job",
":job_id"
],
"variable": [
{
"key": "user_id",
"value": "{{user_id}}"
},
{
"key": "job_id",
"value": "{{job_id}}",
"description": "This variable is called from previous endpoint."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "90"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Wed, 18 Dec 2024 14:46:54 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-6762e059-2c517f9526abec987ad2d418"
},
{
"key": "x-amzn-RequestId",
"value": "508bf765-8d83-4c95-9155-46ec010cfe7b"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "C_f-AFxDIAMElGg="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 141cc765667839ffa8c4ad646af354cc.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "01SyMUPSizXEQzvO-rjQHDLFhHvu2JwI-9FKe5tdGruqLaMKfH42dw=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-102\",\n \"message\": \"User 761268fe79af4bcca602b3cdb307962 not found\"\n }\n}"
},
{
"name": "failure(missing job_id path parameter)",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"url": {
"raw": "{{base_url}}/v2/accounts/:user_id/job",
"host": [
"{{base_url}}"
],
"path": [
"v2",
"accounts",
":user_id",
"job"
],
"variable": [
{
"key": "user_id",
"value": ""
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "89"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Date",
"value": "Tue, 24 Dec 2024 16:50:52 GMT"
},
{
"key": "X-Amzn-Trace-Id",
"value": "Root=1-676ae66c-5e649d501aeb11c07de9ba66"
},
{
"key": "x-amzn-RequestId",
"value": "5b6a3b44-3b57-422d-98b5-9de6eb20519d"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "x-amz-apigw-id",
"value": "DTjxCHP9oAMEhhA="
},
{
"key": "Cache-Control",
"value": "max-age=30"
},
{
"key": "X-Cache",
"value": "Error from cloudfront"
},
{
"key": "Via",
"value": "1.1 a791ece59ab90f323cd986ba2aeaf9c4.cloudfront.net (CloudFront)"
},
{
"key": "X-Amz-Cf-Pop",
"value": "CMH68-P4"
},
{
"key": "X-Amz-Cf-Id",
"value": "JdPWU1Ro0g2mm3k1tB9FX58WTl_6uLC0RU1CiEVQg4E6P8xHg-SXSQ=="
}
],
"cookie": [],
"body": "{\n \"error\": {\n \"code\": \"AC-100\",\n \"message\": \"Missing required request parameters: [job_id]\"\n }\n}"
}
]
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "job_id",
"value": "",
"type": "string"
},
{
"key": "mfa_type",
"value": "",
"type": "string"
}
]
}
Important Note: In the update made on July 10th, 2025 an additional header parameter was added x-api-key, the current collection includes this change.

Pre-Condition
To begin testing the Aeropay APIs, you'll need to generate a user_id and modify it in the environment variable. The user_id is a unique identifier for a bank connection that will be used to fetch data for that bank. This user_id is returned from the Aerosync widget after a user successfully links a bank.
If you're interested in diving into testing the Aerosync APIs before you've built a working bank connection widget, the following steps will walk you through how to retrieve a user_id value to begin testing.
Step 1:
Select the https://staging.aerosync.com?token=xxxx/ (Remember to generate a widget token and add it to the URL).

Step 2: After successfully entering to the site, click on the "Continue" button to go to the bank list.

Step 3: Choose a bank to link a new account during this step right click on the page, select "Inspect" and click the "Network" tab.

Step 4: Do all the steps of a bank link process and validate the payload from the create_accounts, there you will find the user_id and user_password.

Note: Keep both the user_id and user_password in a notepad or bloc to use for future testing.
APIs TESTING STEPS

Step 1: Go to the environment variables and change the value of the user_id from the previous pre-conditions step.

Step 2: Select the environment in this case Aerosync APIs- Staging (This is according to which environment the user_id was generated).

Step 3: Select any API from the collection and click on send and review the response.

END
Updated about 2 months ago