> ## Documentation Index
> Fetch the complete documentation index at: https://holder.docs.fiskil.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Phase 2: Data validation

> Call the CDR Common, Banking, and Energy APIs in UAT and validate the data returned for each test persona.

> [!NOTE]
>
> **Prerequisite:** Complete [Phase 1](https://holder.docs.fiskil.dev/api-reference/cdr/testing/consent-authorisation.md) and create a consent (CDR arrangement) for each [test persona](https://holder.docs.fiskil.dev/api-reference/cdr/testing/test-personas.md).

In this phase, you call each data sharing API from the Mock Data Recipient and confirm the response contains the correct data for the persona you're testing.

***

## Call an endpoint

**1. Open the data sharing page**

In the Mock Data Recipient sidebar, under **Consumer Data Sharing**, select **Common**, **Banking**, or **Energy**.

**2. Choose the endpoint and arrangement**

Expand the endpoint you want to test, then select the CDR arrangement for the persona you're testing.

**3. Send the request**

Set any parameters and headers, such as the `x-v` version header or `page-size`, and send the request.

> [!TIP]
>
> The response returns `200 OK` with data that matches the persona's records.

> [!NOTE]
>
> Each endpoint needs the matching scope in the consent. If you get a `403` response, confirm the consent from Phase 1 includes the scope listed in the tables below.

***

## Endpoints to test

Each endpoint name links to its definition in the Consumer Data Standards (CDS), which lists the current supported versions and the required and optional fields.

**Common**

| Endpoint | Request | Required scope |
| - | - | - |
| [Get Customer](https://consumerdatastandardsaustralia.github.io/standards/#cdr-common-api_get-customer) | `GET /common/customer` | `common:customer.basic:read` |
| [Get Customer Detail](https://consumerdatastandardsaustralia.github.io/standards/#cdr-common-api_get-customer-detail) | `GET /common/customer/detail` | `common:customer.detail:read` |

**Banking**

| Endpoint | Request | Required scope |
| - | - | - |
| [Get Accounts](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-accounts) | `GET /banking/accounts` | `bank:accounts.basic:read` |
| [Get Account Detail](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-account-detail) | `GET /banking/accounts/{accountId}` | `bank:accounts.detail:read` |
| [Get Bulk Balances](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-bulk-balances) | `GET /banking/accounts/balances` | `bank:accounts.basic:read` |
| [Get Balances For Specific Accounts](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-balances-for-specific-accounts) | `POST /banking/accounts/balances` | `bank:accounts.basic:read` |
| [Get Account Balance](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-account-balance) | `GET /banking/accounts/{accountId}/balance` | `bank:accounts.basic:read` |
| [Get Transactions For Account](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-transactions-for-account) | `GET /banking/accounts/{accountId}/transactions` | `bank:transactions:read` |
| [Get Transaction Detail](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-transaction-detail) | `GET /banking/accounts/{accountId}/transactions/{transactionId}` | `bank:transactions:read` |
| [Get Direct Debits For Account](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-direct-debits-for-account) | `GET /banking/accounts/{accountId}/direct-debits` | `bank:regular_payments:read` |
| [Get Bulk Direct Debits](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-bulk-direct-debits) | `GET /banking/accounts/direct-debits` | `bank:regular_payments:read` |
| [Get Direct Debits For Specific Accounts](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-direct-debits-for-specific-accounts) | `POST /banking/accounts/direct-debits` | `bank:regular_payments:read` |
| [Get Scheduled Payments For Account](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-scheduled-payments-for-account) | `GET /banking/accounts/{accountId}/payments/scheduled` | `bank:regular_payments:read` |
| [Get Scheduled Payments Bulk](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-scheduled-payments-bulk) | `GET /banking/payments/scheduled` | `bank:regular_payments:read` |
| [Get Scheduled Payments For Specific Accounts](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-scheduled-payments-for-specific-accounts) | `POST /banking/payments/scheduled` | `bank:regular_payments:read` |
| [Get Instalment Plans For Account](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-instalment-plans-for-account) | `GET /banking/accounts/{accountId}/payments/plans` | `bank:regular_payments:read` |
| [Get Instalment Plans Bulk](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-instalment-plans-bulk) | `GET /banking/accounts/payments/plans` | `bank:regular_payments:read` |
| [Get Payees](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-payees) | `GET /banking/payees` | `bank:payees:read` |
| [Get Payee Detail](https://consumerdatastandardsaustralia.github.io/standards/#cdr-banking-api_get-payee-detail) | `GET /banking/payees/{payeeId}` | `bank:payees:read` |

**Energy**

| Endpoint | Request | Required scope |
| - | - | - |
| [Get Energy Accounts](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-energy-accounts) | `GET /energy/accounts` | `energy:accounts.basic:read` |
| [Get Energy Account Detail](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-energy-account-detail) | `GET /energy/accounts/{accountId}` | `energy:accounts.detail:read` |
| [Get Agreed Payment Schedule](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-agreed-payment-schedule) | `GET /energy/accounts/{accountId}/payment-schedule` | `energy:accounts.paymentschedule:read` |
| [Get Concessions](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-concessions) | `GET /energy/accounts/{accountId}/concessions` | `energy:accounts.concessions:read` |
| [Get Balance For Energy Account](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-balance-for-energy-account) | `GET /energy/accounts/{accountId}/balance` | `energy:billing:read` |
| [Get Bulk Balances For Energy](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-bulk-balances-for-energy) | `GET /energy/accounts/balances` | `energy:billing:read` |
| [Get Balances For Specific Energy Accounts](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-balances-for-specific-energy-accounts) | `POST /energy/accounts/balances` | `energy:billing:read` |
| [Get Invoices For Account](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-invoices-for-account) | `GET /energy/accounts/{accountId}/invoices` | `energy:billing:read` |
| [Get Bulk Invoices](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-bulk-invoices) | `GET /energy/accounts/invoices` | `energy:billing:read` |
| [Get Invoices For Specific Accounts](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-invoices-for-specific-accounts) | `POST /energy/accounts/invoices` | `energy:billing:read` |
| [Get Billing For Account](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-billing-for-account) | `GET /energy/accounts/{accountId}/billing` | `energy:billing:read` |
| [Get Bulk Billing](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-bulk-billing) | `GET /energy/accounts/billing` | `energy:billing:read` |
| [Get Billing For Specific Accounts](https://consumerdatastandardsaustralia.github.io/standards/#cdr-energy-api_get-billing-for-specific-accounts) | `POST /energy/accounts/billing` | `energy:billing:read` |

> [!NOTE]
>
> Service point, usage, and DER endpoints rely on AEMO data, which is not yet available in the UAT environment. The Plans data set relies on AER data.

***

## What to validate

Run these checks for each endpoint and each [test persona](https://holder.docs.fiskil.dev/api-reference/cdr/testing/test-personas.md):

* **Data accuracy.** The response contains the persona's data, and only for the accounts selected in the consent.
* **Standards conformance.** The response includes every field the CDS marks as required, and optional fields follow the CDS formats.
* **Versioning.** A request with a supported `x-v` version succeeds. A request for a version you don't support fails with the expected error. See [Versioning](https://consumerdatastandardsaustralia.github.io/standards/#versioning) in the CDS.
* **Pagination.** Query parameters such as `page-size` and `page` filter the response as expected, and the `links` and `meta` objects reflect the page returned. See [Pagination](https://consumerdatastandardsaustralia.github.io/standards/#pagination) in the CDS.

> [!TIP]
>
> When every endpoint returns the correct data for each persona, continue to [Phase 3: Error validation](https://holder.docs.fiskil.dev/api-reference/cdr/testing/error-validation.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.