> For the complete documentation index, see [llms.txt](https://docs.stric.com.br/documentacao/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stric.com.br/documentacao/contas/registro-de-contas.md).

# Registro de contas

1. Registro da conta com os dados oficiais.
2. Cadastro de endereço
3. Envio de documentos

## Registrar uma nova conta (PF)

<mark style="color:green;">`POST`</mark> `https://dev.stric.com.br/accounts/individuals`

Criação de uma nova conta

#### Headers

| Name                                     | Type   | Description   |
| ---------------------------------------- | ------ | ------------- |
| client<mark style="color:red;">\*</mark> | String | ID de cliente |
| authorization                            | String | Bearer Token  |

#### Request Body

| Name                                            | Type   | Description                                     |
| ----------------------------------------------- | ------ | ----------------------------------------------- |
| document<mark style="color:red;">\*</mark>      | String | CPF/CNPJ                                        |
| name<mark style="color:red;">\*</mark>          | String | Nome Completo                                   |
| email<mark style="color:red;">\*</mark>         | String | E-mail                                          |
| monthlyIncome<mark style="color:red;">\*</mark> | Number | Renda mensal                                    |
| birthDate<mark style="color:red;">\*</mark>     | Date   | Date de nascimento/Data de fundação             |
| password<mark style="color:red;">\*</mark>      | String | Senha da conta (Válida apenas para white-label) |

{% tabs %}
{% tab title="200: OK Caso de sucesso" %}

```javascript
{
    "name": "ANDERSON BENTO SOARES",
    "document": "19162846043",
    "email": "anderson.bento@gmail.com",
    "monthlyIncome": 6000,
    "publiclyExposedPerson": 0,
    "birthDate": "1992-07-15T00:00:00.000Z",
    "type": "individuals",
    "status": "WAITING_ADDRESS",
    "balance": 0,
    "originalBalance": 0,
    "id": "f7294898-7d31-4161-85f2-0af1ecfddf0d"
}
```

{% endtab %}

{% tab title="400: Bad Request Documento inválido" %}

```javascript
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Validation failed",
    "validation": {
        "body": {
            "source": "body",
            "keys": [
                "document"
            ],
            "message": "\"document\" does not match any of the allowed types"
        }
    }
}
```

{% endtab %}
{% endtabs %}

## Registrar uma nova conta (PJ)

<mark style="color:green;">`POST`</mark> `https://dev.stric.com.br/accounts/companies`

Criação de uma nova conta

#### Headers

| Name                                     | Type   | Description   |
| ---------------------------------------- | ------ | ------------- |
| client<mark style="color:red;">\*</mark> | String | ID de cliente |
| authorization                            | String | Bearer Token  |

#### Request Body

| Name                                                | Type   | Description                                     |
| --------------------------------------------------- | ------ | ----------------------------------------------- |
| document<mark style="color:red;">\*</mark>          | String | CNPJ                                            |
| name<mark style="color:red;">\*</mark>              | String | Nome Completo                                   |
| email<mark style="color:red;">\*</mark>             | String | E-mail                                          |
| monthlyIncome<mark style="color:red;">\*</mark>     | Number | Renda mensal                                    |
| constitutionDate<mark style="color:red;">\*</mark>  | Date   | Date de nascimento/Data de fundação             |
| password<mark style="color:red;">\*</mark>          | String | Senha da conta (Válida apenas para white-label) |
| partner\*{}<mark style="color:red;">\*</mark>       | Object | Objeto sócio                                    |
| partner.name<mark style="color:red;">\*</mark>      | String | Nome do sócio                                   |
| partner.document<mark style="color:red;">\*</mark>  | String | CPF do sócio                                    |
| partner.birthDate<mark style="color:red;">\*</mark> | Date   | Nascimento do sócio                             |

{% tabs %}
{% tab title="200: OK Caso de sucesso" %}

```javascript
{
    "name": "COMPANY NAME",
    "document": "37038720000156",
    "email": "anderson.bento@gmail.com",
    "monthlyIncome": 6000,
    "publiclyExposedPerson": 0,
    "birthDate": "1992-07-15T00:00:00.000Z",
    "type": "companies",
    "status": "WAITING_ADDRESS",
    "balance": 0,
    "originalBalance": 0,
    "id": "f7294898-7d31-4161-85f2-0af1ecfddf0d"
}
```

{% endtab %}

{% tab title="400: Bad Request Documento inválido" %}

```javascript
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Validation failed",
    "validation": {
        "body": {
            "source": "body",
            "keys": [
                "document"
            ],
            "message": "\"document\" does not match any of the allowed types"
        }
    }
}
```

{% endtab %}
{% endtabs %}

### Status

<table><thead><tr><th>Status</th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>WAITING_ADDRESS</td><td>Aguardando endereço</td><td></td></tr><tr><td>WAITING_DOCUMENTS</td><td>Aguardando documentação obrigatória</td><td></td></tr><tr><td>WAITING_ANALYSIS</td><td>Aguardando analise</td><td></td></tr><tr><td>UNDER_ANALYSIS</td><td>Em analise</td><td></td></tr><tr><td>WAITING_CORRECTIONS</td><td>Aguardando correções</td><td></td></tr><tr><td>ACTIVE</td><td>Ativa</td><td></td></tr><tr><td>BLOCKED</td><td>Bloqueada</td><td></td></tr></tbody></table>

## Cadastrar endereço

<mark style="color:green;">`POST`</mark> `https://dev.stric.com.br/accounts/address`

#### Headers

| Name                                            | Type   | Description             |
| ----------------------------------------------- | ------ | ----------------------- |
| account<mark style="color:red;">\*</mark>       | String | ID da conta ser operada |
| authorization<mark style="color:red;">\*</mark> | String | Bearer Token            |

#### Request Body

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| zipCode<mark style="color:red;">\*</mark>      | String | CEP                |
| city<mark style="color:red;">\*</mark>         | String | Cidade             |
| state<mark style="color:red;">\*</mark>        | String | Estado (2 dígitos) |
| neighborhood<mark style="color:red;">\*</mark> | String | Bairro             |
| street<mark style="color:red;">\*</mark>       | String | Endereço           |
| number<mark style="color:red;">\*</mark>       | String | Número             |
| complement                                     | String | Complemento        |

{% tabs %}
{% tab title="200: OK Caso de sucesso" %}

```javascript
{
    "zipCode": "16401036",
    "city": "Lins",
    "state": "SP",
    "neighborhood": "Vila São José",
    "street": "Rua José Francisco Ribeiro",
    "number": "1007",
    "complement": "N/A",
    "id": "16cea4d5-cd65-4951-9dfc-b8c189c72ec0",
    "date": "2022-06-28T14:26:05.133Z"
}
```

{% endtab %}

{% tab title="200: OK Parâmetro inválido" %}

```javascript
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Validation failed",
    "validation": {
        "body": {
            "source": "body",
            "keys": [
                "zipCode"
            ],
            "message": "\"zipCode\" length must be 8 characters long"
        }
    }
}
```

{% endtab %}
{% endtabs %}

## Enviar documentação

<mark style="color:green;">`POST`</mark> `https://dev.stric.com.br/accounts/documents`

#### Query Parameters

| Name                                   | Type   | Description       |
| -------------------------------------- | ------ | ----------------- |
| type<mark style="color:red;">\*</mark> | String | Tipo do documento |

#### Headers

| Name                                            | Type   | Description               |
| ----------------------------------------------- | ------ | ------------------------- |
| account<mark style="color:red;">\*</mark>       | String | ID da conta a ser operada |
| authorization<mark style="color:red;">\*</mark> | String | Bearer Token              |

#### Request Body

| Name                                   | Type      | Description           |
| -------------------------------------- | --------- | --------------------- |
| file<mark style="color:red;">\*</mark> | Form-data | Arquivo a ser enviado |

{% tabs %}
{% tab title="200: OK Caso de sucesso" %}

```javascript
{
  "originalName": "Captura de Tela 2022-01-20 às 13.58.32.png",
  "name": "bfccf9b69b42b85b714a6f928e82e9c5-CapturadeTela2022-01-20às13.58.32.png",
  "type": "SELFIE",
  "status": "ACTIVE",
  "id": "977a4bec-a8f2-46c9-bf82-36a39423086e",
  "date": "2022-06-28T14:34:42.251Z"
}
```

{% endtab %}

{% tab title="400: Bad Request Erro da validação" %}

```javascript
{
    "statusCode": 400,
    "message": "invalid documents",
    "friend": "Não conseguimos validar seu documento"
}
```

{% endtab %}
{% endtabs %}

Assim que acabar o envio de toda a documentação obrigatória o retorno do último documento será o retorno da **conta** com o status atualizado (WAITING\_ANALYSIS).

```javascript
{
  "id": "a0e4cec6-1920-4e0c-8f68-9564182e835e",
  "name": "ANDERSON BENTO SOARES",
  "document": "19162846043",
  "email": "anderson.bento@gmail.com",
  "monthlyIncome": 6000,
  "publiclyExposedPerson": 0,
  "birthDate": "1992-07-14T03:00:00.000Z",
  "type": "individuals",
  "bank": null,
  "branch": null,
  "account": null,
  "accountDigit": null,
  "status": "WAITING_ANALYSIS",
  "balance": 0,
  "originalBalance": 0
}
```

### Tipo de documentos

| Tipo                      | Descriçnao              |
| ------------------------- | ----------------------- |
| SELFIE                    | Selfie                  |
| IDENTITY\_CARD\_FRONT     | Frente do RG            |
| IDENTITY\_CARD\_VERSE     | Verso do RG             |
| DRIVER\_LICENSE\_FRONT    | Frente da CNH           |
| DRIVER\_LICENSE\_VERSE    | Verso da CNH            |
| PROOF\_ADDRESS            | Comprovante de endereço |
| DOCUMENT\_CARD            | Cartão CNPJ             |
| ARTICLES\_OF\_ASSOCIATION | Contrato Social         |
