apimatic-mx-apis-sdk
v0.0.1
Published
This is a test SDK
Readme
Getting Started with MX Platform API
Introduction
The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
What's Changed?
Several endpoints, headers, and fields changed in v20250224. For more on breaking changes, refer to our versioning and migration guides.
Version Header
Versions are set in the Accept-Version header of API requests. Version numbers correspond with the date associated with that version. The example below uses the version v20250224.
-H 'Accept: application/json'
-H 'Accept-Version: v20250224'Install the Package
Run the following command from your project directory to install the package from npm:
npm install [email protected]For additional package details, see the Npm page for the [email protected] npm.
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
| --- | --- | --- |
| environment | Environment | The API environment. Default: Environment.Production |
| timeout | number | Timeout for API calls.Default: 30000 |
| httpClientOptions | Partial<HttpClientOptions> | Stable configurable http client options. |
| unstableHttpClientOptions | any | Unstable configurable http client options. |
| logging | PartialLoggingOptions | Logging Configuration to enable logging |
| basicAuthCredentials | BasicAuthCredentials | The credential object for basicAuth |
| bearerAuthCredentials | BearerAuthCredentials | The credential object for bearerAuth |
The API client can be initialized as follows:
Code-Based Client Initialization
import { Client, Environment, LogLevel } from 'apimatic-mx-apis-sdk';
const client = new Client({
basicAuthCredentials: {
username: 'Username',
password: 'Password'
},
bearerAuthCredentials: {
accessToken: 'AccessToken'
},
timeout: 30000,
environment: Environment.Production,
logging: {
logLevel: LogLevel.Info,
logRequest: {
logBody: true
},
logResponse: {
logHeaders: true
}
},
});Configuration-Based Client Initialization
import * as path from 'path';
import * as fs from 'fs';
import { Client } from 'apimatic-mx-apis-sdk';
// Provide absolute path for the configuration file
const absolutePath = path.resolve('./config.json');
// Read the configuration file content
const fileContent = fs.readFileSync(absolutePath, 'utf-8');
// Initialize client from JSON configuration content
const client = Client.fromJsonConfig(fileContent);See the Configuration-Based Client Initialization section for details.
Environment-Based Client Initialization
import * as dotenv from 'dotenv';
import * as path from 'path';
import * as fs from 'fs';
import { Client } from 'apimatic-mx-apis-sdk';
// Optional - Provide absolute path for the .env file
const absolutePath = path.resolve('./.env');
if (fs.existsSync(absolutePath)) {
// Load environment variables from .env file
dotenv.config({ path: absolutePath, override: true });
}
// Initialize client using environment variables
const client = Client.fromEnvironment(process.env);See the Environment-Based Client Initialization section for details.
Environments
The SDK can be configured to use a different environment for making API calls. Available environments are:
Fields
| Name | Description | | --- | --- | | Production | Default | | Environment2 | - |
Authorization
This API uses the following authentication schemes.
List of APIs
- Achreturn
- Investmentholdings
- Monthlycashflowprofile
- Processortoken
- Spendingplan
- Transactionrules
- Verifiablecredentials
- Manageddata Deprecated
- Accounts
- Budgets
- Categories
- Goals
- Insights
- Institutions
- Members
- Merchants
- Microdeposits
- Notifications
- Rewards
- Statements
- Taggings
- Tags
- Transactions
- Users
- Widgets
- Jobs
SDK Infrastructure
Configuration
- HttpClientOptions
- RetryConfiguration
- ProxySettings
- Configuration-Based Client Initialization
- Environment-Based Client Initialization
- PartialLoggingOptions
- PartialRequestLoggingOptions
- PartialResponseLoggingOptions
- LoggerInterface
