Items
A link to a specific institution for a user.
On signup, the user is prompted to link their bank in plaid. Plaid gives us an item_id and access_token, which is used to call plaid for accounts/balances/transaction information.
Storage
Table: prod-txn-plaid
Location: us-east-2
The table can handle multiple plaid items per user, but only one of them should be active at this time. The item can contain multiple plaid accounts; the account that the user has signified is their "main" account is indicated on the record. This is the account that the user wants to receive and payback floats from over ACH.
Keys
-
PK - USERS#<user_id>
-
SK - ITEMS#<item_id>
-
GSI1PK - ITEMS#<item_id>
-
GSI1SK - USERS#<user_id> - This isn’t used but we need something for the SK or the record does not get included in the GSI
Attributes
-
item_id - The plaid assigned item_id
-
item_user_id - Floatme user_id
-
item_access_token - The plaid assigned access_token. Used to call plaid to get auth/accounts/transactions/balances within this item
-
item_institution_id
-
item_institution_name
-
item_error_code - ITEM_LOGIN_REQUIRED, NO_ACCOUNTS, empty if no error
-
item_transactions_last_successful_update
-
item_transactions_last_failed_update
-
item_last_webhook_sent_at
-
item_last_webhook_code_sent
-
item_is_main - If this is the main item for the user
-
item_main_account_id - If this is the users main item, this is the id of the main account
-
item_status - ACTIVE, ERROR, REMOVED
-
item_created_at
-
item_updated_at
-
item_removed_at
-
type - ITEM