> ## 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.

# API Testing

> Test your CDR Products endpoint directly from the Console to verify how products are exposed in staging and production.

# API Testing

<Info>
  API Testing is currently in **Beta**. This feature allows you to verify your product data through the CDR Products endpoint without leaving the [Console](https://console.fiskil.com/).
</Info>

The API Test feature provides a built-in way to verify how your products are exposed through the CDR API in both Staging and Production environments. Use it to confirm your product configuration is correct before and after publishing changes.

<Card title="Open Product Portal" icon="arrow-up-right-from-square" href="https://console.fiskil.com/data-holder/products">
  Access the API Test feature in the Fiskil Console.
</Card>

***

## Why use API Testing

<CardGroup cols={2}>
  <Card title="Instant verification" icon="bolt">
    Test your Products endpoint directly from [Product Portal](https://console.fiskil.com/data-holder/products) without switching tools.
  </Card>

  <Card title="Environment comparison" icon="code-compare">
    Compare API responses between Staging and Production to verify deployments.
  </Card>

  <Card title="Debug configuration" icon="bug">
    Quickly identify issues with product data or API exposure settings.
  </Card>

  <Card title="Validate before go-live" icon="shield-check">
    Confirm your products appear correctly in the API before publishing to Production.
  </Card>
</CardGroup>

***

## Accessing API Test

<Steps>
  <Step title="Navigate to Product Portal">
    In the [Fiskil Console](https://console.fiskil.com/), go to **[Product Portal](https://console.fiskil.com/data-holder/products)** from the main navigation.
  </Step>

  <Step title="Open API Test">
    Click the **Test API** button in the top-right corner of the Products page.
  </Step>

  <Step title="View the API Test panel">
    The API Test panel opens, showing the CDR Products endpoint configuration and response preview.
  </Step>
</Steps>

***

## Using the API Test panel

The API Test panel provides a complete interface for testing your Products endpoint.

### Select environment

Choose which environment to test against:

| Environment    | Use case                                                       |
| -------------- | -------------------------------------------------------------- |
| **Staging**    | Verify new products or changes before publishing to Production |
| **Production** | Confirm live product data is correct and accessible            |

<Tip>
  Always test in Staging first when making changes. Once verified, publish to Production and test again to confirm the deployment.
</Tip>

### Request configuration

The panel displays the following request details:

<ResponseField name="Request URL" type="string">
  The full URL of the CDR Products endpoint for your Data Provider. This is automatically populated based on your instance configuration and selected environment.
</ResponseField>

<ResponseField name="Headers" type="object">
  Required headers for the API request, including the `x-v` header specifying the API version.

  <Expandable title="Common headers">
    <ResponseField name="x-v" type="integer">
      The version of the API being called. Currently supports version `4`.
    </ResponseField>
  </Expandable>
</ResponseField>

### Send a request

Click **Send Request** to execute the API call. The response appears in the panel below.

***

## Understanding the response

After sending a request, the API Test panel displays:

### Response status

A status badge indicates the result:

| Status               | Description                            |
| -------------------- | -------------------------------------- |
| **200 OK**           | Request successful — products returned |
| **400 Bad Request**  | Invalid request parameters             |
| **401 Unauthorized** | Authentication failed                  |
| **404 Not Found**    | Endpoint not found                     |
| **500 Server Error** | Internal server error                  |

### Response body

The response body shows the JSON payload returned by the Products endpoint. The Get Products endpoint returns a list of products with core fields:

```json Get Products response theme={null}
{
  "data": {
    "products": [
      {
        "productId": "home-loan-variable-001",
        "name": "Standard Variable Home Loan",
        "description": "Our standard variable rate home loan for owner occupiers with flexible repayment options.",
        "brand": "Example Bank",
        "brandName": "Example Bank",
        "productCategory": "RESIDENTIAL_MORTGAGES",
        "isTailored": false,
        "lastUpdated": "2025-01-15T09:30:00Z",
        "additionalInformation": {
          "overviewUri": "https://www.example.com.au/home-loans/variable",
          "termsUri": "https://www.example.com.au/home-loans/terms",
          "eligibilityUri": "https://www.example.com.au/home-loans/eligibility",
          "feesAndPricingUri": "https://www.example.com.au/home-loans/fees"
        }
      }
    ]
  },
  "links": {
    "self": "https://api.example.com.au/cds-au/v1/banking/products"
  },
  "meta": {
    "totalRecords": 1,
    "totalPages": 1
  }
}
```

To retrieve the full product details including rates, fees, and features, call the Get Product Detail endpoint:

```json Get Product Detail response theme={null}
{
  "data": {
    "productId": "home-loan-variable-001",
    "name": "Standard Variable Home Loan",
    "description": "Our standard variable rate home loan for owner occupiers with flexible repayment options.",
    "brand": "Example Bank",
    "brandName": "Example Bank",
    "productCategory": "RESIDENTIAL_MORTGAGES",
    "isTailored": false,
    "lastUpdated": "2025-01-15T09:30:00Z",
    "additionalInformation": {
      "overviewUri": "https://www.example.com.au/home-loans/variable",
      "termsUri": "https://www.example.com.au/home-loans/terms",
      "eligibilityUri": "https://www.example.com.au/home-loans/eligibility",
      "feesAndPricingUri": "https://www.example.com.au/home-loans/fees"
    },
    "features": [
      {
        "featureType": "OFFSET",
        "additionalInfo": "100% offset account available"
      },
      {
        "featureType": "REDRAW",
        "additionalInfo": "Free redraw facility available"
      },
      {
        "featureType": "DIGITAL_BANKING",
        "additionalInfo": "Manage your loan via online and mobile banking"
      }
    ],
    "eligibility": [
      {
        "eligibilityType": "MIN_AGE",
        "additionalValue": "18"
      },
      {
        "eligibilityType": "RESIDENCY_STATUS",
        "additionalValue": "Australian citizen or permanent resident"
      }
    ],
    "fees": [
      {
        "name": "Application Fee",
        "feeType": "UPFRONT",
        "amount": "600.00",
        "currency": "AUD"
      },
      {
        "name": "Monthly Service Fee",
        "feeType": "PERIODIC",
        "amount": "10.00",
        "currency": "AUD",
        "additionalValue": "P1M"
      }
    ],
    "lendingRates": [
      {
        "lendingRateType": "VARIABLE",
        "rate": "0.0649",
        "comparisonRate": "0.0672",
        "calculationFrequency": "P1D",
        "applicationFrequency": "P1M",
        "interestPaymentDue": "IN_ARREARS",
        "repaymentType": "PRINCIPAL_AND_INTEREST",
        "loanPurpose": "OWNER_OCCUPIED",
        "additionalInfo": "Standard variable rate for owner occupied, principal and interest repayments"
      }
    ],
    "constraints": [
      {
        "constraintType": "MIN_LIMIT",
        "additionalValue": "50000.00"
      },
      {
        "constraintType": "MAX_LIMIT",
        "additionalValue": "5000000.00"
      }
    ]
  },
  "links": {
    "self": "https://api.example.com.au/cds-au/v1/banking/products/home-loan-variable-001"
  }
}
```

<Note>
  The response follows the [CDR Banking Product API specification](https://consumerdatastandardsaustralia.github.io/standards/#get-products). Rates are expressed as decimals (e.g., `0.0649` represents 6.49%). Refer to the standard for complete field definitions.
</Note>

***

## Common testing scenarios

### Verify a new product

After creating a product in Product Portal:

<Steps>
  <Step title="Deploy to Staging">
    Deploy your new product to the Staging environment.
  </Step>

  <Step title="Open API Test">
    Click **Test API** and select **Staging** as the environment.
  </Step>

  <Step title="Send request">
    Click **Send Request** and verify your product appears in the response.
  </Step>

  <Step title="Check product fields">
    Confirm all fields are correctly populated, including:

    * `productId`
    * `name`
    * `description`
    * `productCategory`
    * `lastUpdated`
  </Step>
</Steps>

### Compare Staging and Production

To verify a deployment was successful:

<Steps>
  <Step title="Test Staging">
    Select **Staging** environment and send a request. Note the products and their `lastUpdated` timestamps.
  </Step>

  <Step title="Test Production">
    Switch to **Production** environment and send a request.
  </Step>

  <Step title="Compare responses">
    Verify the expected products appear in Production with the correct data.
  </Step>
</Steps>

### Debug missing products

If a product doesn't appear in the API response:

<AccordionGroup>
  <Accordion title="Product not deployed">
    Check the product status in [Product Portal](https://console.fiskil.com/data-holder/products). Products must be deployed to appear in the API.

    * **NEEDS\_REVIEW** — Product has pending changes that need approval
    * **DRAFT** — Product not yet deployed
    * **PUBLISHED** — Product is live
  </Accordion>

  <Accordion title="Wrong environment selected">
    Verify you're testing the correct environment. Products deployed to Staging won't appear in Production until published.
  </Accordion>

  <Accordion title="Product archived">
    Archived products may not appear in the Products list endpoint. Check if the product has an expired `effectiveTo` date.
  </Accordion>

  <Accordion title="Validation errors">
    Products with validation errors cannot be deployed. Return to the product editor and resolve any errors shown.
  </Accordion>
</AccordionGroup>

***

## Best practices

<CardGroup cols={2}>
  <Card title="Test after every deployment" icon="rotate">
    Always verify the API response after deploying changes to catch issues early.
  </Card>

  <Card title="Compare environments regularly" icon="code-compare">
    Regularly compare Staging and Production to ensure they're in sync as expected.
  </Card>

  <Card title="Check timestamps" icon="clock">
    Use the `lastUpdated` field to confirm you're seeing the latest version of your products.
  </Card>

  <Card title="Document issues" icon="file-lines">
    If you encounter unexpected responses, note the details before contacting support.
  </Card>
</CardGroup>

***

## Limitations

<Warning>
  API Testing is currently in Beta and has the following limitations:
</Warning>

* **Products endpoint only** — Currently supports testing the Get Products endpoint. Additional endpoints may be added in future releases.
* **Read-only** — You cannot modify product data through the API Test panel.
* **No authentication testing** — The test uses internal authentication. It does not test external client authentication flows.

***

## Related resources

<CardGroup cols={2}>
  <Card title="Creating products" icon="plus" href="/docs/product-portal/creating-products">
    Learn how to create and manage products in Product Portal.
  </Card>

  <Card title="Products API reference" icon="list" href="/api-reference/products/create-a-new-product">
    Complete guide to every field in Product Portal.
  </Card>

  <Card title="Testing with Postman" icon="rocket" href="/docs/testing/postman">
    Use Postman for more advanced API testing scenarios.
  </Card>

  <Card title="CDR integration requirements" icon="book" href="/api-reference/cdr/integration-requirements">
    Understand the technical requirements for CDR API integration.
  </Card>
</CardGroup>
