> For the complete documentation index, see [llms.txt](https://vitawallet.gitbook.io/vita-business-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vitawallet.gitbook.io/vita-business-documentation/english/gestion-de-transacciones/crear-transaccion/retiros/forms.md).

# Forms

This is the way to know the fields needed to make a withdrawal to a certain country (keep in mind that these fields may change at any time)

## Get Withdrawal Rules

<mark style="color:blue;">`GET`</mark> `api.vitawallet.io/api/businesses/withdrawal_rules`

This method allows obtaining the form with the necessary fields to make a withdrawal to a certain country.

{% tabs %}
{% tab title="200: OK OK Request" %}

```javascript
{
     "rules": {
         "cl": {
             "fields": [
                {
                    "type": "select",
                    "name": "Tipo de beneficiario",
                    "key": "beneficiary_type",
                    "options": [
                        {
                           "label": "Individual",
                           "value": "Individual"
                        },
                        {
                           "label": "Corporativo",
                           "value": "Corporate"
                        }
                    ]
                },
                {
                    "type": "text",
                    "name": "Nombres",
                    "key": "beneficiary_first_name",
                    "max": 50,
                    "when": {
                         "key": "beneficiary_type",
                         "value": "Individual"
                    }
                },
                {
                    "type": "text",
                    "name": "Apellidos",
                    "key": "beneficiary_last_name",
                    "max": 50,
                    "when": {
                         "key": "beneficiary_type",
                         "value": "Individual"
                    }
                },
                {
                    "type": "email",
                    "name": "Correo",
                    "key": "beneficiary_email",
                    "max": 50
                },
                {
                    "type": "text",
                    "name": "Número de cuenta",
                    "key": "account_bank",
                    "min": 5,
                    "max": 18
                },
             ],
             "name": "Chile",
             "currency_iso_code": "CLP",
             "currency_name": "Peso chileno",
             "flag_url": "https://api.vitawallet.io/mailers/flags/CL.png"
         }
     }
}
```

{% endtab %}
{% endtabs %}

### Description

A form is composed of some keys with its meaning

<table><thead><tr><th>Key</th><th>Description</th></tr></thead><tbody><tr><td>type</td><td>Defines the type of field, allowed values are: <code>text, select, email</code></td></tr><tr><td>name</td><td>Field name</td></tr><tr><td>key</td><td>Field key, musst be sent on the withdrawal request body</td></tr><tr><td>options</td><td><p>Field options if type is select, some of these options are subject to other fields values. On this example, "Banco Sofitasa" is available if <strong>transfer_type</strong> has the value "<strong>Pago movil</strong>" or "<strong>Transferencia bancaria</strong>"</p><pre><code>{ "label": "Banco Sofitasa",
  "value": 32,
  "visible": {
    "key":"transfer_type",
    "value":["Pago movil","Transferencia bancaria"]
  }  
}
</code></pre></td></tr><tr><td>min</td><td>Minimum number of characters the field must contain</td></tr><tr><td>max</td><td>Maximum number of characters the field must contain</td></tr><tr><td>when </td><td>Field presence validation on the form<br><br>{ <br>     "key": "beneficiary<em>type",</em><br>     <em>"value": "Individual"</em><br><em>}</em><br><br>This field is required only when the field "beneficiary_type" has the value "Individual"</td></tr></tbody></table>

{% hint style="warning" %}
**Warning**\
\
Keep in mind that the fields of a form can change, we recommend creating your application taking this in consideration
{% endhint %}

### SDK

{% tabs %}
{% tab title="Node" %}
To know the withdrawal forms for a specific country, you can use the method **getWithdrawalRules** from rules provider.

```javascript
import Business from 'vita-business-node';

try {
    await Business.rulesProvider.getWithdrawalRules();
} catch {}
```

{% endtab %}
{% endtabs %}
