An item represents a connection to a bank account using a set of user credentials.
It contains one or more accounts which contain transactions.
Field | Description |
---|---|
id long | Item's unique identifier. |
status integer | Item's status' code. |
bank bank hash | Mini bank representation of the item's bank. |
accounts array of account hash | Array of mini account representation of the accounts contained in the item. |
resource_type string, constant | |
resource_uri string |
LIST OF ITEM STATUS CODES
Status | Code | Description |
---|---|---|
ok | 0 | Everything is awesome. |
just_added | -2 | The account was recently added. The account refresh is pending. |
just_edited | -3 | The account's credentials were recently changed. The account refresh is pending. |
login_failed | 402 | Wrong credentials. |
needs_human_action | 429 | An action from the user is required within the online banking of the user. Examples: The user needs to accept new ToS, change his credentials, first time connecting to the bank's website, ... |
needs_password_rotation | 430 | The User needs to log onto his bank's website to change his password. |
could_not_refresh | 1003 | Couldn't refresh. Try again. |
not_supported | 1005 | Account not supported. |
disabled_temporarily | 1007 | Refresh temporarily disabled. |
incomplete | 1009 | Account balance has changed but no new transactions were found. This may happen with stock / life insurance accounts. |
needs_manual_refresh | 1010 | Item wasn't refreshed successfully, it required an MFA / OTP that wasn't provided. |
migration | 1099 | Item is migrating to another bank. |
pro_account_locked | 1100 | Pro accounts have been detected on this Item and it needs validation. Otherwise the data will be obfuscated. |
{
"id": 187741,
"status": 1003,
"bank": {
"id": 408,
"resource_uri": "/v2/banks/408",
"resource_type": "bank"
},
"accounts": [
{
"id": 2341488,
"resource_uri": "/v2/accounts/2341488",
"resource_type": "account"
}
],
"resource_uri": "/v2/items/187741",
"resource_type": "item"
}
PROCESS OF REFRESHING AN ITEM ON DEMAND
Note that all items except those needing MFA/2FA will be refreshed automatically twice a day by Bridge.
You may want to refresh an item on demand, in which case you should use the following process:
Step 1. Call the Refresh an item endpoint for the given item.
Step 2. Check periodically (every 5 seconds) the item's status by calling GET /v2/items/:id/status
If status
is info_required
, go to step 3.
If status
is invalid_creds
, the user credentials are incorrect. Edit the credentials and start again at step 1.
If status
is authenticating
, the item is trying to establish a connection. Keep checking the status.
If status
is retrieving_data
, the item is retrieving the data and indicates its progression.
If status
is finished
, the item retrieved all its data.
If status
is finished_error
, something went wrong. Check the item's status by calling GET /v2/items/:id
and check the list of item status code.
Step 3. Call POST /v2/items/:id/mfa
and set the user's One Time Password (OTP). The user has 1 minute to enter the one time password sent by his bank.
If the request is valid, it will return 202 Accepted
and the Location
header will point to get an item's status request. Go back to step 2. until the synchronization finishes.