All URIs are relative to https://au-api.basiq.io
Method | HTTP request | Description |
---|---|---|
getExpenses | GET /users/{userId}/expenses/{snapshotId} | Retrieves the details of an expenses summary. You need only supply the unique expenses identifier. |
postExpenses | POST /users/{userId}/expenses | Use this to create a new expenses report. |
ExpensesResponse getExpenses(userId, snapshotId)
Retrieves the details of an expenses summary. You need only supply the unique expenses identifier.
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.ExpensesApi();
var userId = "userId_example"; // String | The identifier of the user.
var snapshotId = "snapshotId_example"; // String | The identifier of the expenses report to be retrieved.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getExpenses(userId, snapshotId, callback);
Name | Type | Description | Notes |
---|---|---|---|
userId | String | The identifier of the user. | |
snapshotId | String | The identifier of the expenses report to be retrieved. |
- Content-Type: Not defined
- Accept: application/json, text/csv
ExpensesResponse postExpenses(userId, opts)
Use this to create a new expenses report.
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.ExpensesApi();
var userId = "userId_example"; // String | The identifier of the user.
var opts = {
'expensesPostRequest': new BasiqApi.ExpensesPostRequest() // ExpensesPostRequest |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.postExpenses(userId, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
userId | String | The identifier of the user. | |
expensesPostRequest | ExpensesPostRequest | [optional] |
- Content-Type: application/json
- Accept: application/json