Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Latest commit

 

History

History
115 lines (76 loc) · 3.66 KB

AccountsApi.md

File metadata and controls

115 lines (76 loc) · 3.66 KB

BasiqApi.AccountsApi

All URIs are relative to https://au-api.basiq.io

Method HTTP request Description
getAccount GET /users/{userId}/accounts/{accountId} Use this to retrieve the details of a specific account. This request will return back an account object with the latest data since the last refresh. If you require the latest account details you will need to call the connection refresh resource.
getAccounts GET /users/{userId}/accounts Use this collection to retrieve a list of accounts. Each entry in the array is a separate account object.

getAccount

AccountResponseResource getAccount(userId, accountId)

Use this to retrieve the details of a specific account. This request will return back an account object with the latest data since the last refresh. If you require the latest account details you will need to call the connection refresh resource.

Returns an account if a valid account ID was provided. Returns an error otherwise.

Example

var BasiqApi = require('@basiq/basiq-javascript-sdk');
var defaultClient = BasiqApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: application
var application = defaultClient.authentications['application'];
application.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new BasiqApi.AccountsApi();

var userId = "userId_example"; // String | User identifier

var accountId = "accountId_example"; // String | Account identifier


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getAccount(userId, accountId, callback);

Parameters

Name Type Description Notes
userId String User identifier
accountId String Account identifier

Return type

AccountResponseResource

Authorization

application

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getAccounts

AccountsResponseResource getAccounts(userId)

Use this collection to retrieve a list of accounts. Each entry in the array is a separate account object.

Returns a list with a data property that contains an array of accounts. Each entry in the array is a separate object. If no data is returned, the resulting array will be empty. Otherwise, this call returns an error in the event of1 a failure.

Example

var BasiqApi = require('@basiq/basiq-javascript-sdk');
var defaultClient = BasiqApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: application
var application = defaultClient.authentications['application'];
application.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new BasiqApi.AccountsApi();

var userId = "userId_example"; // String | User identifier


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getAccounts(userId, callback);

Parameters

Name Type Description Notes
userId String User identifier

Return type

AccountsResponseResource

Authorization

application

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json