---
# System prepended metadata

title: Proxy Customer

---

# Proxy Customer

Este proxy incluye la integración de los servicios con los que el usuario final puede relacionarse.

Para descargar la colección de [Postman](https://www.postman.com/) donde se encuentran ya configurados los endpoints presione [aquí](https://drive.google.com/file/d/1hzPWPbvKnQLpZoN19PuOIWOQVHa_l3HY/view?usp=sharing)

host_sg: https://proxy-customer.sg-zinobe.com/

### health
Consulte si el proxy a nivel general esta funcionando

```GET {host}/health```

### General
#### 1. Consultar Doc_types

```GET /general/docs_types```

Params 
```None```
Body
```json=
{
    "success": true,
    "code": 0,
    "locale": "en",
    "message": "OK",
    "data": [
        {
            "id": "26bffbdd-1a63-4e21-85ca-89d485434a39",
            "short_name": "C.C.",
            "name": "Cédula de Ciudadanía",
            "description": "Cédula de Ciudadanía",
            "active": true
        },
        {
            "id": "58db4e0d-8972-442f-a13b-0aecc909fbda",
            "short_name": "C.E.",
            "name": "Cédula Extranjería",
            "description": "Cédula Extranjería",
            "active": true
        },
        {
            "id": "3938b0ba-7f6d-4357-ae1a-c035379d98cf",
            "short_name": "R.C.",
            "name": "Registro civil",
            "description": "Registro civil",
            "active": false
        },
        {
            "id": "bd8c507f-8719-4bc4-be02-c53c9ecfdf60",
            "short_name": "T.I.",
            "name": "Tarjeta de identidad",
            "description": "Tarjeta de identidad",
            "active": false
        },
        {
            "id": "9caacb86-5d22-4401-94b5-83b6a7ae9937",
            "short_name": "T.E.",
            "name": "Tarjeta de extranjería",
            "description": "Tarjeta de extranjería",
            "active": false
        },
        {
            "id": "4c54f389-f5f0-4d0a-b9b5-a62fd5525b6c",
            "short_name": "NIT",
            "name": "NIT",
            "description": "NIT",
            "active": true
        },
        {
            "id": "bf83c29a-b98c-48d2-87e5-cc0a04a63c32",
            "short_name": "Pasaporte",
            "name": "Pasaporte",
            "description": "Pasaporte",
            "active": false
        },
        {
            "id": "aee2df97-f054-4449-b74d-6a225adffe79",
            "short_name": "RFC",
            "name": "RFC",
            "description": "RFC",
            "active": true
        }
    ],
    "pagination": {
        "currentPage": 1,
        "lastPage": 1,
        "perPage": 15,
        "count": 8,
        "total": 8
    }
}
```

### Producto
#### 1. Calcular producto

```POST /public/calculator/{product_uuid}```

Params 
```None```
Body
```json=
{
    "principalAmount": 1000000,
    "numberOfPeriods": 1,
    "startDate":"2020-11-10"
}
```

Response
```
```


#### 2. Consultar producto

```GET /public/products/{product_uuid}```

Params 
```None```


Body
```None```

Response
```json=
{
    "success": true,
    "code": 0,
    "message": "OK",
    "data": {
        "uuid": "02c2fe97-4863-4958-8e01-ccc2c3bc9a39",
        "slug": "rotativo-cemex",
        "name": "Rotativo CEMEX",
        "description": "Cupo de crédito rotativo exclusivo para compras a Cemex. El cliente puede volver a utilizar el cupo inmediatamente después de realizar el pago y liberar su cupo de crédito.",
        "default": false,
        "allow_partial_disbursement": true,
        "confirmation_code_required": true,
        "installments": [
            1,
            2
        ],
        "info": [
            {
                "name": "Plazos",
                "description": "Hasta 2 meses"
            },
            {
                "name": "Periodicidad de la cuota",
                "description": "Mensuales"
            },
            {
                "name": "Montos",
                "description": "Desde $1,000,000 hasta $150,000,000"
            },
            {
                "name": "Tasa",
                "description": "25% EA",
                "tooltip": "De acuerdo con el cambio de metodología implementada para el efecto, las autoridades nacionales certifican la tasa máxima que puede ser cobrada por las obligaciones crediticias mensualmente. Para el periodo comprendido entre el 1 de diciembre de 2020 y el 31 de diciembre del 2020 te informamos que la tasa es 17.46% E.A. (efectiva anual)"
            },
            {
                "name": "Seguro",
                "description": "0.015%"
            }
        ],
        "properties": {
            "principalAmount": {
                "type": "number",
                "name": "principalAmount",
                "rules": "numeric|required|min:1000000|max:150000000",
                "min": 1000000,
                "max": 150000000,
                "required": true,
                "default": 1000000
            },
            "numberOfPeriods": {
                "type": "number",
                "name": "numberOfPeriods",
                "rules": "numeric|required|min:1|max:2",
                "min": 1,
                "max": 2,
                "required": true,
                "default": 2
            }
        }
    }
}
```
#### 3. Consultar Preguntas

```GET /public/questions```

Params 
```None```


Body
```None```

Response
```json=
{
    "success": true,
    "code": 0,
    "message": "OK",
    "data": {
        "questions": [
            {
                "title": "",
                "description": "¿Tu empresa está constituida en Cámara de comercio hace mas de un año?",
                "actions": [
                    {
                        "text": "Si cumplo",
                        "type": "affirmation"
                    },
                    {
                        "text": "No cumplo",
                        "type": "negation"
                    }
                ]
            },
            {
                "title": "",
                "description": "¿Tu empresa está en Bogotá?",
                "actions": [
                    {
                        "text": "Si cumplo",
                        "type": "affirmation"
                    },
                    {
                        "text": "No cumplo",
                        "type": "negation"
                    }
                ]
            }
        ],
        "to_pass": 3,
        "message_denied": {
            "title": "¡LO SENTIMOS!",
            "text": "Sin los requisitos mínimos no podemos realizar el estudio de créditos"
        }
    }
}

```


#### 4. Consultar Todos los Productos

```GET /public/products```

Params 
```None```


Body
```None```

Response

```json=
{
    "success": true,
    "code": 0,
    "message": "OK",
    "data": [
        {
            "uuid": "51a21fae-d2ec-4a74-b459-24d7186d1710",
            "slug": "microcredito",
            "name": "Microcrédito",
            "description": "Microcrédito para micro o pequeños empresarios o personas independientes que buscan invertir en capital de trabajo para su negocio.",
            "default": false,
            "allow_partial_disbursement": false,
            "confirmation_code_required": true,
            "installments": [
                1,
                2,
                3,
                4,
                5,
                6
            ],
            "info": [
                {
                    "name": "Plazos",
                    "description": "Hasta 6 meses"
                },
                {
                    "name": "Periodicidad de la cuota",
                    "description": "Mensuales"
                },
                {
                    "name": "Montos",
                    "description": "Desde $1,000,000 hasta $5,000,000"
                },
                {
                    "name": "Tasa",
                    "description": "54% EA",
                    "tooltip": "De acuerdo con el cambio de metodología implementada para el efecto, las autoridades nacionales certifican la tasa máxima que puede ser cobrada por las obligaciones crediticias mensualmente. Para el periodo comprendido entre el 1 de octubre de 2020 y el 31 de diciembre de 2020 te informamos que la tasa es 37.72% E.A. (efectiva anual)"
                },
                {
                    "name": "Comisión Microcrédito",
                    "description": "Del 4.5% al 7.5% + iva"
                },
                {
                    "name": "Seguro",
                    "description": "0.015%"
                }
            ],
            "properties": {
                "principalAmount": {
                    "type": "number",
                    "name": "principalAmount",
                    "rules": "numeric|required|min:1000000|max:5000000",
                    "min": 1000000,
                    "max": 5000000,
                    "required": true,
                    "default": 1000000
                },
                "numberOfPeriods": {
                    "type": "number",
                    "name": "numberOfPeriods",
                    "rules": "numeric|required|min:1|max:6",
                    "min": 1,
                    "max": 6,
                    "required": true,
                    "default": 6
                }
            }
        }
       ]
    }
     
```


#### 5. Referidos

```GET /aliatu/contact/auth/register/sources```

Params 
```None```


Body
```None```


Response
```json=
{
    "success": true,
    "code": 0,
    "locale": "es",
    "message": "OK",
    "data": [
        {
            "id": "bee69f5e-a72a-44a8-b7e9-2824804a3a9b",
            "name": "Referido",
            "description": "Referido"
        },
        {
            "id": "c8ad519c-bc15-4320-a1ef-69247d819ec8",
            "name": "Redes sociales",
            "description": "Redes sociales"
        },
        {
            "id": "94d6e8ed-c50e-4780-8b6a-53bf3a45a99e",
            "name": "Linkedin",
            "description": "Linkedin campaign"
        }
    ],
    "pagination": {
        "currentPage": 1,
        "lastPage": 1,
        "perPage": 15,
        "count": 3,
        "total": 3
    }
}

```


#### 6. Consultar Tipos de Persona

```GET /aliatu/contact/home/business-type```

Params 
```None```


Body
```None```

Response

```json=
{
    "success": true,
    "code": 0,
    "locale": "es",
    "message": "OK",
    "data": [
        {
            "id": "e26c5f28-7444-4d9c-a7e7-dec1d5847538",
            "slug": "legal",
            "name": "Juridica"
        },
        {
            "id": "fa18e843-a412-45db-9bc1-c125a06a85a0",
            "slug": "natural",
            "name": "Natural"
        }
    ]
}
```
### Login

#### 1. Registro de Usuario

```POST /aliatu/contact/auth/register```

Params 
```None```


Body
```json=
{
    "business_type_id":"fa18e843-a412-45db-9bc1-c125a06a85a0",
    "cellphone":"3152852915",
    "name":"Jose manuel calderin",
    "doc_nro":"45445454542",
    "email":"dacosta2@mailinator.com",
    "general_doc_type_id":"26bffbdd-1a63-4e21-85ca-89d485434a39",
    "password":"123456789",
    "source_id":"bee69f5e-a72a-44a8-b7e9-2824804a3a9b",
    "terms_and_conditions":true
}
```

Response
```
```


#### 2. Login de Usuario

```POST /aliatu/contact/auth/login```

Params 
```None```

Body
```
```
Response
```json=
{
    "success": true,
    "code": 0,
    "locale": "es",
    "message": "OK",
    "data": {
        "id": "3fc796bb-6248-4943-8633-5178d5ffe544",
        "general_doc_type_id": "26bffbdd-1a63-4e21-85ca-89d485434a39",
        "general_doc_type": "C.C.",
        "doc_number": "111111",
        "name": "test",
        "email": "test@mailinator.com",
        "cellphone": "311111",
        "genre": null,
        "core_uuid": "6fe397a8-7519-4ee1-9096-347a55b526ba",
        "token": "OnbMFaxexjdHqBbv6FQIMv0J1CyKbWr0OtqZ21jHFpsHQslTqpyBBCqpTX9g",
        "businesses": [
            {
                "type_slug": "natural",
                "general_doc_type_id": "26bffbdd-1a63-4e21-85ca-89d485434a39",
                "doc_number": 45445454542,
                "check_digit": 7,
                "name": null,
                "tradename": null,
                "id": "53c94865-dbcc-47a8-b09f-5a96c76eb1bc"
            }
        ]
    }
}
```

### Solicitud de Credito

#### 1. Crear Solicitud de Credito

```POST /credit_request/{cliente_uuid}/product/{product_uuid}```

Params 
```None```

Body
Type : Form-data
```
'amoun': '100000',
'max_quotas_allowed': '1'
```

Response
```
```

#### 2. validar solicitud de Credito

```POST /credit_request/{credit_request_uuid}/steps/calculadora```

Params 
```None```

Body
```None```

Response
```
```

#### 3. consultar solicitud de Credito

```POST /credit_request/{uuid}```

Params 
```None```

Body
```None```

Response
```
```

#### 4. Actualizar solicitud de Credito

```POST /credit_request/{uuid}```

Params 
```None```

Body
```json=
{
    "uuid_product": "02c2fe97-4863-4958-8e01-ccc2c3bc9a39",
    "steps": {
        "step": "interview",
        "status": "COMPLETED"
    }
}
```

Response
```
```

#### 5 Actualizar solicitud de Credito

```POST /credit_request/{uuid}```

Params 
```None```

Body
```
{
    "uuid_product": "02c2fe97-4863-4958-8e01-ccc2c3bc9a39",
    "steps": {
        "step": "interview",
        "status": "COMPLETED"
    }
}
```

Response
```
```

### Contacto

#### Consultar Estado de Contacto

```GET /contact/{contact_uuid}/state```

Params 
```None```

Body
```json=
{
    "success": true,
    "code": 0,
    "message": "OK",
    "data": {
        "produts": [
            {
                "uuid": "51a21fae-d2ec-4a74-b459-24d7186d1710",
                "slug": "microcredito"
            },
            {
                "uuid": "10117aca-0b32-47fa-952d-9f04c7914309",
                "slug": "credito-ordinario-covid"
            }
        ],
        "state": "active"
    }
}
```

Response
```
```

### Formularios Dinamicos

#### 1. Consultar Estructura de Formularios

```GET /dyn-forms/{form_uuid}/reference/{reference}/person/legal/document/{nid}```

Params 
```None```

Body
```None```

Response
```json=
{
    "success": true,
    "code": 0,
    "message": "OK",
    "data": [
        {
            "id": 245,
            "product_api_uuid": "",
            "product_id": 26,
            "name": "informacion_empresa",
            "slug": "aliatu-credito-ordinario-covid-legal-informacion-empresa",
            "description": "<h4 _ngcontent-nqp-c15=\"\" class=\"ng-tns-c15-3\" style=\"font-family: Ubuntu, sans-serif; line-height: 31px; font-size: 28px; color: rgb(51, 51, 51); letter-spacing: normal;\">Tu información básica</h4>",
            "complete": null,
            "enabled": "",
            "disabled": "",
            "data": "[{\"name\":\"Seccion\",\"isTable\":false,\"icon\":\"fa-puzzle-piece\",\"description\":\"Sección de un formulario\",\"label\":\"Tu información básica\",\"placeholder\":\"\",\"help\":\"\",\"type\":\"section\",\"elements\":[{\"tag\":\"input\",\"name\":\"Text\",\"icon\":\"fa-font\",\"description\":\"Texto en una sola línea\",\"label\":\"Razón social\",\"placeholder\":\"Escribe tu razón social\",\"help\":\"\",\"type\":\"text\",\"validations\":{\"required\":true,\"pattern\":null,\"max\":\"50\",\"regex\":\"[a-z A-Z0-9 áãâäàéêëèíîïìóõôöòúûüùçñ]+\"},\"validationMessages\":{\"required\":\"Campo requerido\",\"pattern\":null,\"max\":\"Ingresa máximo 50 caracteres\",\"regex\":\"Ingresa letras y números\"},\"slug\":\"razon_social\"},{\"tag\":\"input\",\"name\":\"Text\",\"icon\":\"fa-font\",\"description\":\"Texto en una sola línea\",\"label\":\"NIT de la empresa\",\"placeholder\":\"Escribe tu número\",\"help\":\"Ingresa el NIT sin el dígito de verificación\",\"type\":\"text\",\"validations\":{\"required\":true,\"email\":null,\"pattern\":null,\"max_num\":null,\"min\":\"\",\"max\":\"10\",\"regex\":\"[0-9]+\"},\"validationMessages\":{\"required\":\"Campo requerido\",\"email\":null,\"pattern\":null,\"max_num\":null,\"min\":\"\",\"max\":\"Ingresa máximo 10 caracteres\",\"regex\":\"Ingresa solo números\"},\"slug\":\"nit_de_la_empresa\"},{\"tag\":\"input\",\"name\":\"Text\",\"icon\":\"fa-font\",\"description\":\"Texto en una sola línea\",\"label\":\"Dirección de la empresa\",\"placeholder\":\"Escribe la dirección\",\"help\":\"\",\"type\":\"text\",\"validations\":{\"required\":true,\"pattern\":null,\"max\":\"50\"},\"validationMessages\":{\"required\":\"Campo requerido\",\"pattern\":null,\"max\":\"Ingresa máximo 50 caracteres\"},\"slug\":\"address\"},{\"tag\":\"input\",\"name\":\"Date\",\"icon\":\"fa-calendar\",\"description\":\"Seleccionar una fecha de un calendario\",\"label\":\"Fecha de constitución\",\"placeholder\":\"Día / Mes / Año\",\"help\":\"\",\"type\":\"date\",\"validations\":{\"required\":true,\"email\":null,\"pattern\":null,\"min\":null,\"max\":null},\"validationMessages\":{\"required\":\"Campo requerido\",\"email\":null,\"pattern\":null,\"min\":null,\"max\":null},\"slug\":\"constitution_date\"},{\"tag\":\"select\",\"name\":\"Select\",\"description\":\"Seleccionar de una lista desplegable\",\"icon\":\"fa-list\",\"type\":\"select\",\"label\":\"Empleados\",\"help\":\"\",\"options\":[{\"key\":0,\"value\":\"0\"},{\"key\":1,\"value\":\"1\"},{\"key\":2,\"value\":\"2\"},{\"key\":3,\"value\":\"3\"},{\"key\":4,\"value\":\"4\"},{\"key\":5,\"value\":\"5\"},{\"key\":6,\"value\":\"6\"},{\"key\":7,\"value\":\"7\"},{\"key\":8,\"value\":\"8\"},{\"key\":9,\"value\":\"9\"},{\"key\":10,\"value\":\"10+\"}],\"validations\":{\"required\":true,\"email\":null,\"pattern\":null,\"min\":null,\"max\":null},\"validationMessages\":{\"required\":\"Campo requerido\",\"email\":null,\"pattern\":null,\"min\":null,\"max\":null},\"slug\":\"num_employees\"},{\"tag\":\"input\",\"name\":\"Text\",\"icon\":\"fa-font\",\"description\":\"Texto en una sola línea\",\"label\":\"Código CIIU\",\"placeholder\":\"Código CIIU\",\"help\":\"\",\"type\":\"text\",\"validations\":{\"required\":true,\"pattern\":null,\"validateSelectValue\":null,\"max\":\"4\",\"regex\":\"[0-9]*\",\"min\":\"4\"},\"validationMessages\":{\"required\":\"Campo requerido\",\"pattern\":null,\"validateSelectValue\":null,\"max\":\"Ingresa un número de 4 dígitos\",\"regex\":\"Ingresa solo números\",\"min\":\"Ingresa un número de 4 dígitos\"},\"slug\":\"codigo_ciiu\"},{\"tag\":\"select\",\"name\":\"Select\",\"description\":\"Seleccionar de una lista desplegable\",\"icon\":\"fa-list\",\"type\":\"select\",\"label\":\"¿En qué vas a usar el dinero?\",\"help\":\"\",\"options\":[{\"key\":\"632361d2-bc15-4390-93f0-57f1140d829e\",\"value\":\"Campañas de marketing\"},{\"key\":\"936999e8-2951-4c9a-a663-6b13de3a1b28\",\"value\":\"Compra de computadores y/o software\"}],\"validations\":{\"required\":true,\"pattern\":null,\"validateSelectValue\":null},\"validationMessages\":{\"required\":\"Campo requerido\",\"pattern\":null,\"validateSelectValue\":null},\"slug\":\"use\"},{\"tag\":\"select\",\"name\":\"Select\",\"description\":\"Seleccionar de una lista desplegable\",\"icon\":\"fa-list\",\"type\":\"select\",\"label\":\"¿Qué banco usarás con Aliatu?\",\"help\":\"\",\"options\":[{\"key\":\"53e4da1a-8087-43b6-95a6-cf303fb7a261\",\"value\":\"si ves esto esta mal Bancolombia\"},{\"key\":\"5cee0fa4-3b91-490f-a9c2-2aae38fb05a4\",\"value\":\"Davivienda\"}],\"validations\":{\"required\":true,\"pattern\":null,\"validateSelectValue\":null},\"validationMessages\":{\"required\":\"Campo requerido\",\"pattern\":null,\"validateSelectValue\":null},\"slug\":\"bank\"},{\"tag\":\"input\",\"name\":\"Checkbox\",\"icon\":\"fa-check-circle\",\"description\":\"Seleccionar varios opciones de una lista\",\"type\":\"checkbox\",\"label\":\"Represéntate legal de la empresa\",\"help\":\"\",\"options\":[{\"key\":0,\"value\":\"¿Eres el representate legal de la empresa?\"}],\"validations\":{\"required\":null,\"pattern\":null},\"validationMessages\":{\"required\":null,\"pattern\":null},\"slug\":\"is_legal_representation\",\"size\":100},{\"tag\":\"input\",\"name\":\"Checkbox\",\"icon\":\"fa-check-circle\",\"description\":\"Seleccionar varios opciones de una lista\",\"type\":\"checkbox\",\"label\":\"Accionista de la empresa\",\"help\":\"\",\"options\":[{\"key\":0,\"value\":\"¿Eres dueño del más de 49% de las acciones de la empresa?\"}],\"validations\":{\"required\":null,\"pattern\":null,\"minSelectedCheckboxes\":null},\"validationMessages\":{\"required\":null,\"pattern\":null,\"minSelectedCheckboxes\":null},\"slug\":\"accionista_de_la_empresa\",\"size\":100}],\"validations\":{\"required\":null,\"pattern\":null,\"validateSelectValue\":null},\"validationMessages\":{\"required\":null,\"pattern\":null,\"validateSelectValue\":null},\"slug\":\"tu_informacion_basica\"}]",
            "created_at": "2020-09-23 00:26:08",
            "updated_at": "2021-01-06 15:12:52",
            "deleted_at": null,
            "split_percentage": null,
            "customer_type": "legal",
            "type_person": "legal",
            "formatted": {
                "title": "informacion_empresa",
                "description": "<h4 _ngcontent-nqp-c15=\"\" class=\"ng-tns-c15-3\" style=\"font-family: Ubuntu, sans-serif; line-height: 31px; font-size: 28px; color: rgb(51, 51, 51); letter-spacing: normal;\">Tu información básica</h4>",
                "descComplete": null,
                "descEnable": "",
                "descDisable": "",
                "fieldGroups": [
                    {
                        "required": null,
                        "title": "Tu información básica",
                        "name": "tu_informacion_basica",
                        "description": "",
                        "minItems": null,
                        "isTable": false,
                        "fields": [
                            {
                                "tag": "input",
                                "type": "text",
                                "label": "Razón social",
                                "name": "razon_social",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": "EQUIPOS Y TERRATEST SAS",
                                "size": null,
                                "details": null,
                                "helpText": "",
                                "options": [],
                                "dependsOn": null,
                                "validators": [
                                    {
                                        "type": "required",
                                        "message": "Campo requerido"
                                    },
                                    {
                                        "type": "max",
                                        "message": "Ingresa máximo 50 caracteres",
                                        "value": "50"
                                    },
                                    {
                                        "type": "regex",
                                        "message": "Ingresa letras y números",
                                        "value": "[a-z A-Z0-9 áãâäàéêëèíîïìóõôöòúûüùçñ]+"
                                    }
                                ]
                            },
                            {
                                "tag": "input",
                                "type": "text",
                                "label": "NIT de la empresa",
                                "name": "nit_de_la_empresa",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": "900501552",
                                "size": null,
                                "details": null,
                                "helpText": "Ingresa el NIT sin el dígito de verificación",
                                "options": [],
                                "dependsOn": null,
                                "validators": [
                                    {
                                        "type": "required",
                                        "message": "Campo requerido"
                                    },
                                    {
                                        "type": "min",
                                        "message": "",
                                        "value": ""
                                    },
                                    {
                                        "type": "max",
                                        "message": "Ingresa máximo 10 caracteres",
                                        "value": "10"
                                    },
                                    {
                                        "type": "regex",
                                        "message": "Ingresa solo números",
                                        "value": "[0-9]+"
                                    }
                                ]
                            },
                            {
                                "tag": "input",
                                "type": "text",
                                "label": "Dirección de la empresa",
                                "name": "address",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": "Cr 19 114 09",
                                "size": null,
                                "details": null,
                                "helpText": "",
                                "options": [],
                                "dependsOn": null,
                                "validators": [
                                    {
                                        "type": "required",
                                        "message": "Campo requerido"
                                    },
                                    {
                                        "type": "max",
                                        "message": "Ingresa máximo 50 caracteres",
                                        "value": "50"
                                    }
                                ]
                            },
                            {
                                "tag": "input",
                                "type": "date",
                                "label": "Fecha de constitución",
                                "name": "constitution_date",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": "2012-02-21T05:00:00.000Z",
                                "size": null,
                                "details": null,
                                "helpText": "",
                                "options": [],
                                "dependsOn": null,
                                "validators": [
                                    {
                                        "type": "required",
                                        "message": "Campo requerido"
                                    }
                                ]
                            },
                            {
                                "tag": "select",
                                "type": "select",
                                "label": "Empleados",
                                "name": "num_employees",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": 10,
                                "size": null,
                                "details": null,
                                "helpText": "",
                                "options": [
                                    {
                                        "key": 0,
                                        "value": "0"
                                    },
                                    {
                                        "key": 1,
                                        "value": "1"
                                    },
                                    {
                                        "key": 2,
                                        "value": "2"
                                    },
                                    {
                                        "key": 3,
                                        "value": "3"
                                    },
                                    {
                                        "key": 4,
                                        "value": "4"
                                    },
                                    {
                                        "key": 5,
                                        "value": "5"
                                    },
                                    {
                                        "key": 6,
                                        "value": "6"
                                    },
                                    {
                                        "key": 7,
                                        "value": "7"
                                    },
                                    {
                                        "key": 8,
                                        "value": "8"
                                    },
                                    {
                                        "key": 9,
                                        "value": "9"
                                    },
                                    {
                                        "key": 10,
                                        "value": "10+"
                                    }
                                ],
                                "dependsOn": null,
                                "validators": [
                                    {
                                        "type": "required",
                                        "message": "Campo requerido"
                                    }
                                ]
                            },
                            {
                                "tag": "input",
                                "type": "text",
                                "label": "Código CIIU",
                                "name": "codigo_ciiu",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": "4290",
                                "size": null,
                                "details": null,
                                "helpText": "",
                                "options": [],
                                "dependsOn": null,
                                "validators": [
                                    {
                                        "type": "required",
                                        "message": "Campo requerido"
                                    },
                                    {
                                        "type": "max",
                                        "message": "Ingresa un número de 4 dígitos",
                                        "value": "4"
                                    },
                                    {
                                        "type": "regex",
                                        "message": "Ingresa solo números",
                                        "value": "[0-9]*"
                                    },
                                    {
                                        "type": "min",
                                        "message": "Ingresa un número de 4 dígitos",
                                        "value": "4"
                                    }
                                ]
                            },
                            {
                                "tag": "select",
                                "type": "select",
                                "label": "¿En qué vas a usar el dinero?",
                                "name": "use",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": "ea61e252-dffc-4851-90a0-8f3f8579b49e",
                                "size": null,
                                "details": null,
                                "helpText": "",
                                "options": [
                                    {
                                        "key": "632361d2-bc15-4390-93f0-57f1140d829e",
                                        "value": "Campañas de marketing"
                                    },
                                    {
                                        "key": "936999e8-2951-4c9a-a663-6b13de3a1b28",
                                        "value": "Compra de computadores y/o software"
                                    }
                                ],
                                "dependsOn": null,
                                "validators": [
                                    {
                                        "type": "required",
                                        "message": "Campo requerido"
                                    }
                                ]
                            },
                            {
                                "tag": "select",
                                "type": "select",
                                "label": "¿Qué banco usarás con Aliatu?",
                                "name": "bank",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": "8b7c9c62-bceb-43f0-a646-2b43c21e364d",
                                "size": null,
                                "details": null,
                                "helpText": "",
                                "options": [
                                    {
                                        "key": "53e4da1a-8087-43b6-95a6-cf303fb7a261",
                                        "value": "si ves esto esta mal Bancolombia"
                                    },
                                    {
                                        "key": "5cee0fa4-3b91-490f-a9c2-2aae38fb05a4",
                                        "value": "Davivienda"
                                    }
                                ],
                                "dependsOn": null,
                                "validators": [
                                    {
                                        "type": "required",
                                        "message": "Campo requerido"
                                    }
                                ]
                            },
                            {
                                "tag": "input",
                                "type": "checkbox",
                                "label": "Represéntate legal de la empresa",
                                "name": "is_legal_representation",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": [
                                    1
                                ],
                                "size": 100,
                                "details": null,
                                "helpText": "",
                                "options": [
                                    {
                                        "key": 0,
                                        "value": "¿Eres el representate legal de la empresa?"
                                    }
                                ],
                                "dependsOn": null,
                                "validators": []
                            },
                            {
                                "tag": "input",
                                "type": "checkbox",
                                "label": "Accionista de la empresa",
                                "name": "accionista_de_la_empresa",
                                "prefix": null,
                                "currency": null,
                                "required": null,
                                "disabled": null,
                                "value": null,
                                "size": 100,
                                "details": null,
                                "helpText": "",
                                "options": [
                                    {
                                        "key": 0,
                                        "value": "¿Eres dueño del más de 49% de las acciones de la empresa?"
                                    }
                                ],
                                "dependsOn": null,
                                "validators": []
                            }
                        ]
                    }
                ]
            }
        }
```
#### 2. Guardar data Formularios

```POST /form-process```

Params 
```None```

Body

```
{
    "identification": "1101215524",
    "credit_request_uid": "1896930405",
    "application_uid_legacy": "1896930405",
    "form": {
        "informacion_empresa": {
            "razon_social": "EQUIPOS Y TERRATEST SAS",
            "nit_de_la_empresa": "900501552",
            "address": "Cr 19 114 09",
            "constitution_date": "2012-02-21T05:00:00.000Z",
            "num_employees": 10,
            "codigo_ciiu": "4290",
            "use": "ea61e252-dffc-4851-90a0-8f3f8579b49e",
            "spending_money": null,
            "bank": "8b7c9c62-bceb-43f0-a646-2b43c21e364d",
            "¿Eres el representate legal de la empresa?": [],
            "": [],
            "is_legal_representation": [
                1
            ],
            "is_owns": [
                1
            ]
        },
        "informacion_financiera": {
            "monthly_fees": "0",
            "monthly_income": "0",
            "monthly_expenses_paysheet": "25000000",
            "monthly_expenses_financial": "0",
            "other_expenses": "0",
            "monthly_sales": 1900000000,
            "monthly_other_income": 1,
            "monthly_expenses_sales": "30000000",
            "principales_clientes": [
                {
                    "main_client_name": "DISPETOCROM",
                    "main_client_doc": "999999999",
                    "main_client_sale": 300000000
                }
            ],
            "principales_proveedores": [
                {
                    "main_provider_name": "CEMEX",
                    "main_provider_doc": "999999999",
                    "main_provider_sale": 1500000000
                }
            ],
            "pagina_web": null,
            "linked_in": null,
            "facebook": null,
            "twitter": null,
            "instagram": null
        },
        "informacion_representante_legal": {
            "name": "JUAN ANTONIO",
            "last_name": "GARCIA GONZALEZ",
            "birthdate": "1969-06-11T05:00:00.000Z",
            "general_doc_type_id": "58db4e0d-8972-442f-a13b-0aecc909fbda",
            "doc_nro": "412647",
            "expedition_date": "2019-07-04T05:00:00.000Z",
            "gender": "3342bc37-7b02-4673-9035-d6318dfc123a",
            "estado_civil": "562792b8-5587-4dae-b53c-2d56b9a8c72e",
            "num_children": 2,
            "num_dependents": 2,
            "education_level": "258b4a6d-d469-4cc1-a381-a863a507a59f",
            "mobile_plan": "post",
            "correo_electronico": "jantonio-gg@terratest.com",
            "numero_de_celular": "3182754328",
            "address": "cll 114 19 50",
            "city": {
                "id": "8820b0e7-d6ea-4e6b-abcf-a89ec5a3717e",
                "general_state_id": "79698ac8-968b-48ee-8bd2-81f14ca3b367",
                "name": "Bogot\u00e1 D.C.",
                "code_dane": 11001,
                "value": "Bogot\u00e1 D.C.",
                "label": "Bogot\u00e1 D.C.",
                "key": "8820b0e7-d6ea-4e6b-abcf-a89ec5a3717e"
            },
            "estrato": 6,
            "city_code": "8820b0e7-d6ea-4e6b-abcf-a89ec5a3717e",
            "departament_code": "79698ac8-968b-48ee-8bd2-81f14ca3b367"
        }
    }
}
```

Response
```
{
    "success": true,
    "code": 0,
    "message": "OK",
    "data": {
        "error": true,
        "description": "Form has been created"
    }
}
```

### Documentos
#### 1. Listar Secciones

```GET /document/section/{slug}```

Params 
```None```

Body
```None```

Response
```
{
    "success": true,
    "code": 0,
    "locale": "es",
    "message": "OK",
    "data": [
        {
            "name": "pago-parafiscales",
            "slug": "pago-parafiscales",
            "min": 1,
            "max": 3,
            "order": 2,
            "file_size": 2,
            "extensions": "mimes:pdf,jpg,jpeg,bmp,xls,xlsx,csv|max:2",
            "product_uuid": "02c2fe97-4863-4958-8e01-ccc2c3bc9a39",
            "uuid": "b046184f-89ad-4318-976d-6168042494a0",
            "created_at": "2021-01-14 20:03:56.579000+00:00"
        }
    ]
}
```

#### 2. Cargar documentos

```POST /document/credit_request/{request}/section/{slug}/product/{product_uuid}/document/{nid}```

Params 
```None```

Body
Type : Form-data
```
files : file
```

Response
```
{
    "message": "OK",
    "data": "64fb28a7-2c37-4343-b095-28e17083e581",
    "code": 201
}
```
#### 3. Eliminar documento
```Delete /document/section/{slug}/document/{document_uuid}```

Body
```Type : Json```

```
```
Response

```
{
    "success": true,
    "code": 0,
    "message": "OK"
}

```
#### 4. Consultar Seccion por producto

```GET /document/section/product/{product_uuid}```

Params 
```None```

Body

```None```

Response
```
{
    "success": true,
    "code": 0,
    "locale": "es",
    "message": "OK",
    "data": [
        {
            "name": "declaracion-de-renta",
            "slug": "declaracion-de-renta",
            "min": 1,
            "max": 3,
            "order": 2,
            "file_size": 2,
            "extensions": "mimes:pdf,jpg,jpeg,bmp,xls,xlsx,csv|max:2",
            "product_uuid": "02c2fe97-4863-4958-8e01-ccc2c3bc9a39",
            "uuid": "942d5d22-7a87-47fb-944a-37e78cdee8c7",
            "created_at": "2021-01-14 20:03:16.505000+00:00"
        }
    ]
}
```

#### 5. Consultar Documentos Por Credit_request


```GET /document/credit_request/{credit_request}```

Params 
```None```

Body

```None```


Response

```
{
    "success": false,
    "code": 0,
    "message": "OK",
    "data": {
        "pago-parafiscales": {
            "name": "pago-parafiscales",
            "slug": "pago-parafiscales",
            "description": "",
            "credit_request": "1231232",
            "min": 1,
            "max": 3,
            "order": 2,
            "extensions": "mimes:pdf,jpg,jpeg,bmp,xls,xlsx,csv|max:2",
            "files": [
                {
                    "uuid": "dedb5af4-4bf8-40f7-8853-e81b5728a542",
                    "created_at": "2021-01-14T15:06:03.439000-05:00",
                    "tmp_url": "https://zinobe-test.s3.amazonaws.com/mytest-documents/aliatu/123555/1231232/pago-parafiscales/2021/1/14/200603_UD90Xhiu3qZXbLfJ.csv?AWSAccessKeyId=AKIARDM62DIAKVE7R6HI&Signature=2%2BKTveLAw6c8BlNfQNBYI51R1YU%3D&Expires=1610658492",
                    "original": "detail_v1.csv",
                    "size": "0.0"
                }
            ]
        }
    }
}
```


### Firma de Contrato

#### 1. Listar Documentos a Firmar


``` POST /document/credit_request/{credit_request}```

Params 
```None```

Body

```
{
    "product_uuid": "51a21fae-d2ec-4a74-b459-24d7186d1710",
    "renew": [],
    "application_uid": "2145374479",
    "contact_uuid": "508772da-8546-49a7-9153-4ada342885d7",
    "overwrite": {}
}
```

Response

```
{
    "process_id": "b5e236e7fb98daec6a728042d283876ee05f3603",
    "documents": [
        {
            "name": "f8ba746a-b692-4f6e-933c-e58837ebc75d",
            "description": "Contrato para crédito rotativo aliatu",
            "type": "contrato",
            "signed_at": null,
            "step": "view_document",
            "history_steps": [
                "view_document"
            ],
            "document": "https://zinobe-test.s3.amazonaws.com/templates/"
        },
        {
            "name": "a7bfeddb-af2b-4b11-af4a-01dca30d2895",
            "description": "Pagare + carta de instrucción + FNG",
            "type": "pagare",
            "signed_at": null,
            "step": "",
            "history_steps": [],
            "document": null
        }
    ]
}
```



#### 2. Generar Token


``` POST /signature/next_steps```

Params 
```None```

Body
```
{
    "process_id":  "5e95997d6c75c75a8d0367e44a79e772d478f75d",
    "document_template":"a7bfeddb-af2b-4b11-af4a-01dca30d2895",
    "contact_uuid": "d5371e70-7897-4363-a1a3-82204716cc57"
}
```

Response

```
{
    "success": true,
    "message": "Rquiere la validacion de los tokens",
    "data": {
        "endpoint": "token/validate",
        "method": "POST",
        "body": {
            "channels": [
                {
                    "channel": "sms",
                    "value_token": ""
                },
                {
                    "channel": "email",
                    "value_token": ""
                }
            ]
        },
        "step": "validation"
    }
}
```

#### 3. Validar Token


``` POST /signature/next_steps```

Params 
```None```

Body
```
{
    "process_id":  "5e95997d6c75c75a8d0367e44a79e772d478f75d",
    "document_template":"f8ba746a-b692-4f6e-933c-e58837ebc75d",
    "contact_uuid": "508772da-8546-49a7-9153-4ada342885d7",
    "channels": [
        {
            "channel": "sms",
            "value_token": "272587"
        },
        {
            "channel": "email",
            "value_token": "449578"
        }
    ]
}
```

Response

```
```
#### 2. Firmar Documento


``` POST /signature/next_steps```

Params 
```None```

Body
```
{
    "process_id":  "5e95997d6c75c75a8d0367e44a79e772d478f75d",
    "document_template":"a7bfeddb-af2b-4b11-af4a-01dca30d2895",
    "contact_uuid": "d5371e70-7897-4363-a1a3-82204716cc57"
}
```

Response

```
{
    "process_id": "b5e236e7fb98daec6a728042d283876ee05f3603",
    "documents": [
        {
            "name": "f8ba746a-b692-4f6e-933c-e58837ebc75d",
            "description": "Contrato para crédito rotativo aliatu",
            "type": "contrato",
            "signed_at": null,
            "step": "view_document",
            "history_steps": [
                "view_document"
            ],
            "document": "https://zinobe-test.s3.amazonaws.com/templates/8740eabe-4d6f-49b4-afac-593c9b00f5dc.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARDM62DIAFJACNW6Z%2F20201030%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20201030T134734Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=bf7f208ab2f035a74bd789372b2e365173ccb65ad15fa4d531b8b11b2415ed1d"
        },
        {
            "name": "a7bfeddb-af2b-4b11-af4a-01dca30d2895",
            "description": "Pagare + carta de instrucción + FNG",
            "type": "pagare",
            "signed_at": null,
            "step": "",
            "history_steps": [],
            "document": null
        }
    ]
}
```

### Biometria


#### 1. Consultar preguntas


``` GET /biometrics/origination/interview/questions```

Params 
```None```

Body
```None```

Response

```
{
    "success": true,
    "code": 0,
    "message": "questions of interview",
    "data": [
        {
            "text": "Cuentanos una historia de 3 minutos",
            "order": 4,
            "duration_time": 90
        },
        {
            "text": "cuentanos una historia de 2 minutos",
            "order": 3,
            "duration_time": 120
        },
        {
            "text": "Cuentanos una historia de 20 segundos",
            "order": 1,
            "duration_time": 20
        },
        {
            "text": "Cuentanos una historia de 1 min",
            "order": 2,
            "duration_time": 20
        },
        {
            "text": "Prueba",
            "order": 8,
            "duration_time": 20
        },
        {
            "text": "Prueba",
            "order": 5,
            "duration_time": 20
        },
        {
            "text": "Prueba",
            "order": 6,
            "duration_time": 20
        },
        {
            "text": "prueba",
            "order": 7,
            "duration_time": 20
        }
    ]
}
```


#### 2. Consultar parametricas
``` GET /biometrics/parametrics/{uuid_config}/{nombre_product}/{credit_request}/{doc_client}```

Params 
```None```

Body
```None```

Response
```
{
    "success": true,
    "code": 0,
    "message": "questions of interview",
    "data": {
        "config": [
            {
                "uuid": "e18b5f56-8d81-48e0-a106-f83e2d4b910e",
                "user": {
                    "first_name": "Edwarth",
                    "username": "edwarth.garcia"
                },
                "definition": "Pruebas Aliatu",
                "risk_model": {
                    "uuid": "ef844a1a-32bc-44d0-b8b6-0cdf0233d42a",
                    "name": "risk_model_test_1"
                },
                "configuration": {
                    "uuid": "e18b5f56-8d81-48e0-a106-f83e2d4b910e",
                    "name": "Test",
                    "document": true,
                    "selfie": true,
                    "liveness": false,
                    "interview": true,
                    "providers": "google"
                },
                "ruletoask": {
                    "uuid": "ef844a1a-32bc-44d0-b8b6-0cdf0233d42a",
                    "default": true,
                    "init": false,
                    "middle": false,
                    "end": false
                },
                "liveness": "happy"
            }
        ],
        "token": "13d52a69-15a7-4f84-ac82-93bbc4dfbab9"
    }
}
```

#### 3. Crear Liveness

``` POST /biometrics/liveness```

Params 
```None```

Body
Type : Form-data
```
--form 'location.country_code="CO"' \
--form 'location.country_name="Colombia"' \
--form 'location.city="Bogotá"' \
--form 'location.postal="111311"' \
--form 'location.ipv4="201.184.85.34"' \
--form 'location.state="Bogota D.C."' \
--form 'location.latitude="4.6492"' \
--form 'location.longitude="-74.0628"' \
--form 'location.browser=""' \
--form 'location.transaction="efabd88a-43c8-4998-992b-83df2b2c5889"' \
--form 'location.os="Windows"' \
--form 'recognition.age="31"' \
--form 'recognition.age_score="0"' \
--form 'recognition.emotion="happy"' \
--form 'recognition.emotion_score="1"' \
--form 'recognition.gender="male"' \
--form 'recognition.gender_score="0.9838500022888184"' \
--form 'recognition.similar_score="0"' \
--form 'recognition.similar="0"' \
--form 'recognition.transaction="efabd88a-43c8-4998-992b-83df2b2c5889"' \
--form 'media.path=" asdfsafd"' \
--form 'media.file=@"/home/zinobe/Downloads/small.mp4"' \
--form 'media.media_type="video"' \
--form 'media.moment="default"' \
--form 'media.transaction="efabd88a-43c8-4998-992b-83df2b2c5889"
```

Response
```
```

### Linea de Credito

#### 1. Crear Credit line

``` POST /credit-line/{uuid}/product/{product_uuid}```


Body
Type: Form-data

```
--form 'amount="100000"'
--form 'max_quotas_allowed="1"'
```

Response 

```  
{
    "record": {
        "uid": "1849123357"
    }
}
```

#### 2. Consultar Credit line

``` POST /credit-line/{uuid}/product/{product_uuid}```


Params

```
product=02c2fe97-4863-4958-8e01-ccc2c3bc9a39
credit_line=1896930405'

```

Body
```

```
Response

```json=
{
    "record": {
        "02c2fe97-4863-4958-8e01-ccc2c3bc9a39": {
            "amounts": [
                {
                    "amountAllowed": 100000.0,
                    "amountEnabled": 100000.0,
                    "base": 100000.0,
                    "balance": 0.0
                }
            ],
            "credit_line": 106000481510,
            "is_active": true,
            "is_blocked": false,
            "line_state": {
                "id": 1,
                "state": "allowed"
            },
            "max_quotas_allowed": 1
        }
    }
}
```



