# IBAN (IbanGenerator)

The IBAN generator generates a valid International Bank Account Number (IBAN).

## Link object structure

The metadata object is populated from `IbanMetadata` object. It includes:

* `preserveCountryCode` - Whether to preserve the original country code in the generated value.
* `preserveBankCode` - Whether to preserve the original bank code in the generated value. Note that if you preserve the bank code, then you must preserve the country code.

If the original values are not IBANs, then do not enable these options.

Here is the basic structure of a link object for the IBAN generator.

{% code overflow="wrap" %}

```json
{
  "schema": "string",
  "table": "string",
  "column": "string",
  "path": "string",  //JSON fields only
  "dataType": "string",  //MongoDB, Amazon DynamoDB, and JSON fields only
  "metadata": {  
    "presetId": "string",
    "generatorId": "IbanGenerator",
    "encryptionProcessor": "x-on", //To use configured Structural data encryption
    "customValueProcessor": "string" //If custom value processor applied
    "preserveCountryCode": boolean,
    "preserveBankCode": boolean, // If true, then preserveCountryCode is automatically true
    "isConsistent": boolean
  }
}
```

{% endcode %}

## Example replacement

The following example generates IBAN values that preserve the bank code and country code from the original values. Consistency is not enabled.

{% code overflow="wrap" %}

```json
{
  "name": "acctno",
  "schema": "public",
  "table": "accounts",
  "links": [
    {
      "column": "acctno",
      "table": "accounts",
      "schema": "public",
      "metadata": {
        "presetId": "IbanGenerator",
        "generatorId": "IbanGenerator",
        "preserveCountryCode": true,
        "preserveBankCode": true,
        "isConsistent": false
      }
    }
  ]
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/app/api/quick-start-guide/tonic-api-generator-assignment/generator-api-reference/iban-ibangenerator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
