{"info":{"_postman_id":"cf16966b-58a2-4f4a-8d66-fa2db9964d5e","name":"IDW: Standard KBA","description":"<html><head></head><body><h2 id=\"before-you-start\"><strong>Before you start,</strong></h2>\n<p><strong>Create a new</strong> <strong><code>Environment</code></strong> <strong>so this project can save and write information for you automatically.</strong></p>\n<img src=\"https://content.pstmn.io/9412927d-0d08-4c3d-8c3b-dd8d7329f938/U2NyZWVuIFNob3QgMjAyMi0xMS0wOSBhdCA3LjA5LjUxIFBNLnBuZw==\">\n\n<p><a href=\"https://docs.iddataweb.com/docs/verify-api-dynamic-kba\">Follow these instructions step-by-step to use this project properly</a></p>\n<p>If you get stuck, or decide to walk through this project again with new data, call each step in order to ensure the old data gets replaced.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"24165880","collectionId":"cf16966b-58a2-4f4a-8d66-fa2db9964d5e","publishedId":"2s8YemvENx","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-07-18T16:38:56.000Z"},"item":[{"name":"0) Get Token","event":[{"listen":"test","script":{"id":"63c0d4a0-580c-4e95-b8f6-b044861b2593","exec":["pm.environment.clear()","var authString = request.headers.authorization.split(\" \")[1].toString()","var encodedAuth = Buffer.from(authString, 'base64')","var decodedAuth = encodedAuth.toString().split(\":\")","var forwardApiKey = decodedAuth[0]","","pm.environment.set(\"token\",JSON.parse(pm.response.text()).access_token)","pm.environment.set(\"forwardApiKey\", forwardApiKey)"],"type":"text/javascript","packages":{}}}],"id":"618a3ef4-07d6-469b-8dbe-edc2af5b6904","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[],"url":"https://api.preprod.iddataweb.com/v1/token?grant_type=client_credentials","urlObject":{"protocol":"https","path":["v1","token"],"host":["api","preprod","iddataweb","com"],"query":[{"key":"grant_type","value":"client_credentials"}],"variable":[]}},"response":[],"_postman_id":"618a3ef4-07d6-469b-8dbe-edc2af5b6904"},{"name":"0.1) Country Selection","event":[{"listen":"test","script":{"id":"a7f1225e-838f-4a94-8899-d59288e5145d","exec":["var requestBody  = JSON.parse(pm.request.body.raw)","var responseBody = JSON.parse(pm.response.text());","","// FORWARD API KEY, APP ID, CREDENTIAL, ASI (OR TRANSACTION ID)","var credential = requestBody.credential","var appID = requestBody.appID","var forwardApiKey = responseBody.forwardApiKey","var asi = responseBody.transaction_id","","pm.environment.set(\"credential\", credential);","pm.environment.set(\"appID\", appID);","pm.environment.set(\"forwardApiKey\", forwardApiKey);","pm.environment.set(\"asi\", asi)"],"type":"text/javascript","packages":{}}}],"id":"732de8d9-bf05-48d1-9a2d-4a01db894913","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{token}}","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"apikey\": \"{{forwardApiKey}}\",\n    \"credential\": \"(used as a unique identifier) e.g. employee@company.com\",\n    \"appID\":\"YOUR_APPLICATION_NAME e.g. 'Employee Onboarding App'\",\n    \"userAttributes\": [\n        {\n            \"attributeType\": \"Country\",\n            \"values\": {\n                \"country\": \"US\"\n            }\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.preprod.iddataweb.com/v1/slverify","urlObject":{"protocol":"https","path":["v1","slverify"],"host":["api","preprod","iddataweb","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"732de8d9-bf05-48d1-9a2d-4a01db894913"},{"name":"1) Get KBA Questions","event":[{"listen":"test","script":{"id":"8a9472dc-8dde-40bf-8661-e6c69f126aaa","exec":["var requestBody  = JSON.parse(pm.request.body.raw)","var responseBody = JSON.parse(pm.response.text());","","// FIRST & LAST NAME","var firstName = requestBody.userAttributes[0].values.fname","var lastName = requestBody.userAttributes[0].values.lname","","// DATE OF BIRTH","var DOB = requestBody.userAttributes[2].values","","var dateOfBirth_month = DOB.month","var dateOfBirth_day = DOB.day","var dateOfBirth_year = DOB.year","","// ADDRESS","var address = requestBody.userAttributes[1].values","","var country = address.country","var state = address.administrative_area_level_1","var city = address.locality","var zip = address.postal_code","var street = address.route","var streetNumber = address.street_number","","pm.environment.set(\"firstName\",firstName)","pm.environment.set(\"lastName\",lastName)","pm.environment.set(\"dateOfBirth_day\",dateOfBirth_day)","pm.environment.set(\"dateOfBirth_month\",dateOfBirth_month)","pm.environment.set(\"dateOfBirth_year\",dateOfBirth_year)","pm.environment.set(\"country\",country)","pm.environment.set(\"city\",city)","pm.environment.set(\"state\",state)","pm.environment.set(\"street\",street)","pm.environment.set(\"streetNumber\",streetNumber)","pm.environment.set(\"zip\",zip)","","var questions = responseBody.kbaQuestions.QuestionSet.Questions;","","pm.environment.set(\"ConversationId\", responseBody.kbaQuestions.ConversationId);","pm.environment.set(\"QuestionSetId\", responseBody.kbaQuestions.QuestionSet.QuestionSetId);","pm.environment.set(\"Question-1\", questions[0].QuestionId);","pm.environment.set(\"Question-2\", questions[1].QuestionId);","pm.environment.set(\"Question-3\", questions[2].QuestionId);"],"type":"text/javascript","packages":{}}}],"id":"bee08acf-fdb1-4232-afb9-24a8b8066dde","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer {{token}}","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"apikey\": \"{{forwardApiKey}}\",\n    \"credential\": \"{{credential}}\",\n    \"appID\":\"{{appID}}\",\n    \"asi\": \"{{asi}}\",\n    \"userAttributes\": [\n        {\n            \"attributeType\": \"FullName\",\n            \"values\": {\n                \"fname\": \"John\",\n                \"mname\": \"\",\n                \"lname\": \"Doe\"\n            }\n        },\n        {\n            \"attributeType\": \"InternationalAddress\",\n            \"values\": {\n                \"country\": \"US\",\n                \"administrative_area_level_1\": \"VA\",\n                \"locality\": \"Vienna\",\n                \"postal_code\": \"12345\",\n                \"route\": \"Way Street Road\",\n                \"street_number\": \"1234\"\n            }\n        },\n        {\n            \"attributeType\": \"DOB\",\n            \"values\": {\n                \"day\": \"xx\",\n                \"month\": \"xx\",\n                \"year\": \"xxxx\"\n            }\n        }\n        \n    ]\n}"},"url":"https://api.preprod.iddataweb.com/v1/kba/config","urlObject":{"protocol":"https","path":["v1","kba","config"],"host":["api","preprod","iddataweb","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bee08acf-fdb1-4232-afb9-24a8b8066dde"},{"name":"2) Submit KBA Answers","event":[{"listen":"prerequest","script":{"id":"a06f05ec-a335-4ce4-b0d5-13a3f892572c","exec":[""],"type":"text/javascript"}}],"id":"c8178998-8eef-4fff-94ca-ad251aa52c45","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","value":"Bearer {{token}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"asi\": \"{{asi}}\",\n\t\"apikey\": \"{{forwardApiKey}}\",\n    \"credential\": \"{{credential}}\",\n    \"appID\":\"{{appID}}\",\n    \"kbaRequest\": {\n        \"ConversationId\": \"{{ConversationId}}\",\n        \"Answers\": {\n            \"QuestionSetId\": \"{{QuestionSetId}}\",\n            \"Questions\": [\n\t\t\t   {\n\t\t\t      \"QuestionId\": \"{{Question-1}}\",\n\t\t\t      \"Choices\":[\n\t\t\t         {\n\t\t\t            \"Choice\":\"12345678\"\n\t\t\t         }\n\t\t\t      ]\n\t\t\t   },\n\t\t\t   {\n\t\t\t      \"QuestionId\":\"{{Question-2}}\",\n\t\t\t      \"Choices\":[\n\t\t\t         {\n\t\t\t            \"Choice\":\"12345678\"\n\t\t\t         }\n\t\t\t      ]\n\t\t\t   },\n               {\n\t\t\t      \"QuestionId\":\"{{Question-3}}\",\n\t\t\t      \"Choices\":[\n\t\t\t         {\n\t\t\t            \"Choice\":\"12345678\"\n\t\t\t         }\n\t\t\t      ]\n\t\t\t   }\n\t\t\t]\n        }\n    }\n}"},"url":"https://api.preprod.iddataweb.com/v1/kba/submit","urlObject":{"protocol":"https","path":["v1","kba","submit"],"host":["api","preprod","iddataweb","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"c8178998-8eef-4fff-94ca-ad251aa52c45"},{"name":"3) Verify KBA Answers","id":"a0eeccee-4386-4f58-a9cc-1d8858e82f4d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{token}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"asi\": \"{{asi}}\",\n\t\"apikey\": \"{{forwardApiKey}}\",\n    \"credential\": \"{{credential}}\",\n    \"appID\":\"{{appID}}\",\n    \"userAttributes\": [\n        {\n            \"attributeType\": \"FullName\",\n            \"values\": {\n                \"fname\": \"{{firstName}}\",\n                \"mname\": \"\",\n                \"lname\": \"{{lastName}}\"\n            }\n        },\n        {\n            \"attributeType\": \"InternationalAddress\",\n            \"values\": {\n                \"country\": \"{{country}}\",\n                \"administrative_area_level_1\": \"{{state}}\",\n                \"locality\": \"{{city}}\",\n                \"postal_code\": \"{{zip}}\",\n                \"route\": \"{{street}}\",\n                \"street_number\": \"{{streetNumber}}\"\n            }\n        },\n        {\n            \"attributeType\": \"DOB\",\n            \"values\": {\n                \"day\": \"{{dateOfBirth_day}}\",\n                \"month\": \"{{dateOfBirth_month}}\",\n                \"year\": \"{{dateOfBirth_year}}\"\n            }\n        }\n        \n    ]\n}"},"url":"https://api.preprod.iddataweb.com/v1/slverify","urlObject":{"protocol":"https","path":["v1","slverify"],"host":["api","preprod","iddataweb","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a0eeccee-4386-4f58-a9cc-1d8858e82f4d"}]}