# 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 is returned in the `aggregationStatusCode` field in the responses to Account Aggregation Services endpoints. For a description of the aggregation status codes and how to deal with status codes that prevent nightly batch aggregation, see [Aggregation Status Codes](https://developer.mastercard.com/open-finance-us/documentation/errors/account-errors/index.md#aggregation-status-codes) in Account Errors.
Warning: 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 [Full Error List](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 aggregation status codes, you 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.
