LEGACY GUIDEThis guide is for Platform API v2011101. For guidance on the newest version, see Connectivity Integration Guides.
Prerequisites
Before you follow the steps in this guide make sure that you have:- Signed up for the Platform API and received your development API Keys.
- Integrated the Connect Widget into your application or website. The best way to do this is to use one of the widget SDKs mentioned in Integration Guides that MX has created for this purpose.
1. Create a User
A user represents your end user in the MX Platform. Make a request to the Create User endpoint (POST /users).
We recommend that you include a unique id of your choice with the request. You may also include metadata, such as the date the user was created or the end user’s name. Don’t include any sensitive information here, such as credentials.
INFONone of these parameters are required, but the
user object can’t be empty. We recommend that you always set the id parameter when creating a user.user an MX-defined guid (or user_guid when appearing outside the user object). Between your id and the guid, you can map between your system and ours. You’ll need the user guid for nearly every request on the MX API, at least when using basic authorization.
- Request
- Response
2. Request a Connect Widget URL
There are many configuration options for the Connect Widget for performing various tasks. Default configuration values are set with account aggregation in mind, so little configuration is required for simple aggregation. Nevertheless, you should carefully read the documentation on configuration options as they may be important for your particular use case. Make a POST request to the/users/{user_guid}/widget_urls endpoint.
- In the body, set the
widget_typeparameter toconnect_widget. - In the path, set the
user_guidto the value for the user you created in step 1.
- Request
- Response
3. Load the URL and Let the End User Interact
INFOIf you’re following this guide for testing purposes, you must search for the test institution in the widget and enter the credentials mentioned in one of our testing guides.
member as well as the aggregation process and any MFA that may be encountered. It automatically asks end users to search for an institution, give their credentials, or authenticate with OAuth. It also deals with any errors along the way.
You’ll need to listen for a couple important event messages from the Connect Widget:
- member status updated which gives you the member GUID and the current
connection_status. - member connected tells you that the member has been successfully connected and you can move on to the next steps.
CONNECTED status, you can use the member_guid to immediately check the member’s connection status with a dedicated API endpoint.
- Request
- Response
4. List Account Data
The aggregation process was successful and you can now read account information. Make aGET request to the /users/{user_guid}/members/{member_guid}/accounts endpoint. The response will include all the accounts belonging to the member.
- Request
- Response
INFOThere is another endpoint for listing accounts which may be more suitable for your use case:
GET /users/{user_guid}/accounts.You may also consider reading the attributes of a specific account. There are two endpoints for this which return the same information, provided for code convenience:GET /users/{user_guid}/members/{member_guid}/accounts/{account_guid}GET /users/{user_guid}/accounts/{account_guid}5. List Transaction Data
You can now read all the transaction data that has been gathered. Keep in mind that all list endpoints in the Platform API are paginated. To get the full list of transactions, you’ll need to pay attention to thepagination object and make multiple requests specifying the page and the records_per_page in order to see all the available data. You can also limit results to a specific time frame using from_date and to_date.
- Request
- Response
INFOThere are multiple endpoints for listing transactions provided for code convenience. The others are:GET
/users/{user_guid}/accounts/{account_guid}/transactionsGET /users/{user_guid}/transactionsYou may also wish to read the details of a specific account:GET /users/{user_guid}/transactions/{transaction_guid}
