Nightly Refresh Routine Flow

Modified on Thu, 22 Jul, 2021 at 2:09 PM

 


  1. For clients who are connecting for the first time, implement this example flow.
  2. For all registered LoginIds, keep track on your end which one's are active.
  3. If a client becomes inactive, or you want to deactivate the automatic refreshes, use the /SetScheduledRefresh endpoint to deactivate the automatic refresh for its LoginId
    This step is important for avoiding being charged by end-users that are inactive in your use-case, but still active on Flinks.
  4. Once a day, (preferably during late morning) follow the Routine flow to check which accounts were successfully refreshed and to retrieve the refreshed data:


 





For each bank account (LoginId) activated for a nightly refresh, make the following calls:



1. Authorize in cached mode


/Authorize endpoint

Body:


{
  "LoginId":{LoginId},
  "MostRecentCached":true
}


 


If you receive a 200 "HttpStatusCode":

Example:


{
   "Links": [
      {
         "rel": "AccountsDetail",
         "href": "/GetAccountsDetail",
         "example": null
      },
      {
         "rel": "AccountsSummary",
         "href": "/GetAccountsSummary",
         "example": null
      },
      {
         "rel": "Statements",
         "href": "/GetStatements",
         "example": null
      }
   ],
   "HttpStatusCode": 200,
   "Login": {
      "Username": "73847384343434",
      "IsScheduledRefresh": true,
      "LastRefresh": "2018-10-23T05:36:07.6121953",
      "Id": "f427f369-7b0f-45ce-5fe2-08d6386fe6b5"
    },
   "Institution": "CIBC",
   "RequestId": "46d5f682-e9dd-46ba-8cf6-3e5eff34f600"
}



Your account was successfully refreshed and your up to date data is available; 
Follow step 2 for the next API call.


 


If you receive a 401 "HttpStatusCode":



Example:


{
   "Links": [
      {
         "rel": "Authorization",
         "href": "/Authorize",
         "example": null
      }
   ],
   "HttpStatusCode": 401,
   "FlinksCode": "QUESTION_NOT_FOUND",
   "Institution": "TD",
   "RequestId": "8b81698e-7c99-4d5d-8d6f-48187c0c19fc"
}


Flinks wasn't able to connect to the bank during the nightly refresh due lack of saved credentials (Missing MFA Answer / password became invalid).

In this case you need to ask for the end-user to connect once more in Flinks Connect to enter the missing credentials.


If you received any other "HttpStatusCode":


Something else went wrong during the refresh and the reason is explained through the "FlinksCode".


 



2. GetAccountsDetail


From the received RequestId in 1., call GetAccountsDetail to retrieve the latest data:


 


/GetAccountsDetail


Request body example:


{
  "RequestId":{RequestId}
}





We still recommend maintaining the support for the Async flows for good practice purposes, even though it's not a expected flow for this routine.


 


Important: In order for us to avoid throttling issues, for the once a day routine, split the list of Loginids you're going to make the calls to the API in groups of 10 to 30 per minute (This number can be changed in the near future)



Tracing and Logs


 


In order to facilitate troubleshooting and accelerate investigations, it's strongly recommended that you trace all calls made to the API with timestamps, URL called, body of the call (parameters used) with at least the (HttpStatusCode, Flinks Code and Message received from each response)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article