# Aggregation Status Codes
source: https://developer.mastercard.com/open-finance-us/documentation/products/manage/aggregation-status-codes/index.md

As accounts are aggregated every night or upon refresh, an aggregation status code is recorded which will be returned in the `aggregationStatusCode` field in the responses to Account Aggregation Services endpoints.

## Overview {#overview}

An `aggregationStatusCode` represents the status or outcome of an aggregation process. An `aggregationStatusCode`of 0 denotes that a successful aggregation of the account(s) has occurred. Other codes may signify an error state.

Some errors can be resolved by using [Data Connect Fix](https://developer.mastercard.com/open-finance-us/documentation/experience-design-guide/connect-enhancements-and-features/recall-experience-connect-fix/index.md) so the end user can re-establish the connection with the FI.

* [Aggregation Status Codes](https://developer.mastercard.com/open-finance-us/documentation/products/manage/aggregation-status-codes/index.md#aggregation-status-codes)
* [Using Data Connect Fix](https://developer.mastercard.com/open-finance-us/documentation/products/manage/aggregation-status-codes/index.md#using-data-connect-fix)

### Aggregation Status Codes {#aggregation-status-codes}

The following is a list of the `aggregationStatusCode` values that would prevent nightly batch aggregation:

|                                    Code                                    |                       Description                        |                                                                                                                  Required Action                                                                                                                   |
|----------------------------------------------------------------------------|----------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 103                                                                        | Bad login credentials                                    | Use Data Connect Fix to have the customer enter new login credentials.                                                                                                                                                                             |
| 108                                                                        | User prompt encountered                                  | Have the customer login to the account and resolve the pop-up banner, typically by accepting new Terms and Conditions or acknowledging other account alerts.                                                                                       |
| 109                                                                        | Credentials expired - new password required              | Have the customer login to the account and set a new password, then use Data Connect Fix to have the customer enter the new login credentials.                                                                                                     |
| 169                                                                        | Duplicate account                                        | Have the customer keep one account and delete the duplicate(s) in Data Connect.                                                                                                                                                                    |
| 185                                                                        | Security challenge encountered                           | Use Data Connect Fix to have the customer answer the Multi-Factor Authentication (MFA) questions or enter the One Time Passcode (OTP) sent by the financial institution.                                                                           |
| 187                                                                        | Incorrect security challenge answers                     | Use Data Connect Fix to have the customer answer the Multi-Factor Authentication (MFA) questions.                                                                                                                                                  |
| 945                                                                        | OAuth migration (account migrated but not consented)     | Prompt the end user to re-authenticate via Data Connect Fix. If Data Connect fix isn't integrated, have the customer delete the account and add it again under the same bank with the OAuth connection indicated in the 'Institution Search' list. |
| 946                                                                        | Account not found (account may have been closed)         | Prompt the end user to authenticate the right account via Data Connect Fix. If Data Connect fix isn't integrated, have the customer delete the account and then find and add an active account in Data Connect.                                    |
| 947                                                                        | Token expired or refresh required                        | A new token is needed, use Data Connect Fix and have the customer follow the prompts to enter the new token.                                                                                                                                       |
| 948                                                                        | OAuth migration (account migrated but not authenticated) | Prompt the end user to re-authenticate via Data Connect Fix. If Data Connect fix isn't integrated, have the customer delete the account and add it again under the same bank with the OAuth connection indicated in the 'Institution Search' list. |
| 949                                                                        | Account unrecoverable                                    | Have the user delete the account and re-enter Data Connect to re-add the account.                                                                                                                                                                  |
| 147, 148, 173, 176 , 181, 190, 324, 900, 901, 903, 904, 906, 907, 940, 950 | Additional support required                              | Submit a [support ticket](https://developer.mastercard.com/open-finance-us/documentation/support/index.md#create-a-support-case-in-scm).                                                                                                           |

We recommend that you listen for and catch non-zero aggregation status codes, and invoke Data Connect Fix where appropriate. For errors which are not fixable in this way, see the [Error Handling](https://developer.mastercard.com/open-finance-us/documentation/errors/error-list/index.md) section for further suggestions. In some cases you may need to submit a support request.

### Using Data Connect Fix {#using-data-connect-fix}

For fixable errors, you will need the institutionLoginId relating to the user account in question (you can get these values using the Account Aggregation endpoints such as Get Customer Account by ID).

The following `aggregationStatusCodes` can normally be resolved using Data Connect Fix:

* [103](https://developer.mastercard.com/open-finance-us/documentation/errors/accounterrors/invalidcredentials/index.md#103)
* [108](https://developer.mastercard.com/open-finance-us/documentation/errors/accounterrors/addinfo/106-108-109-961-959/index.md#108) / [109](https://developer.mastercard.com/open-finance-us/documentation/errors/accounterrors/addinfo/106-108-109-961-959/index.md#109)
* [185](https://developer.mastercard.com/open-finance-us/documentation/errors/accounterrors/incompleteauth/938-940-971-185-187/index.md#185) / [187](https://developer.mastercard.com/open-finance-us/documentation/errors/accounterrors/incompleteauth/938-940-971-185-187/index.md#187)
* [945](https://developer.mastercard.com/open-finance-us/documentation/errors/institutionerrors/connection-migration-inprogress/index.md#945) / [948](https://developer.mastercard.com/open-finance-us/documentation/errors/institutionerrors/connection-migration-inprogress/index.md#948)
* [946](https://developer.mastercard.com/open-finance-us/documentation/errors/accounterrors/account-not-found/909-913-914-946-952/index.md#946)
* [947](https://developer.mastercard.com/open-finance-us/documentation/errors/accounterrors/invalidtoken/947-2024/index.md#947)

<br />

Use the following flow to resolve these issues:

1. Call [Get Customer Account by ID](https://developer.mastercard.com/open-finance-us/documentation/products/manage/account-aggregation/index.md#account-simple-details-asd) to obtain the institutionLoginId from the response body.

2. Call the [Generate Data Connect Fix URL](https://developer.mastercard.com/open-finance-us/documentation/connect/generate-2-connect-url-apis/index.md#data-connect-fix) endpoint, passing the customerId and institutionLoginId in the request body.

3. Wait for the "done" [Data Connect webhook event](https://developer.mastercard.com/open-finance-us/documentation/webhooks/webhooks-connect/webhooks-events-connect/index.md#done) and proceed with API calls. A refresh will be done automatically.

#### Nuances With Data Connect Fix {#nuances-with-data-connect-fix}

* Error code gathering via TxPush --- The [TxPush](https://developer.mastercard.com/open-finance-us/documentation/products/manage/tx-push/index.md) service will send events when an account has been modified, which means if an aggregation error happens, an event will be sent with that error and correlating account details.

* Data Connect Fix inside of Data Connect Full --- Users can sometimes fix broken accounts inside of the Data Connect Full widget. Users will see a prompt on the review account screen to reconnect their account.

* Multiple [185](https://developer.mastercard.com/open-finance-us/documentation/errors/accounterrors/incompleteauth/938-940-971-185-187/index.md#185) failures in a row --- Some accounts may have "One Time Passcode (OTP)" security on them, so that any endpoint which triggers an interaction with the bank may result in a 203 HTTP response or a 185 error code (indicating an MFA/OTP challenge). If an account continues to generate a 185 error status during batch aggregation, even after being fixed, this is also an indication of an MFA/OTP challenge / flow on the account.

#### How to Test Data Connect Fix {#how-to-test-data-connect-fix}

You can test the Data Connect Fix flow using certain [Finbank test profiles](https://developer.mastercard.com/open-finance-us/documentation/integration-and-testing/test-the-apis/index.md) as follows:

1. Generate a Data Connect Full URL.
2. Using the test bank Finbank, use one of the [sign-in authentication test profiles](https://developer.mastercard.com/open-finance-us/documentation/integration-and-testing/test-the-apis/index.md#sign-in-authentication-profiles) that begin with 'tfa' (`tfa_multi` for example) to recreate the error.
3. Permission an account.
4. Run a refresh. Accounts will then have a 185 status.
5. Gather the necessary information and generate a Data Connect Fix URL.
6. Follow Data Connect prompts and finish fixing accounts. A refresh will run on the accounts after Data Connect Fix successfully completes.
7. Gather customer accounts to check that accounts are in a 0 status.
