{"info":{"_postman_id":"dbc6f5b9-aded-42e9-bfb1-215765e22c2e","name":"Basiq API 3.0","description":"<html><head></head><body><p>We know how hard it can be to start developing with API's so at Basiq we have improved the experience by providing a beta template known as a Postman Collection.<br>In under 10 minutes you will have access to Basiq's full suite of products using our Sandbox environment!</p>\n<p>We hope you find it useful and we always welcome feedback. Enjoy!</p>\n<p>For full API Documentation see <a href=\"https://api.basiq.io\">https://api.basiq.io</a></p>\n<p>See also the <strong>Get started with Basiq</strong> guide:</p>\n<p><a href=\"https://api.basiq.io/docs\">https://api.basiq.io/docs</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"16249946","collectionId":"dbc6f5b9-aded-42e9-bfb1-215765e22c2e","publishedId":"UVktosia","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"287299"},"publishDate":"2022-03-03T06:05:52.000Z"},"item":[{"name":"Authenticate","item":[{"name":"Authenticate","event":[{"listen":"test","script":{"id":"c05204d1-fdd4-4fae-a7d4-d31cf3bae96e","exec":["postman.clearEnvironmentVariable('nextRequest');","postman.setEnvironmentVariable('access-token', null);","postman.setEnvironmentVariable('accounts-checked', 'false')","","var data =  pm.response.json();","postman.setEnvironmentVariable('access-token', data.access_token);","","pm.test(\"Acquired access token\", function () {","    pm.response.to.have.status(200);","    pm.response.to.have.jsonBody('access_token'); ","});","","postman.setNextRequest('Get Institutions');",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"61beac12-23a8-4721-8599-6a97e668cc22","exec":["var max_wait_secs = 180; //must be divisible by 10 and not greater than 300","","//Leave this alone!","postman.setEnvironmentVariable(\"poll-count\", max_wait_secs / 180); //multiple of 10 cannot be more than "],"type":"text/javascript"}}],"id":"ec4ef9f9-b7b6-404c-be4a-2dbac19ba744","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Basic XXXXXX","description":"<p>Replace XXXXXX with your API Key here</p>\n"},{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"basiq-version","value":"3.0"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"scope","value":"SERVER_ACCESS","type":"text","description":"<p>For requests from your server side</p>\n"},{"key":"scope","value":"CLIENT_ACCESS","description":"<p>For requests from the client, e.g., Create Connection</p>\n","type":"text","disabled":true},{"key":"userId","value":"{{user-id}}","description":"<p>For retrieving User Consents and User Connections</p>\n","type":"default","disabled":true}]},"url":"https://au-api.basiq.io/token","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#authentication\">https://api.basiq.io/reference/authentication</a></p>\n<p>Exchange your API key for a token - this token is valid for one hour. Include the token in the Authorization header of each API request.</p>\n<hr />\n<h1 id=\"scope\">Scope</h1>\n<p><strong>Requests from your server</strong> to Basiq should include a token with <code>scope=SERVER_ACCESS</code>, which grants full access to the Basiq API.</p>\n<p><strong>Requests from your client</strong> should have a <code>CLIENT_ACCESS</code> token. This token has restricted access and only allows the creation or update of a connection. If an attacker intercepts a request and steals your <code>CLIENT_ACCESS</code> token, the risk is mitigated as they will not be able to get your users' data.</p>\n<p>A <code>CLIENT_ACCESS</code> token only grants access to the following requests:</p>\n<ul>\n<li>Get Institutions</li>\n<li>Get Institution Details</li>\n<li>Check Job Status</li>\n<li>Get User Consents <em><strong>- also requires a userId bound to token</strong></em></li>\n</ul>\n<hr />\n<h1 id=\"best-practice\">Best practice</h1>\n<p>The token lasts for one hour. You should cache this token for global use: <strong>do not</strong> re-authenticate separately for each user or connection, etc., as this will cause trouble as your app scales.</p>\n","urlObject":{"protocol":"https","path":["token"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"ec4ef9f9-b7b6-404c-be4a-2dbac19ba744"}],"id":"3125625f-cd49-4cdd-8297-54ed29d3638c","description":"<p>When working with Basiq APIs your application will need to complete the authentication process first before you can access any of the available resources.</p>\n<p>The authentication process is fairly straightforward and simply requires you to exchange your API key for a token which is valid for one hour. Once you obtain the token, you can call any of the available API services by simply including the token in the Authorization header of each request.</p>\n","_postman_id":"3125625f-cd49-4cdd-8297-54ed29d3638c"},{"name":"Institutions","item":[{"name":"Get Institutions","event":[{"listen":"test","script":{"id":"633580a2-c873-4315-a2d2-5d43ff522967","exec":["postman.setEnvironmentVariable('institution-id', null);","","var data = pm.response.json();","","tests[\"Institutions successfuly acquired (\" + data.data.length + \")\"] = data.data.length > 0;","","postman.setEnvironmentVariable('institution-id', data.data[0].id);","","postman.setNextRequest('Get Institution Details');",""],"type":"text/javascript"}}],"id":"6f956f65-2d4e-4779-a9a3-31488a909b80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/institutions","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#institutions\">https://api.basiq.io/reference/institutions</a></p>\n<p>Returns a list of all available institutions.</p>\n","urlObject":{"protocol":"https","path":["institutions"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f956f65-2d4e-4779-a9a3-31488a909b80"},{"name":"Get Institution Details","event":[{"listen":"test","script":{"id":"fe5393e0-f5b6-4952-a9f8-68396b249360","exec":["var data =  pm.response.json();","","pm.test(data.shortName + \" (\" + data.id + \") current status is \" + data.status, function () {","    pm.response.to.have.status(200);","    pm.expect(data.id).to.equal(postman.getEnvironmentVariable('institution-id'));","});","","postman.setNextRequest('Create User');",""],"type":"text/javascript"}}],"id":"8d8597fb-158e-40ac-94ec-d7340d232652","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/institutions/{{institution-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#retrieve-an-institution\">https://api.basiq.io/reference/retrieve-an-institution</a></p>\n<p>This request returns the details for a single institution.</p>\n","urlObject":{"protocol":"https","path":["institutions","{{institution-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"8d8597fb-158e-40ac-94ec-d7340d232652"}],"id":"d4e3f309-f350-4b3d-b9b4-5af26777da14","description":"<p>Under the hood, Basiq connects to the internet banking portals of more than 70 different institutions - with more released every month across both Open Banking and Web connectors.</p>\n<p>For transparency and to allow you to manage the user experience, we expose all details relating to the <strong>maturity</strong>, <strong>availability</strong>, <strong>performance</strong>, and <strong>data points</strong> returned by each bank's website in the <code>/institutions</code> endpoint.</p>\n","_postman_id":"d4e3f309-f350-4b3d-b9b4-5af26777da14"},{"name":"Users","item":[{"name":"Create User","event":[{"listen":"prerequest","script":{"id":"68f4624a-d6ad-4d61-9003-37278a2c217e","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"343139b1-3f73-46a9-a623-00eeb432bfdd","exec":["postman.setEnvironmentVariable('user-id', null);","","var data =  pm.response.json();","","postman.setEnvironmentVariable('user-id', data.id);","","pm.test(\"Created new user \" + data.email + \", id \" + data.id, function () {","    pm.response.to.have.status(201);","    pm.response.to.have.jsonBody('id'); ","});","","postman.setNextRequest('Create Connection');",""],"type":"text/javascript"}}],"id":"99dcb8ad-f979-41a0-831d-5c560c4e5050","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"warning":"This is a duplicate header and will be overridden by the Authorization header generated by Postman.","key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"max@hooli.com\",\n  \"mobile\": \"+614xxxxxxxx\"\n}"},"url":"https://au-api.basiq.io/users","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#create-a-user\">https://api.basiq.io/reference/create-a-user</a></p>\n<p>You need to provide either an <code>email</code> or a <code>mobile</code> argument in the body.</p>\n<p>There is no uniqueness check: you need to manage this on your side.</p>\n","urlObject":{"protocol":"https","path":["users"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"99dcb8ad-f979-41a0-831d-5c560c4e5050"},{"name":"Get User Details","event":[{"listen":"test","script":{"id":"1a3a3076-9363-4971-ac41-43861e0a9ab4","exec":["var data =  pm.response.json();","","pm.test(\"Returned user \" + data.email, function () {","    pm.response.to.have.status(200);","    pm.expect(data.id).to.equal(postman.getEnvironmentVariable('user-id'));","});",""],"type":"text/javascript"}}],"id":"bf634026-5099-4e14-a148-cc77718f6ef1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#retrieve-a-user\">https://api.basiq.io/reference/retrieve-a-user</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"bf634026-5099-4e14-a148-cc77718f6ef1"}],"id":"9b3142d9-10b7-458a-8900-b9c2c2cb280d","description":"<p>The user object in Basiq is just a bucket in which we aggregate financial data across various banks, relating to a single person.</p>\n","_postman_id":"9b3142d9-10b7-458a-8900-b9c2c2cb280d"},{"name":"User Consent","item":[{"name":"Get User Consents","event":[{"listen":"test","script":{"id":"66e40a5d-28cd-4cd2-9319-a43ecf5bdb49","exec":["var data = pm.response.json();","","pm.test(function () {","    pm.response.to.have.status(200);","});","","postman.setNextRequest(null);",""],"type":"text/javascript"}}],"id":"adc6a32a-1431-47a0-8220-1cea786cbed0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}/consents","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference/retrieve-user-consent\">https://api.basiq.io/reference/retrieve-user-consent</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","consents"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"adc6a32a-1431-47a0-8220-1cea786cbed0"}],"id":"3a204cb6-a2da-4b7a-896c-915e87a914fe","description":"<p>A User Consent is created when your end user explicitly consents to the application policy. This can only be done via the <a href=\"https://api.basiq.io/docs/consent-ui\">Consent UI</a>.  </p>\n<p>URL: <a href=\"https://consent.basiq.io/home?userId=%7B%7BuserId%7D%7D&amp;token=%7B%7Btoken%7D%7D\">https://consent.basiq.io/home?userId={{userId}}&amp;token={{token}}</a></p>\n","_postman_id":"3a204cb6-a2da-4b7a-896c-915e87a914fe"},{"name":"Connections","item":[{"name":"Get Connections","event":[{"listen":"test","script":{"id":"a57c9c65-5915-4d08-b9f9-5dd560d70bbc","exec":["var data =  pm.response.json();","","pm.test(\"Connections successfuly acquired (\" + data.data.length + \")\", function () {","    pm.response.to.have.status(200);","    pm.expect(jsonData.data.length).to.be.above(0);","});",""],"type":"text/javascript"}}],"id":"3d891a1e-de26-4464-9dc8-9cdb33dd4f6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}/connections/","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#connections\">https://api.basiq.io/reference/</a><a href=\"https://api.basiq.io/reference#connections\">connections</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","connections",""],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"3d891a1e-de26-4464-9dc8-9cdb33dd4f6a"},{"name":"Get Connection Details","event":[{"listen":"test","script":{"id":"47cf223c-7777-4706-bc44-220376e866fa","exec":["var data =  pm.response.json();","","pm.test(\"Connection details successfuly acquired (\" + data.profile.fullName + \" - \" + data.institution.id + \")\", function () {","    pm.response.to.have.status(200);","    pm.expect(data.id).to.equal(postman.getEnvironmentVariable('connection-id'));","});",""],"type":"text/javascript"}}],"id":"03121da0-4128-4d72-915f-7d839ab4cbc0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}/connections/{{connection-id}}","description":"<p><a href=\"https://api.basiq.io/reference#retrieve-a-connection\">https://api.basiq.io/reference#retrieve-a-connection</a></p>\n<p>In addition to attributes reported in the Get Connections request, this also returns <strong>login profile</strong> information for the user who has shared their credentials.</p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","connections","{{connection-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"03121da0-4128-4d72-915f-7d839ab4cbc0"},{"name":"Refresh Connection","event":[{"listen":"test","script":{"id":"1ba45131-c6fe-494f-a0f0-76242edbcbc2","exec":["postman.setEnvironmentVariable('job-id', null);","","var data =  pm.response.json();","postman.setEnvironmentVariable('job-id', data.id);","","pm.test(\"Refreshed connection\", function () {","    pm.response.to.have.status(202);","    pm.response.to.have.jsonBody('id'); ","});","","postman.setNextRequest('Check Job Status');",""],"type":"text/javascript"}}],"id":"72a5e975-08e2-44c5-9393-e8e35e17a7f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://au-api.basiq.io/users/{{user-id}}/connections/{{connection-id}}/refresh","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#refresh-a-connection\">https://api.basiq.io/reference/r</a><a href=\"https://api.basiq.io/reference#refresh-a-connection\">efresh-a-connection</a></p>\n<p>Use this request to refresh the data for this connection.</p>\n<p><strong>Note that if you need ongoing refreshed data you should not use this request as a default</strong>: instead, ask the Basiq team to enable you for background daily refreshes.</p>\n<hr />\n<h1 id=\"use-the-smart-cache-instead\">Use the smart cache instead</h1>\n<p><strong>For ongoing daily refreshed data</strong>, ask the Basiq team to enable your application for background refreshes (the \"smart cache\" feature). This is a much more efficient way to refresh data than initiating a Refresh Connection request yourself each day.</p>\n<hr />\n<h1 id=\"best-practice\">Best practice</h1>\n<p><strong>Keep these ad hoc refreshes to a minimum</strong>: these requests put extra load on the banks' websites and if used excessively are liable to trigger action from the bank: your user may be locked out of their account, or the bank may even try to block Basiq.</p>\n<p><strong>Avoid bulk refreshes, e.g., cron jobs</strong>: if you refresh thousands of connections at the same time, this will put load on the banks' websites which may cause problems. Let the smart cache handle this for you, and use the Refresh Connection request only after confirming that Basiq has not recently refreshed.</p>\n<p><strong>Before refreshing, check when the connection was last refreshed</strong>: check the user's jobs for a complete view of when the connection was last refreshed and the result, or for a more lightweight option check the <code>connection.lastUsed</code> attribute to see when the connection was last refreshed.</p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","connections","{{connection-id}}","refresh"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"72a5e975-08e2-44c5-9393-e8e35e17a7f6"}],"id":"20c8a3aa-afb7-45d2-9c69-895f892ddda4","description":"<p>A connection is the means by which Basiq aggregates your user's financial data: typically this is via web connections to the banks' internet banking portals, or Open Banking connections if you are enabled.</p>\n<p>v3.0 of the Basiq API requires partners to use the <a href=\"https://api.basiq.io/v3.0/docs/consent-ui\">Basiq Consent UI</a> within their application for end users to provide consent and connect their financial institutions (for both DDC and Open Banking connections).</p>\n<p><strong>Attempts to create a connection directly via the API will not be successful</strong></p>\n","_postman_id":"20c8a3aa-afb7-45d2-9c69-895f892ddda4"},{"name":"Jobs","item":[{"name":"Check Job Status","event":[{"listen":"test","script":{"id":"fbaab083-280c-451f-999c-aac86560e276","exec":["postman.setEnvironmentVariable('connection-id', null);","","var data =  pm.response.json();","","pm.test(\"Job status successfuly returned\", function () {","    pm.response.to.have.status(200);","});","","if(data.steps[0].status == 'success') {","    postman.setEnvironmentVariable('connection-id', data.steps[0].result.url.substring(data.steps[0].result.url.lastIndexOf('/')+1));","}","","for(var i=0; i<=data.steps.length -1; i++) {","    if(data.steps[i].status == 'success' || data.steps[i].status == 'failed') {","        pm.test(\"Step \" + data.steps[i].title + \" completed\", function() {","            pm.expect(data.steps[i].status).to.equal('success');","        });","    } else {","        pm.test.skip(\"Step \" + data.steps[i].title + \" in progress\");","    }","}","","// routing based on completed job steps","if(data.steps[data.steps.length -1].status == 'success') {","    postman.clearEnvironmentVariable('nextRequest');","    postman.setNextRequest('Get Transactions');","} else if (data.steps[data.steps.length -2].status == 'success' && postman.getEnvironmentVariable('accounts-checked') === 'false') {","    postman.setEnvironmentVariable('accounts-checked', 'true')","    postman.clearEnvironmentVariable('nextRequest');","    postman.setNextRequest('Get Accounts'); ","} else {","    postman.clearEnvironmentVariable('nextRequest');","    postman.setNextRequest('Delay 10 seconds');","}",""],"type":"text/javascript"}}],"id":"4df76359-d04e-49f4-bdf0-f33169473024","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/jobs/{{job-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#jobs\">https://api.basiq.io/reference/jobs</a></p>\n<p>When Basiq fetches a user's data from their bank, the data retrieval is executed through an asynchronous job. A job goes through three steps:</p>\n<ul>\n<li>verify-credentials</li>\n<li>retrieve-accounts</li>\n<li>retrieve-transactions</li>\n</ul>\n<p>As soon as a step is complete you can make relevant requests without having to wait for further steps. For example, you can get the user's accounts from Basiq as soon as the retrieve-accounts step is complete: you don't have to wait for the transactions step.</p>\n<p>In practice, live banks present a number of scenarios that prevent Basiq from fetching a user's accounts and transactions from their internet banking. In these cases, Basiq provides clear errors and recommended actions so that you and your user can clear the issue and fetch their data successfully.</p>\n<hr />\n<h1 id=\"errors-and-recommended-action\">Errors and recommended action</h1>\n<p>See example responses attached to this request.</p>\n<h2 id=\"invalid-credentials\"><code>invalid-credentials</code></h2>\n<ul>\n<li><strong>where it occurs</strong><ul>\n<li>only on the verify-credentials step</li>\n<li>if you are using the UI Control tool, it will handle this response for you</li>\n</ul>\n</li>\n<li><strong>what it means</strong><ul>\n<li>if the bank returns detail of the failure (e.g., the user is locked out of internet banking, or has two-factor-authentication enabled on login), Basiq will return this detail; if no detail is given, Basiq will return a generic error</li>\n<li>see API reference for more details and examples: <a href=\"https://api.basiq.io/reference#error-codes\">https://api.basiq.io/reference/error-codes</a></li>\n</ul>\n</li>\n<li><strong>recommended action</strong>:<ul>\n<li>Troubleshooting: the user should login into their internet banking (not the app) - can they login using only the credentials provided to Basiq?</li>\n<li>Action: either retry the Create Connection request, or for existing connections update the credentials in Basiq with the Update Connection request, below</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"account-not-accessible-requires-user-action\"><code>account-not-accessible-requires-user-action</code></h2>\n<ul>\n<li><strong>where it occurs</strong><ul>\n<li>can occur on any job step: depends where Basiq encounters the error when navigating the user's internet banking</li>\n</ul>\n</li>\n<li><strong>what it means</strong><ul>\n<li>the bank is presenting a popup to the user in their internet banking. Whenever possible Basiq will navigate through these, but for example if the bank presents new T&amp;Cs to the user and offers only options to \"Agree\" or \"Decline\", then Basiq will fail the job with this error</li>\n</ul>\n</li>\n<li><strong>recommended action</strong><ul>\n<li>the user should login to their internet banking, navigate to accounts and transactions, and address any popups requiring action from the bank</li>\n<li>you (the API user) can then refresh the connection: once the popup has cleared, the job should complete as normal</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"service-unavailable\"><code>service-unavailable</code></h2>\n<ul>\n<li><strong>where it occurs</strong><ul>\n<li>can occur on any job step: depends on where Basiq encounters the error condition on the bank's internet banking portal</li>\n</ul>\n</li>\n<li><strong>what it means</strong><ul>\n<li>the bank is unable to service Basiq's request: typically this is due to a maintenance outage or performance issue on the bank's website, but can occasionally happen if the bank has made significant changes to their internet banking</li>\n</ul>\n</li>\n<li><strong>recommended action</strong><ul>\n<li>handle this as you would if you were logged in to your internet banking and received a response, \"We can't do this right now. Please try again later.\" ... <em>wait a while and try again</em></li>\n<li>let the user know there is a problem fetching data from their bank, and that you will let them know when their data is ready</li>\n<li>check the status for this bank in the <code>/institutions</code> endpoint: if it is <code>major-outage</code> then the problem is widespread and you should wait until the status has lifted</li>\n<li>if the institution status is anything other than <code>major-outage</code> then wait 10 minutes and try again</li>\n<li>if after a couple of retries the error has not cleared, then report the connection ID to Basiq support</li>\n</ul>\n</li>\n</ul>\n<hr />\n<h1 id=\"best-practice\">Best practice</h1>\n<p>If you are building your own UI, you should keep your user engaged until the first (<code>verify-credentials</code>) step is complete: it's not a good experience to let the user go and then have to drag them back if the credentials didn't work.</p>\n<p>As soon as the credentials step is complete you should release the user to continue with your onboarding journey while Basiq fetches their accounts and transactions: there is no sense in keeping them hanging around watching a spinning wheel.</p>\n<p>To help manage the user journey, check the <code>institution.stats</code> in the <code>/institutions</code> endpoint for an indication of how long each bank typically takes to complete each job step.</p>\n<p>For the best user experience, have the user connect their banks as early in the onboarding journey as possible. This gives Basiq the best chance of having their transactions ready in time for them finishing the onboarding.</p>\n","urlObject":{"protocol":"https","path":["jobs","{{job-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[{"id":"9c4fa319-8259-4cdc-aeeb-7bfd023894f7","name":"IN-PROGRESS_1_verify-credentials","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/jobs/{{job-id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"type\": \"job\",\n    \"id\": \"2e0701a0\",\n    \"created\": \"2021-03-19T04:30:58Z\",\n    \"updated\": \"2021-03-19T04:30:58Z\",\n    \"steps\": [\n        {\n            \"title\": \"verify-credentials\",\n            \"status\": \"in-progress\",\n            \"result\": null\n        },\n        {\n            \"title\": \"retrieve-accounts\",\n            \"status\": \"pending\",\n            \"result\": null\n        },\n        {\n            \"title\": \"retrieve-transactions\",\n            \"status\": \"pending\",\n            \"result\": null\n        }\n    ],\n    \"links\": {\n        \"self\": \"https://au-api.basiq.io/jobs/2e0701a0\",\n        \"source\": \"https://au-api.basiq.io/users/c6890ac6/connections/749e951f\"\n    }\n}"},{"id":"7af52ae9-4d6f-40e2-ad9b-35ec87db5401","name":"IN-PROGRESS_2_retrieve-accounts","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/jobs/{{job-id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"type\": \"job\",\n    \"id\": \"2e0701a0\",\n    \"created\": \"2021-03-19T04:49:35Z\",\n    \"updated\": \"2021-03-19T04:49:52Z\",\n    \"steps\": [\n        {\n            \"title\": \"verify-credentials\",\n            \"status\": \"success\",\n            \"result\": {\n                \"type\": \"link\",\n                \"url\": \"/users/c6890ac6/connections/749e951f\"\n            }\n        },\n        {\n            \"title\": \"retrieve-accounts\",\n            \"status\": \"in-progress\",\n            \"result\": null\n        },\n        {\n            \"title\": \"retrieve-transactions\",\n            \"status\": \"pending\",\n            \"result\": null\n        }\n    ],\n    \"links\": {\n        \"self\": \"https://au-api.basiq.io/jobs/2e0701a0\",\n        \"source\": \"https://au-api.basiq.io/users/c6890ac6/connections/749e951f\"\n    }\n}"},{"id":"b9c6d730-6655-4b5d-8ad2-f36c8f106afd","name":"IN-PROGRESS_3_retrieve-transactions","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/jobs/{{job-id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"type\": \"job\",\n    \"id\": \"2e0701a0\",\n    \"created\": \"2021-03-19T04:49:35Z\",\n    \"updated\": \"2021-03-19T04:49:55Z\",\n    \"steps\": [\n        {\n            \"title\": \"verify-credentials\",\n            \"status\": \"success\",\n            \"result\": {\n                \"type\": \"link\",\n                \"url\": \"/users/c6890ac6/connections/749e951f\"\n            }\n        },\n        {\n            \"title\": \"retrieve-accounts\",\n            \"status\": \"success\",\n            \"result\": {\n                \"type\": \"link\",\n                \"url\": \"/users/c6890ac6/accounts?filter=institution.id.eq('AU00000')\"\n            }\n        },\n        {\n            \"title\": \"retrieve-transactions\",\n            \"status\": \"in-progress\",\n            \"result\": null\n        }\n    ],\n    \"links\": {\n        \"self\": \"https://au-api.basiq.io/jobs/2e0701a0\",\n        \"source\": \"https://au-api.basiq.io/users/c6890ac6/connections/749e951f\"\n    }\n}"},{"id":"617528e4-36dc-44ae-9ff1-95ab73921d2c","name":"SUCCESS_retrieve-transactions","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/jobs/{{job-id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"type\": \"job\",\n    \"id\": \"2e0701a0\",\n    \"created\": \"2021-03-19T04:29:25Z\",\n    \"updated\": \"2021-03-19T04:30:02Z\",\n    \"steps\": [\n        {\n            \"title\": \"verify-credentials\",\n            \"status\": \"success\",\n            \"result\": {\n                \"type\": \"link\",\n                \"url\": \"/users/c6890ac6/connections/749e951f\"\n            }\n        },\n        {\n            \"title\": \"retrieve-accounts\",\n            \"status\": \"success\",\n            \"result\": {\n                \"type\": \"link\",\n                \"url\": \"/users/c6890ac6/accounts?filter=institution.id.eq('AU00000')\"\n            }\n        },\n        {\n            \"title\": \"retrieve-transactions\",\n            \"status\": \"success\",\n            \"result\": {\n                \"type\": \"link\",\n                \"url\": \"/users/c6890ac6/transactions?filter=institution.id.eq('AU00000')\"\n            }\n        }\n    ],\n    \"links\": {\n        \"self\": \"https://au-api.basiq.io/jobs/2e0701a0\",\n        \"source\": \"https://au-api.basiq.io/users/c6890ac6/connections/749e951f\"\n    }\n}"},{"id":"929cb895-a072-4995-a8c6-a0f428e9330d","name":"FAILED_invalid-credentials","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/jobs/{{job-id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"type\": \"job\",\n    \"id\": \"9b4ec308\",\n    \"created\": \"2021-03-19T04:35:08Z\",\n    \"updated\": \"2021-03-19T04:35:22Z\",\n    \"steps\": [\n        {\n            \"title\": \"verify-credentials\",\n            \"status\": \"failed\",\n            \"result\": {\n                \"code\": \"invalid-credentials\",\n                \"title\": \"Cannot login to target institution: invalid username or password.\",\n                \"detail\": \"Cannot login to target institution: invalid username or password. Please check credentials and try again.\"\n            }\n        },\n        {\n            \"title\": \"retrieve-accounts\",\n            \"status\": \"failed\",\n            \"result\": {\n                \"code\": \"invalid-credentials\",\n                \"title\": \"Cannot login to target institution: invalid username or password.\",\n                \"detail\": \"Cannot login to target institution: invalid username or password. Please check credentials and try again.\"\n            }\n        },\n        {\n            \"title\": \"retrieve-transactions\",\n            \"status\": \"failed\",\n            \"result\": {\n                \"code\": \"invalid-credentials\",\n                \"title\": \"Cannot login to target institution: invalid username or password.\",\n                \"detail\": \"Cannot login to target institution: invalid username or password. Please check credentials and try again.\"\n            }\n        }\n    ],\n    \"links\": {\n        \"self\": \"https://au-api.basiq.io/jobs/9b4ec308\",\n        \"source\": \"https://au-api.basiq.io/users/c6890ac6/connections/6604088e\"\n    }\n}"},{"id":"ea99cd14-029a-4b6e-a3a1-a181f9a5b21e","name":"FAILED_requires-user-action","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/jobs/{{job-id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"type\": \"job\",\n    \"id\": \"5d87c171\",\n    \"created\": \"2021-03-19T04:08:38Z\",\n    \"updated\": \"2021-03-19T04:08:53Z\",\n    \"steps\": [\n        {\n            \"title\": \"verify-credentials\",\n            \"status\": \"success\",\n            \"result\": {\n                \"type\": \"link\",\n                \"url\": \"/users/c6890ac6/connections/b8be7d0a\"\n            }\n        },\n        {\n            \"title\": \"retrieve-accounts\",\n            \"status\": \"failed\",\n            \"result\": {\n                \"code\": \"account-not-accessible-requires-user-action\",\n                \"title\": \"Account details are not accesible at this moment.\",\n                \"detail\": \"An action is required from end-user before account details can be returned.\"\n            }\n        },\n        {\n            \"title\": \"retrieve-transactions\",\n            \"status\": \"failed\",\n            \"result\": {\n                \"code\": \"account-not-accessible-requires-user-action\",\n                \"title\": \"Account details are not accesible at this moment.\",\n                \"detail\": \"An action is required from end-user before account details can be returned.\"\n            }\n        }\n    ],\n    \"links\": {\n        \"self\": \"https://au-api.basiq.io/jobs/5d87c171\",\n        \"source\": \"https://au-api.basiq.io/users/c6890ac6/connections/b8be7d0a\"\n    }\n}"},{"id":"413a8d83-b892-4a22-a462-73ee9681d372","name":"FAILED_service-unavailable","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/jobs/{{job-id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"type\": \"job\",\n    \"id\": \"4d0e3d2a\",\n    \"created\": \"2021-03-19T04:32:36Z\",\n    \"updated\": \"2021-03-19T04:32:54Z\",\n    \"steps\": [\n        {\n            \"title\": \"verify-credentials\",\n            \"status\": \"success\",\n            \"result\": {\n                \"type\": \"link\",\n                \"url\": \"/users/c6890ac6/connections/25700489\"\n            }\n        },\n        {\n            \"title\": \"retrieve-accounts\",\n            \"status\": \"success\",\n            \"result\": {\n                \"type\": \"link\",\n                \"url\": \"/users/c6890ac6/accounts?filter=institution.id.eq('AU00000')\"\n            }\n        },\n        {\n            \"title\": \"retrieve-transactions\",\n            \"status\": \"failed\",\n            \"result\": {\n                \"code\": \"service-unavailable\",\n                \"title\": \"Service unavailable\",\n                \"detail\": \"Service is currently unavailable. Please try again later.\"\n            }\n        }\n    ],\n    \"links\": {\n        \"self\": \"https://au-api.basiq.io/jobs/4d0e3d2a\",\n        \"source\": \"https://au-api.basiq.io/users/c6890ac6/connections/25700489\"\n    }\n}"}],"_postman_id":"4df76359-d04e-49f4-bdf0-f33169473024"},{"name":"Get User Jobs (last 7 days)","event":[{"listen":"test","script":{"id":"71fb6b57-2a3d-438d-aff0-708cb894dc68","exec":["var data = pm.response.json();","","pm.test(\"User jobs in last 7 days successfully acquired (\" + data.data.length + \")\", function () {","    pm.response.to.have.status(200);","    pm.expect(data.data.length).to.be.above(0);","});",""],"type":"text/javascript"}}],"id":"155c7f0e-d341-4e07-8087-2e88b46a0a71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}/jobs","description":"<p><a href=\"https://api.basiq.io/reference#retrieve-jobs\">https://api.basiq.io/reference#retrieve-jobs</a></p>\n<p>Returns a list of all jobs executed for this user across all connections, for the last 7 days.</p>\n<p>This is an indispensable query for managing user experience, ongoing connections and troubleshooting.</p>\n<hr />\n<h1 id=\"best-practice\">Best practice</h1>\n<p>Check the user's jobs regularly, e.g., once a day and every time they login, and handle any unresolved errors.</p>\n<p>For example, the user may have initially connected their banks without issues, but Basiq has since had trouble refreshing their data.  The user may have changed their login credentials, or the bank may be presenting a popup requiring the user to acknowledge new T&amp;Cs, etc.</p>\n<p>See the <strong>Check Job Status</strong> request above for tips on troubleshooting and resolving errors.</p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","jobs"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"155c7f0e-d341-4e07-8087-2e88b46a0a71"}],"id":"a8a9b843-7f67-4e87-abaa-a2a06612df8a","description":"<p>The point-in-time retrieval of accounts and transactions from the user's bank is executed through the job resource.</p>\n<p>The job uses the credentials encrypted in the connection and uses them to login to the bank and read transactions and accounts.</p>\n<p>If Basiq is unable to retrieve all data from the bank, the job will fail with an actionable error code on the relevant job step.</p>\n","_postman_id":"a8a9b843-7f67-4e87-abaa-a2a06612df8a"},{"name":"Accounts","item":[{"name":"Get Accounts","event":[{"listen":"test","script":{"id":"4ebd0349-5006-4e74-822e-ce7bcbe5afe3","exec":["postman.setEnvironmentVariable('account-id', null);","","var data = pm.response.json();","","pm.test(\"Fetched \" + data.data.length + \" accounts\", function () {","    pm.response.to.have.status(200);","    pm.expect(data.data.length).to.be.above(0);","});","","postman.setEnvironmentVariable('account-id', data.data[0].id);","","postman.setNextRequest('Get Account Details');",""],"type":"text/javascript"}}],"id":"63efe241-0054-4d86-adf5-28f9a3bf13d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}/accounts","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#accounts\">https://api.basiq.io/reference/accounts</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","accounts"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"63efe241-0054-4d86-adf5-28f9a3bf13d7"},{"name":"Get Account Details","event":[{"listen":"test","script":{"id":"b95c79b1-0d13-44a7-bc8c-443e1c796348","exec":["var data = pm.response.json();","","pm.test(\"Returned account: \" + data.class.product + \" with balance $\" + data.balance, function () {","    pm.response.to.have.status(200);","    pm.expect(data.id).to.equal(postman.getEnvironmentVariable('account-id'));","});","","postman.setNextRequest('Check Job Status');",""],"type":"text/javascript"}}],"id":"4f325ecc-e70b-4470-ab4a-f8d85d7e0458","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}/accounts/{{account-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#retrieve-an-account\">https://api.basiq.io/reference#retrieve-an-account</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","accounts","{{account-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"4f325ecc-e70b-4470-ab4a-f8d85d7e0458"}],"id":"80484dd1-bee6-4a4d-b9de-bef00fd54c8e","description":"<p>As soon as the <code>retrieve-accounts</code> step has completed successfully, you can get the user’s accounts right away without having to wait for the transactions step.</p>\n","_postman_id":"80484dd1-bee6-4a4d-b9de-bef00fd54c8e"},{"name":"Transactions","item":[{"name":"Get Transactions","event":[{"listen":"test","script":{"id":"f796c3d6-7c6f-41d0-9862-5cb41e3f7f3a","exec":["postman.setEnvironmentVariable('transaction-id', null);","","var data = pm.response.json();","","pm.test(\"Fetched \" + data.size + \" transactions\", function () {","    pm.response.to.have.status(200);","    pm.expect(data.data.length).to.be.above(0);","});","","postman.setEnvironmentVariable('transaction-id', data.data[0].id);","","postman.setNextRequest('Get Transaction Details');",""],"type":"text/javascript"}}],"id":"82a5e5f0-f5a1-45f7-b4ec-1b1383955d4a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}/transactions","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#transactions\">https://api.basiq.io/reference/transactions</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","transactions"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"82a5e5f0-f5a1-45f7-b4ec-1b1383955d4a"},{"name":"Get Transaction Details","event":[{"listen":"test","script":{"id":"1f1a1f97-3c39-4bb2-bb4a-14b2bc879abf","exec":["var data = pm.response.json();","","pm.test(\"Returned transaction: '\" + data.description + \"' / amount: $\" + data.amount + \" / made on \" + data.postDate, function () {","    pm.response.to.have.status(200);","    pm.expect(data.id).to.equal(postman.getEnvironmentVariable('transaction-id'));","});","","postman.setNextRequest('Create Affordability');",""],"type":"text/javascript"}}],"id":"fc630ead-7120-41f9-ba90-1692589c654c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}/transactions/{{transaction-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#retrieve-a-transaction\">https://api.basiq.io/reference#retrieve-a-transaction</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","transactions","{{transaction-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"fc630ead-7120-41f9-ba90-1692589c654c"}],"id":"4e1beaa7-6998-4d17-904b-e82301815631","description":"<p>Once the <code>retrieve-transactions</code> step of the job has completed successfully, you can fetch the user’s transactions.</p>\n","_postman_id":"4e1beaa7-6998-4d17-904b-e82301815631"},{"name":"Affordability","item":[{"name":"Create Affordability","event":[{"listen":"test","script":{"id":"3214f69e-d8e6-4521-9c81-6f6264641298","exec":["postman.setEnvironmentVariable('affordability-id', null);","postman.setEnvironmentVariable('income-id', null);","postman.setEnvironmentVariable('expenses-id', null);","","var data = pm.response.json();","","postman.setEnvironmentVariable('affordability-id', data.id);","postman.setEnvironmentVariable('income-id', data.links.income.substring(data.links.income.lastIndexOf('/')+1));","postman.setEnvironmentVariable('expenses-id', data.links.expenses.substring(data.links.expenses.lastIndexOf('/')+1));","","pm.test(\"Calculated assets: $\" + data.summary.assets + \" / liabilities: $\" + data.summary.liabilities + \" / net position: $\" + data.summary.netPosition + \" / credit limit: $\" + data.summary.creditLimit + \" / expenses: $\" + data.summary.expenses + \" / savings: $\" + data.summary.savings + \" / regular income: $\" + data.summary.regularIncome.previous3Months.avgMonthly, function () {","    pm.response.to.have.status(200);","    pm.response.to.have.jsonBody('summary'); ","});","","postman.setNextRequest('Get Affordability Transactions');",""],"type":"text/javascript"}}],"id":"692873c3-05d9-4608-8519-c49baf5cc96f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json","description":"<p>or application/pdf for example visualisation</p>\n"}],"body":{"mode":"raw","raw":""},"url":"https://au-api.basiq.io/users/{{user-id}}/affordability","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#affordability\">https://api.basiq.io/reference/affordability</a></p>\n<p>Transactions are a required input for an Affordability analysis. You should check the user's jobs to confirm the <code>retrieve-transactions</code> step has completed successfully before you create an Affordability resource.</p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","affordability"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"692873c3-05d9-4608-8519-c49baf5cc96f"},{"name":"Get Affordability","event":[{"listen":"test","script":{"id":"72ba7c02-d8df-4613-ade7-7d1ea4f89a0e","exec":["var data = pm.response.json();","","pm.test(\"Summary successfuly acquired (assets: \" + data.summary.assets + \" / liabilities: \" + data.summary.liabilities + \" / net position: \" + data.summary.netPosition + \" / credit limit: \" + data.summary.creditLimit + \" / expenses: \" + data.summary.expenses + \" / savings: \" + data.summary.savings + \" / regular income: \" + data.summary.regularIncome.previous3Months.avgMonthly + \")\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"id":"e267e5bb-0559-4f02-b5bf-9a1c19a4321f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json","description":"<p>or application/pdf for example visualisation</p>\n"}],"url":"https://au-api.basiq.io/users/{{user-id}}/affordability/{{affordability-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#retrieve-an-affordability-summary\">https://api.basiq.io/reference/retrieve-an-affordability-summary</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","affordability","{{affordability-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"e267e5bb-0559-4f02-b5bf-9a1c19a4321f"},{"name":"Get Affordability Transactions","event":[{"listen":"test","script":{"id":"d2215a03-9d4a-4f87-83fc-bda52d0acec1","exec":["var data = pm.response.json();","","pm.test(\"Transaction report acquired, e.g., \" + data.data[0].class + \" '\" + data.data[0].description + \"' ($\" + data.data[0].amount + \") classed '\"  + data.data[0].subClass.title + \"'\", function () {","    pm.response.to.have.status(200); ","});","","postman.setNextRequest('Get Income');",""],"type":"text/javascript"}}],"id":"b129932c-ff95-4dc3-a85c-5996e56df069","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json","description":"<p>or text/csv</p>\n","type":"text"}],"url":"https://au-api.basiq.io/users/{{user-id}}/affordability/{{affordability-id}}/transactions","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#list-all-affordability-transactions\">https://api.basiq.io/reference/list-all-affordability-transactions</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","affordability","{{affordability-id}}","transactions"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"b129932c-ff95-4dc3-a85c-5996e56df069"},{"name":"Create Income","event":[{"listen":"test","script":{"id":"70024143-07d7-453b-b89f-a5d207e482cc","exec":["postman.setEnvironmentVariable('income-id', null);","","var data = pm.response.json();","","postman.setEnvironmentVariable('income-id', data.id);","","pm.test(\"Detected regular income: $\" + data.summary.regularIncomeYTD + \" year to date\", function () {","    pm.response.to.have.status(200);","    pm.response.to.have.jsonBody('summary'); ","});",""],"type":"text/javascript"}}],"id":"a7553e30-2129-4fef-bfba-ab40a1e3a0a5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://au-api.basiq.io/users/{{user-id}}/income","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#income\">https://api.basiq.io/reference/income</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","income"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"a7553e30-2129-4fef-bfba-ab40a1e3a0a5"},{"name":"Get Income","event":[{"listen":"test","script":{"id":"5bb28de8-6441-4120-928e-3dd79f263c15","exec":["var data = pm.response.json();","","pm.test(\"Detected regular income: $\" + data.summary.regularIncomeYTD + \" year to date\", function () {","    pm.response.to.have.status(200);","    pm.response.to.have.jsonBody('summary'); ","});","","postman.setNextRequest('Get Expenses');",""],"type":"text/javascript"}}],"id":"8bda3d63-18a9-469a-bc7b-c2a9a4403827","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/users/{{user-id}}/income/{{income-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#retrieve-an-income-summary\">https://api.basiq.io/reference/retrieve-an-income-summary</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","income","{{income-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"8bda3d63-18a9-469a-bc7b-c2a9a4403827"},{"name":"Create Expenses","event":[{"listen":"test","script":{"id":"f7164b10-a30d-48a6-94a0-b330a92d9a95","exec":["postman.setEnvironmentVariable('expenses-id', null);","","var data = pm.response.json();","","postman.setEnvironmentVariable('expenses-id', data.id);","","pm.test(\"Identified average monthly spend on '\" + data.payments[0].division + \"' expenses: $\" + data.payments[0].avgMonthly, function () {","    pm.response.to.have.status(200);","    pm.response.to.have.jsonBody('type'); ","});",""],"type":"text/javascript"}}],"id":"1e475975-86bf-47ce-81b5-a52c6c1efd8e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json","description":"<p>or text/csv</p>\n"}],"body":{"mode":"raw","raw":""},"url":"https://au-api.basiq.io/users/{{user-id}}/expenses","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#expenses\">https://api.basiq.io/reference/expenses</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","expenses"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"1e475975-86bf-47ce-81b5-a52c6c1efd8e"},{"name":"Get Expenses","event":[{"listen":"test","script":{"id":"de491962-99ad-42ca-83fd-21620a2b2334","exec":["var data = pm.response.json();","","pm.test(\"Identified average monthly spend on '\" + data.payments[0].division + \"' expenses: $\" + data.payments[0].avgMonthly, function () {","    pm.response.to.have.status(200);","    pm.response.to.have.jsonBody('type'); ","});","","postman.setNextRequest('Delete Connection');",""],"type":"text/javascript"}}],"id":"ae48cc29-63a5-4943-8573-b55a15e554f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json","description":"<p>or text/csv</p>\n"}],"url":"https://au-api.basiq.io/users/{{user-id}}/expenses/{{expenses-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#retrieve-an-expense-summary\">https://api.basiq.io/reference/retrieve-an-expense-summary</a></p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","expenses","{{expenses-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"ae48cc29-63a5-4943-8573-b55a15e554f1"}],"id":"c6868176-6069-43b3-a308-4290b61a7f0b","description":"<p>Once you have aggregated your user's financial data using the Connect API, you can use Basiq Affordability to get a complete picture of their financial position across all declared accounts: their assets, liabilities, income, expenses and identity.</p>\n","_postman_id":"c6868176-6069-43b3-a308-4290b61a7f0b"},{"name":"Events","item":[{"name":"Get Events","event":[{"listen":"test","script":{"id":"d78bdd3b-4c08-4ba3-a3dc-7514ff8b4fdd","exec":["var data = pm.response.json();","","pm.test(function () {","    pm.response.to.have.status(200);","});","","postman.setNextRequest(null);",""],"type":"text/javascript"}}],"id":"48cd5830-b5ed-4ef3-a0cc-a137f86a547a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/events","description":"<p>This endpoint is currently still being developed and will be available shortly. Check the website to stay up to date</p>\n","urlObject":{"protocol":"https","path":["events"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"48cd5830-b5ed-4ef3-a0cc-a137f86a547a"},{"name":"Retrieve an Event","event":[{"listen":"test","script":{"id":"c5cf1d17-731f-4c85-8f0c-337dd660b842","exec":["var data = pm.response.json();","","pm.test(function () {","    pm.response.to.have.status(200);","});","","postman.setNextRequest(null);",""],"type":"text/javascript"}}],"id":"0ced9bee-612c-4a7b-bda0-54760dc6b7d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"url":"https://au-api.basiq.io/event/{{event-id}}","urlObject":{"protocol":"https","path":["event","{{event-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"0ced9bee-612c-4a7b-bda0-54760dc6b7d2"}],"id":"f2c641dd-6738-452b-ba85-725124ecf9ba","description":"<p>This endpoint is currently still being developed and will be available shortly. Check the website to stay up to date.</p>\n","_postman_id":"f2c641dd-6738-452b-ba85-725124ecf9ba"},{"name":"Other","item":[{"name":"Delay 10 seconds","event":[{"listen":"test","script":{"id":"ce9e7c9d-c6f8-44e6-a6bf-fd7e154e2d21","type":"text/javascript","exec":["var max = parseInt(postman.getEnvironmentVariable('poll-count'));","var cnt = parseInt(postman.getEnvironmentVariable('poll-idx')) || 1;","","if(cnt < max) {","    postman.setEnvironmentVariable(\"poll-idx\", cnt + 1);","    postman.setNextRequest('Delay');","} else {","    postman.setNextRequest('Check Job Status');","}"]}}],"id":"25498721-206d-4070-9987-2ceee8c7bf33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://postman-echo.com/delay/10","description":"<p>Using this endpoint one can configure how long it takes for the server to come back with a response. Appending a number to the URL defines the time (in seconds) the server will wait before responding.</p>\n<p>Note that a maximum delay of 10 seconds is accepted by the server.</p>\n","urlObject":{"protocol":"https","path":["delay","10"],"host":["postman-echo","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"25498721-206d-4070-9987-2ceee8c7bf33"}],"id":"3df5043e-0d6b-4fa2-a908-208ed1bea20e","description":"<p>Not required to use the Basiq API - but delays are needed to run the collection to demonstrate polling the job to monitor progress.</p>\n","_postman_id":"3df5043e-0d6b-4fa2-a908-208ed1bea20e"},{"name":"Clean Up","item":[{"name":"Delete Connection","event":[{"listen":"prerequest","script":{"id":"0e975e7a-6e71-44ac-8700-d0d03eccfd55","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"4d07d63e-386f-4053-aa66-318532d22bfc","exec":["pm.test(\"Deleted connection\", function () {","    pm.response.to.have.status(204);","});","","postman.setEnvironmentVariable('connection-id', null);","","postman.setNextRequest('Delete User');",""],"type":"text/javascript"}}],"id":"987c5b7d-5769-4bf9-bcc5-b652021b2daf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://au-api.basiq.io/users/{{user-id}}/connections/{{connection-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#delete-a-connection\">https://api.basiq.io/reference/delete-a-connection</a></p>\n<p>Deleting the connection deletes the credentials and we will no longer refresh the data - <em>but previously fetched accounts and transactions remain available from those endpoints</em>.</p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}","connections","{{connection-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"987c5b7d-5769-4bf9-bcc5-b652021b2daf"},{"name":"Delete User","event":[{"listen":"prerequest","script":{"id":"f1302cea-b34f-4cd3-995c-f727c114ce20","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"cee3226f-7bc9-49e8-9751-6cbc0d1575c3","exec":["pm.test(\"Deleted user\", function () {","    pm.response.to.have.status(204);","});","","postman.setEnvironmentVariable('user-id', null);",""],"type":"text/javascript"}}],"id":"46426b1c-0d2f-4180-afcf-4b6931e22d29","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access-token}}"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://au-api.basiq.io/users/{{user-id}}","description":"<p><strong>API reference</strong>: <a href=\"https://api.basiq.io/reference#delete-a-user\">https://api.basiq.io/reference/delete-a-user</a></p>\n<p>Deleting the user deletes all data relating to the user: all connections, accounts and transactions are removed.</p>\n","urlObject":{"protocol":"https","path":["users","{{user-id}}"],"host":["au-api","basiq","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"46426b1c-0d2f-4180-afcf-4b6931e22d29"}],"id":"cdf45923-19dd-48e5-a3e0-53f85b0d4859","_postman_id":"cdf45923-19dd-48e5-a3e0-53f85b0d4859","description":""}],"event":[{"listen":"prerequest","script":{"id":"7d7f0e0e-26b7-494d-837e-1efd3bc318ef","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"43afa691-6c84-456b-9935-3131887821ba","type":"text/javascript","exec":[""]}}],"variable":[{"key":"user-consent-id","value":"-"}]}