Data sync: Update an Item
After creating an Item, the next step is keeping it up to date.
When you create an Item, you'll have a reference to the user's financial data, which will initially include all the data from the Institution for up to the last 365 days.
To keep this information up-to-date, you can Update your Item.
When you Update an Item, only the data that was missing from the last succesful collection date will be recovered, plus 3 more days prior to that date.
This is much more cost-efficient, as compared to keep creating new Items for the same user account and financial institution, recovering every time all the data from the last 365 days as when creating a new Item.
Update Item using Pluggy Connect widget
To update an existing Item using Pluggy Connect, just provide the Item id via the
itemId configuration field.
This will open the widget in "Update Mode", triggering the necessary steps to start the update process.
Pluggy Connect, as a fully working solution, already covers all the potential specifities and scenarios related to all connectors' different login flows, special cases, and more. This includes scenarios such as:
- If the item doesn't require an MFA parameter, then PluggyConnect will just start the update process and the data collection will proceed.
- If it does require an MFA parameter, then PluggyConnect will be prompt it to the user. After the user resolves it, the update process will start and the data collection will proceed.
- If the Item had an invalid credentials error, then PluggyConnect will ask for the credentials first.
You can test and validate all the mentioned scenarios, and more, using our Test Accounts in our Sandbox (Pluggy Bank) connectors.
Update Item via API directly
If the item doesn't require an MFA parameter, and it didn't have an invalid credentials error, then it's possible to update it directly via API, since there is no further actions needed from the user.
Otherwise, the Item update will result in wait (for user's action) state. This action should be prompted to the user in your Application UI, in the same way as PluggyConnect does, and resolve it accordingly through user actions, and then passing them back to Pluggy API.
Check out our Updating an Item guide, where we provide further details and insights about this process.
Updated 3 months ago