# VIBAN Bulk Open

## Virtual IBAN Bulk Open - Request <a href="#virtual-iban-open" id="virtual-iban-open"></a>

<mark style="color:green;">`POST`</mark> <https://connect.lhv.com/viban/bulk>

Service is used for bulk opening nameless Virtual IBANs. Up to 1000 virtual IBANs can be opened with one request.\
Nameless virtual IBANs remain in "PENDING" status and can not be used for making payments until Virtual IBAN owner's personal details are added via service *Virtual IBAN Modify*.

{% hint style="info" %}
There is a limit to allow up to 10 000 Pending VIBAN accounts at a time per single Master Account. This is enforced to avoid opening too many accounts due to any errors.

Limit can be overridden only on special request to our Support.
{% endhint %}

#### **Headers**

| Name           | Value             |
| -------------- | ----------------- |
| Content-Type   | `application/xml` |
| Client-Code    | `customer value`  |
| Client-Country | `customer value`  |

#### **Body**

{% file src="<https://2266620947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHGywduAxJuxV3reZhASh%2Fuploads%2FB4Wk9ILmJ6KTjVHRvoBp%2Fviban.bulk.request.xsd.xml?alt=media&token=14e2d912-15c6-4124-870f-54c496d08da9>" %}

XML structure description:

<table><thead><tr><th width="97">MULT.</th><th width="202">MESSAGE ELEMENT</th><th width="195">XML TAG</th><th>Description</th></tr></thead><tbody><tr><td>[1..1]</td><td>+MessageRoot</td><td>&#x3C;VibanBulkRequest></td><td></td></tr><tr><td>[1..1]</td><td>++MasterAccount</td><td>&#x3C;MasterAccount></td><td>Master account IBAN (must belong to PSP).</td></tr><tr><td>[1..1]</td><td>++Amount</td><td>&#x3C;Amount></td><td>Amount of Virtual IBANs to be generated. Must be in range of 1 - 1000.</td></tr></tbody></table>

#### Samples

{% tabs %}
{% tab title="Opening two accounts" %}

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VibanBulkRequest>
  <MasterAccount>GB88LHVB01020000000001</MasterAccount>
  <Amount>2</Amount>
</VibanBulkRequest>
```

{% endtab %}
{% endtabs %}

### **Response**

**Headers**

| Name         | Value             |
| ------------ | ----------------- |
| Content-Type | `application/xml` |
| X-Bank-Code  | `LHVUK`, `LHVEE`  |

#### Body

{% tabs %}
{% tab title="202" %}
{% hint style="success" %}
Request accepted - no content
{% endhint %}
{% endtab %}

{% tab title="403" %}
{% hint style="danger" %}
Error code and description
{% endhint %}

<pre><code>&#x3C;Errors>
<strong>    &#x3C;Error>
</strong>        &#x3C;ErrorCode>FORBIDDEN&#x3C;/ErrorCode>
        &#x3C;Description>User doesn't exist&#x3C;/Description>
    &#x3C;/Error>
&#x3C;/Errors>
</code></pre>

{% endtab %}
{% endtabs %}

## Response message

Response message is created and can be requests by the Messages services - [messages](https://docs.lhv.com/home/connect/services/messages "mention")

{% hint style="info" %}
HTTP Header Message-Response-Type: VIBAN\_BULK
{% endhint %}

#### Body

{% file src="<https://2266620947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHGywduAxJuxV3reZhASh%2Fuploads%2FhfiHMAIF0zzWYFsvVzZW%2Fviban.bulk.response.xsd.xml?alt=media&token=073e626c-d27a-4b38-90bf-eb0c4ab28274>" %}

XML structure description:

<table><thead><tr><th width="106">MULT.</th><th>MESSAGE ELEMENT</th><th>XML TAG</th><th>Description</th></tr></thead><tbody><tr><td>[1..1]</td><td>+MessageRoot</td><td>&#x3C;VibanBulkResponse></td><td></td></tr><tr><td>[1..1]</td><td>++MasterAccount</td><td>&#x3C;MasterAccount></td><td>Master account IBAN (must belong to PSP).</td></tr><tr><td>[1..1]</td><td>++VirtualIBANList</td><td>&#x3C;VirtualIBANList></td><td></td></tr><tr><td>[1..n]</td><td>++VirtualIBAN</td><td>&#x3C;VirtualIBAN></td><td>Virtual IBAN that was generated.</td></tr></tbody></table>

#### Samples

{% tabs %}
{% tab title="Two accounts opened" %}

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VibanBulkResponse>
    <MasterAccount>GB88LHVB01020000000001</MasterAccount>
    <VirtualIBANList>
        <VirtualIBAN>GB88LHVB01020000000002</VirtualIBAN>
        <VirtualIBAN>GB88LHVB01020000000003</VirtualIBAN>
    </VirtualIBANList>
</VibanBulkResponse>
```

{% endtab %}
{% endtabs %}
