|
| 1 | +# MX Platform Node.js (v20111101 API) |
| 2 | + |
| 3 | +**SDK version:** 2.1.0 |
| 4 | +**API version:** v20111101 |
| 5 | + |
| 6 | +You are using the **v20111101** API version of `mx-platform-node`. For other API versions, see [Available API Versions](#available-api-versions) below. |
| 7 | + |
| 8 | +### Checking Your Installed Version |
| 9 | + |
| 10 | +To verify which API version you have installed: |
| 11 | + |
| 12 | +**In package.json:** |
| 13 | +```json |
| 14 | +{ |
| 15 | + "dependencies": { |
| 16 | + "mx-platform-node": "^2.1.0" |
| 17 | + } |
| 18 | +} |
| 19 | +``` |
| 20 | + |
| 21 | +**Programmatically in your code:** |
| 22 | +```javascript |
| 23 | +const pkg = require('mx-platform-node/package.json'); |
| 24 | +console.log(pkg.apiVersion); // v20111101 |
| 25 | +``` |
| 26 | + |
| 27 | +**Via npm:** |
| 28 | +```shell |
| 29 | +npm view mx-platform-node@2.1.0 |
| 30 | +``` |
| 31 | + |
| 32 | +## Available API Versions |
| 33 | + |
| 34 | +- **mx-platform-node@2.x.x** - [v20111101 API](https://docs.mx.com/api-reference/platform-api/v20111101/reference/mx-platform-api/) |
| 35 | +- **mx-platform-node@3.x.x** - [v20250224 API](https://docs.mx.com/api-reference/platform-api/reference/mx-platform-api/) |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +## Overview |
| 40 | + |
| 41 | +The [MX Platform API](https://www.mx.com/products/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. |
| 42 | + |
| 43 | +## Documentation |
| 44 | + |
| 45 | +Examples for the API endpoints can be found [here.](https://docs.mx.com/api) |
| 46 | + |
| 47 | +## Requirements |
| 48 | + |
| 49 | +The generated Node module can be used in the following environments: |
| 50 | + |
| 51 | +Environment |
| 52 | +* Node.js |
| 53 | +* Webpack |
| 54 | +* Browserify |
| 55 | + |
| 56 | +Language level |
| 57 | +* ES5 - you must have a Promises/A+ library installed |
| 58 | +* ES6 |
| 59 | + |
| 60 | +Module system |
| 61 | +* CommonJS |
| 62 | +* ES6 module system |
| 63 | + |
| 64 | +## Installation |
| 65 | + |
| 66 | +To build and compile the TypeScript sources to JavaScript use: |
| 67 | + |
| 68 | +```shell |
| 69 | +npm install mx-platform-node |
| 70 | +``` |
| 71 | + |
| 72 | +## Getting Started |
| 73 | + |
| 74 | +In order to make requests, you will need to [sign up](https://dashboard.mx.com/sign_up) for the MX Platform API and get a `Client ID` and `API Key`. |
| 75 | + |
| 76 | +Please follow the [installation](#installation) procedure and then run the following code to create your first User: |
| 77 | + |
| 78 | +```javascript |
| 79 | +import { Configuration, UsersApi } from 'mx-platform-node'; |
| 80 | + |
| 81 | +const configuration = new Configuration({ |
| 82 | + // Configure with your Client ID/API Key from https://dashboard.mx.com |
| 83 | + username: 'Your Client ID', |
| 84 | + password: 'Your API Key', |
| 85 | + |
| 86 | + // Configure environment. https://int-api.mx.com for development, https://api.mx.com for production |
| 87 | + basePath: 'https://int-api.mx.com', |
| 88 | + |
| 89 | + baseOptions: { |
| 90 | + headers: { |
| 91 | + Accept: 'application/vnd.mx.api.v1+json' |
| 92 | + } |
| 93 | + } |
| 94 | +}); |
| 95 | + |
| 96 | +const usersApi = new UsersApi(configuration); |
| 97 | + |
| 98 | +const requestBody = { |
| 99 | + user: { |
| 100 | + metadata: 'Creating a user!' |
| 101 | + } |
| 102 | +}; |
| 103 | + |
| 104 | +const response = await usersApi.createUser(requestBody); |
| 105 | + |
| 106 | +console.log(response.data); |
| 107 | +``` |
| 108 | + |
| 109 | +## Upgrading from v1.x? |
| 110 | + |
| 111 | +> **⚠️ Breaking Changes in v2.0.0:** If you're upgrading from v1.10.0 or earlier, the API structure has changed significantly. See the [Migration Guide](MIGRATION.md) for detailed instructions on updating your code. |
| 112 | +
|
| 113 | +## Contributing |
| 114 | + |
| 115 | +Please [open an issue](https://github.com/mxenabled/mx-platform-node/issues) or [submit a pull request.](https://github.com/mxenabled/mx-platform-node/pulls) |
0 commit comments