# Customer Accounts
source: https://developer.mastercard.com/open-finance-au/documentation/access-and-config/accounts/index.md

Customer account records have a lot of different data points that can be used in your application. There are a few important pieces of information to note that can be used to properly identify accounts you want to use in your application, and some data points that will help you best organize account data inside your application.

## Key Account Record Fields {#key-account-record-fields}

|        Field         |                                                                                                            Description                                                                                                             |
|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id`                 | Store this unique account identifier for future account data retrieval and organization                                                                                                                                            |
| `institutionId`      | The ID of the Financial Institution. This is useful for organizing accounts by Financial Institution.                                                                                                                              |
| `institutionLoginId` | This is the unique identifier for a set of accounts that are added under the same set of login credentials. You can display accounts grouped by this identifier to show which accounts were added with the same login credentials. |
| `Account Type`       | This tells you the type of account. This can be useful for determining how an account can be used.                                                                                                                                 |

## Customer Account Operations {#customer-account-operations}

After a customer has added accounts, the list of accounts they have added can be retrieved using these operations.
Tip: Access to any customer account data requires the **Consent Receipt ID** generated when a customer linked the account. The **Consent Receipt ID** is obtained through [Consent Notification](https://developer.mastercard.com/open-finance-au/documentation/consent/consent-notifications/index.md) as part of account linking.
API Reference: `GET /aggregation/v1/customers/{customerId}/accounts`


API Reference: `GET /aggregation/v1/customers/{customerId}/accounts/{accountId}`

<br />

## Unlinking an Account {#unlinking-an-account}

The **Unlink Customer Account by ID**
endpoint removes access to a specific customer account.

API Reference: `DELETE /aggregation/v1/customers/{customerId}/accounts/{accountId}`

After you call this endpoint successfully (`204` response):

* Access to the nominated account is removed.
* Data related to that account is deleted.
* Future data collection for the removed account stops.
* The account is no longer available through data APIs or any value-added products.
* If the removed account was the last account associated with an active consent, the consent is revoked and processed in line with existing consent handling, including notifications and dashboard updates.

If a customer later reselects a previously removed account during a consent
amendment, the account is re-added as a new account with a new `accountId`,
consistent with current amendment behavior.

No notifications are sent to financial institutions for account-level removal.

## Institution Login Operations {#institution-login-operations}


API Reference: `GET /aggregation/v1/customers/{customerId}/institutionLogins/{institutionLoginId}/accounts`


API Reference: `GET /aggregation/v1/customers/{customerId}/institutions/{institutionId}/accounts`

<br />

## Deleting Access to Accounts by Institution Login {#deleting-access-to-accounts-by-institution-login}

The **Delete Access to Customer Accounts by Institution Login ID** endpoint removes all
accounts that a customer added under a single institution login, and revokes
that institution login.

API Reference: `DELETE /aggregation/v1/customers/{customerId}/institutionLogins/{institutionLoginId}`

After you call this endpoint successfully:

* All accounts under the specified `institutionLoginId` are removed from aggregation.
* The associated institution login is revoked.
* Consent records and dashboards are updated.
* The relevant financial institution is notified of the revocation.
* Consent revocation notifications are sent.
* The `INSTITUTIONS_REVOKED` webhook event is emitted. See [Consent Webhooks](https://developer.mastercard.com/open-finance-au/documentation/consent/consent-notifications/index.md) for details.

No notifications are sent to financial institutions for account-level removal.
