# Show

## Get Flow by ID

<mark style="color:blue;">`GET`</mark> `https://biometridon.polygon.pt/api/flows/:id`

This endpoint allows you to get a flow information by ID.

#### Path Parameters

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| id   | string | ID of the flow to get |

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | Authentication user token |

{% tabs %}
{% tab title="200 " %}

```bash
{
  "data": {
    "name": "Flow Default",
    "stepsOrdered": [
      "5f06dd39a89fd30bd4671862",
      "5f06dd39a89fd30bd4671863",
      "5f06dd39a89fd30bd4671866",
      "5f06dd39a89fd30bd4671867",
      "5f06dd39a89fd30bd4671869",
      "5f06dd39a89fd30bd467186a",
      "5f06dd39a89fd30bd467186b",
      "5f06dd39a89fd30bd467186c",
      "5f06dd39a89fd30bd4671868"
    ],
    "settingsId": "5f06dd3c198040265c1fc732",
    "clientId": "5f06dd360d2a954da80c098f",
    "forAllClients": true,
    "active": true,
    "created_at": "2020-07-09T09:02:52.307Z",
    "updated_at": "2020-07-09T09:02:52.307Z",
    "settings": {
      "name": "Flow Config Default",
      "guide": [],
      "processUsername": [
        "stepData.data.name",
        "stepData.data.surname"
      ],
      "clientId": "5f06dd360d2a954da80c098f",
      "forAllClients": true,
      "active": false,
      "created_at": "2020-07-09T09:02:52.295Z",
      "updated_at": "2020-07-09T09:02:52.295Z",
      "id": "5f06dd3c198040265c1fc732"
    },
    "id": "5f06dd3c198040265c1fc733"
  },
  "meta": {
    "message": "Success."
  },
  "status": true
}
```

{% endtab %}

{% tab title="404 " %}

```bash
{
  "data": {},
  "meta": {
    "message": "Flow not found",
    "code": "4002"
  },
  "status": false
}
```

{% endtab %}
{% endtabs %}

## Get Flow Steps

<mark style="color:blue;">`GET`</mark> `https://biometridon.polygon.pt/api/flows/:id/steps`

This endpoint allows you to get a flow steps information by ID.

#### Path Parameters

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| id   | string | ID of the flow to get |

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | Authentication user token |

{% tabs %}
{% tab title="200 " %}

```bash
{
  "data": [
    {
      "label": "Dados Pessoais",
      "aliasId": "DADOSPESS",
      "type": "form-file",
      "settings": {
        "fields": [
          {
            "type": "text",
            "aliasId": "account_type",
            "label": "Dados de Conta (Seleccionar Conta)",
            "editable": false,
            "rules": [
              {
                "type": "minlength",
                "value": 6
              },
              {
                "type": "maxlength",
                "value": 6
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "account_holder",
            "label": "Titulares (Número de titulares)",
            "editable": false,
            "rules": [
              {
                "type": "accountholders"
              }
            ]
          },
          {
            "type": "select",
            "aliasId": "client_account_purpose",
            "label": "Finalidade da Conta (Finalidade e natureza da Relação de Negócio)",
            "editable": false,
            "options": [
              {
                "value": "P01",
                "label": "FAMILIAR/PESSOAL/INDIVIDUAL"
              }
            ],
            "rules": [
              {
                "type": "minlength",
                "value": 3
              },
              {
                "type": "maxlength",
                "value": 3
              }
            ]
          },
          {
            "type": "multiselect",
            "aliasId": "funds_origin",
            "label": "Origem dos fundos",
            "editable": true,
            "options": [
              {
                "value": "BE",
                "label": "BOLSA DE ESTUDO"
              },
              {
                "value": "HE",
                "label": "HERANÇA"
              },
              {
                "value": "PE",
                "label": "PENSÃO"
              },
              {
                "value": "RC",
                "label": "RENDIMENTOS DE CAPITAL"
              },
              {
                "value": "RE",
                "label": "RENDIMENTOS DE IMÓVEIS"
              },
              {
                "value": "SA",
                "label": "SALÁRIO"
              },
              {
                "value": "OU",
                "label": "OUTROS (DESCREVER)"
              }
            ],
            "rules": [
              {
                "type": "valid",
                "value": [
                  "BE",
                  "HE",
                  "PE",
                  "RC",
                  "RE",
                  "SA",
                  "OU"
                ]
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "other_funds_origin",
            "label": "Diga qual?",
            "editable": true,
            "rules": [
              {
                "type": "dependency",
                "field": "funds_origin",
                "value": "OU"
              }
            ]
          },
          {
            "type": "file",
            "aliasId": "file_doc_pre_cont",
            "label": "Informação pré-contratual (Pack pré-contratual)",
            "rules": [
              {
                "type": "typesAllowed",
                "value": [
                  "jpg",
                  "jpeg",
                  "png",
                  "pdf"
                ]
              }
            ]
          },
          {
            "type": "file",
            "aliasId": "file_doc_personal_data",
            "label": "Condições Tratamento Dados Pessoais",
            "editable": true,
            "rules": [
              {
                "type": "typesAllowed",
                "value": [
                  "jpg",
                  "jpeg",
                  "png",
                  "pdf"
                ]
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "accept_terms_conditions",
            "label": "Li e aceito os termos",
            "editable": true,
            "rules": [
              {
                "type": "maxlength",
                "value": 1
              },
              {
                "type": "required"
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "date_of_accept_term_conditions",
            "label": "Data de aceitação dos termos",
            "editable": true,
            "rules": [
              {
                "type": "maxlength",
                "value": 25
              },
              {
                "type": "required"
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "name",
            "label": "Nome",
            "rules": [
              {
                "type": "minlength",
                "value": 2
              },
              {
                "type": "maxlength",
                "value": 100
              },
              {
                "type": "required"
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "surname",
            "label": "Apelido",
            "rules": [
              {
                "type": "minlength",
                "value": 2
              },
              {
                "type": "maxlength",
                "value": 100
              },
              {
                "type": "required"
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "client_email",
            "label": "(Insira) Email",
            "editable": true,
            "rules": [
              {
                "type": "email"
              },
              {
                "type": "maxlength",
                "value": 200
              },
              {
                "type": "required"
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "client_phonenumber",
            "label": "(Insira) Nº Telémovel",
            "rules": [
              {
                "type": "maxlength",
                "value": 20
              },
              {
                "type": "required"
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "personal_data_aut1",
            "label": "Autorizo a recolha e tratamento… (pergunta 1)",
            "rules": [
              {
                "type": "maxlength",
                "value": 1
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "client_nif",
            "label": "(Insira) Nº Contribuinte",
            "editable": true,
            "rules": [
              {
                "type": "regex",
                "value": "[0-9]{9}"
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "personal_data_aut2",
            "label": "Autorizo a recolha e tratamento… (pergunta 2)",
            "rules": [
              {
                "type": "maxlength",
                "value": 1
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "telef_verif_ind",
            "label": "Validação do Telémovel (SMS/OTP)",
            "rules": [
              {
                "type": "maxlength",
                "value": 1
              }
            ]
          },
          {
            "type": "text",
            "aliasId": "date_of_phone_validation",
            "label": "Data de validação telemóvel",
            "rules": [
              {
                "type": "maxlength",
                "value": 25
              }
            ]
          }
        ]
      },
      "required": false,
      "clientId": "5f06dd360d2a954da80c098f",
      "forAllClients": true,
      "active": true,
      "created_at": "2020-07-09T09:02:49.233Z",
      "updated_at": "2020-07-09T09:02:49.234Z",
      "id": "5f06dd39a89fd30bd4671862"
    }
  ],
  "meta": {
    "message": "Success."
  },
  "status": true
}
```

{% endtab %}

{% tab title="404 " %}

```bash
{
  "data": {},
  "meta": {
    "message": "Flow not found",
    "code": "4002"
  },
  "status": false
}
```

{% endtab %}
{% endtabs %}
