In this section, you will find examples of CreateProcess requests in Unico
{
"callbackUri": "/path/to/url",
"flow": "idlive",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "Luke Skywalker",
"phone": "5511974749090",
"email": "luke@unico.io",
"notifications":
[
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_SMS"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_EMAIL"
}
]
},
"purpose": "biometryonboarding",
"expiresIn": "3600s"
}
{
"callbackUri": "/path/to/url",
"flow": "id",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "Luke Skywalker",
"phone": "5511974749090",
"email": "luke@unico.io",
"notifications":
[
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_SMS"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_EMAIL"
}
]
},
"purpose": "biometryonboarding",
"expiresIn": "3600s"
}
{
"callbackUri": "/path/to/url",
"flow": "idcheck",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "Luke Skywalker",
"phone": "5511974749090",
"email": "luke@unico.io",
"notifications":
[
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_SMS"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_EMAIL"
}
]
},
"purpose": "biometryonboarding",
"expiresIn": "3600s"
}
{
"callbackUri": "/path/to/url",
"flow": "iddocs",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "Luke Skywalker",
"phone": "5511974749090",
"email": "luke@unico.io",
"notifications":
[
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_SMS"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_EMAIL"
}
]
},
},
"purpose": "biometryonboarding",
"expiresIn": "3600s"
}
{
"callbackUri": "/path/to/url",
"flow": "idsign",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "Luke Skywalker",
"phone": "5511974749090",
"email": "luke@unico.io",
"notifications":
[
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_SMS"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_EMAIL"
}
]
},
"purpose": "biometryonboarding",
"expiresIn": "3600s",
"payload": [
{
"envelopePayload": {
"documents": [
{
"documentName": "teste",
"fileContents": "JVBERi0xLjMNCiXi48/[...]DKJSVFT0YNCg=="
}
]
}
}
]
}
{
"callbackUri": "/path/to/url",
"flow": "iddocssign",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074"
"friendlyName": "Luke Skywalker",
"phone": "5511974749090",
"email": "luke@unico.io",
"notifications":
[
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_SMS"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_EMAIL"
}
]
},
"purpose": "biometryonboarding",
"expiresIn": "3600s",
"payload": [
{
"envelopePayload": {
"documents": [
{
"documentName": "teste",
"fileContents": "JVBERi0xLjMNCiXi48/[...]xNA0KJSVFT0YNCg=="
}
]
}
}
]
}
{
"callbackUri": "/path/to/url",
"flow": "idcheckscore",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "Luke Skywalker",
"phone": "5511974749090",
"email": "luke@unico.io",
"notifications":
[
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_SMS"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_EMAIL"
}
]
},
"purpose": "biometryonboarding",
"expiresIn": "3600s"
}
{
"callbackUri": "/path/to/url",
"flow": "idtoken",
"bioTokenId": "339f9225-6f09-4303-9688-bf35944787e1",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074"
"friendlyName": "Luke Skywalker",
"phone": "5511974749090",
"email": "luke@unico.io",
"notifications":
[
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_SMS"
},
{
"notificationChannel": "NOTIFICATION_CHANNEL_EMAIL"
}
]
},
"purpose": "biometryonboarding",
"expiresIn": "3600s"
}
For detailed verification of the API parameters, please refer to the Parameters Specification section.
curl -X 'POST' \
'https://api.cadastro.uat.unico.app/client/v1/process/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}'
-d '{
"callbackUri": "/",
"flow": "id",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "John Doe"
},
"purpose": "creditprocess"
}'
To use Postman, follow these steps:
Select the POST method.
Enter the URL https://api.cadastro.uat.unico.app/client/v1/process/
.
Select the Authorization tab.
From the Type dropdown list, choose Bearer Token.
Enter the obtained token in the Token field with the prefix Bearer.
Select the Body tab and enter the data below according to your requirements.
{
"callbackUri": "/paht/callback-url",
"flow": "id",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074",
"friendlyName": "John Doe"
},
"purpose": "creditprocess"
}
const axios = require("axios");
const apiUrl = "https://api.cadastro.uat.unico.app/client/v1/process/";
const token = "<YOUR_TOKEN_HERE>";
const requestData = {
callbackUri: "/path/to/url",
flow: "id",
person: {
duiType: "DUI_TYPE_BR_CPF",
duiValue: "73689290074",
friendlyName: "John Doe",
},
purpose: "creditprocess",
};
const headers = {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
accept: "application/json",
};
axios
.post(apiUrl, requestData, { headers })
.then((response) => {
console.log("Resposta da API:", response.data);
})
.catch((error) => {
console.error("Erro:", error);
});
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.HashMap;
import java.util.Map;
public class Main {
public static void main(String[] args) {
String apiUrl = "https://api.cadastro.uat.unico.app/client/v1/process/";
String token = "<YOUR_TOKEN_HERE>";
// Crie o corpo da solicitação em formato JSON
String requestBody = "{\"callbackUri\":\"/\",\"flow\":\"id\",\"person\":{\"duiType\":\"DUI_TYPE_BR_CPF\",\"duiValue\":\"73689290074\"},\"purpose\":\"creditprocess\"}";
// Configure os cabeçalhos da solicitação
Map<String, String> headers = new HashMap<>();
headers.put("Content-Type", "application/json");
headers.put("Authorization", "Bearer " + token);
headers.put("accept", "application/json");
// Crie a instância do HttpClient
HttpClient httpClient = HttpClient.newBuilder().build();
// Crie a solicitação HTTP POST
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(apiUrl))
.headers(headers.entrySet().stream()
.map(e -> e.getKey() + ":" + e.getValue())
.toArray(String[]::new))
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
try {
// Envie a solicitação e obtenha a resposta
HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
// Exiba a resposta da API
System.out.println("Status da resposta: " + response.statusCode());
System.out.println("Corpo da resposta: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
}
}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string apiUrl = "https://api.cadastro.uat.unico.app/client/v1/process/";
string token = "<YOUR_TOKEN_HERE>";
string requestBody = "{\"callbackUri\":\"/\",\"flow\":\"id\",\"person\":{\"duiType\":\"DUI_TYPE_BR_CPF\",\"duiValue\":\"73689290074\"},\"purpose\":\"creditprocess\"}";
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);
client.DefaultRequestHeaders.Add("accept", "application/json");
try
{
HttpResponseMessage response = await client.PostAsync(apiUrl, new StringContent(requestBody, Encoding.UTF8, "application/json"));
if (response.IsSuccessStatusCode)
{
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine("Status da resposta: " + response.StatusCode);
Console.WriteLine("Corpo da resposta: " + responseBody);
}
else
{
Console.WriteLine("Erro na solicitação. Status da resposta: " + response.StatusCode);
}
}
catch (Exception e)
{
Console.WriteLine("Erro: " + e.Message);
}
}
}
package main
import (
"bytes"
"fmt"
"net/http"
)
func main() {
apiURL := "https://api.cadastro.uat.unico.app/client/v1/process/"
token := "<YOUR_TOKEN_HERE>";
// Crie o corpo da solicitação em formato JSON
requestBody := []byte(`{
"callbackUri": "/path/to/url",
"flow": "id",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "73689290074"
},
"purpose": "creditprocess"
}`)
// Crie um cliente HTTP
client := &http.Client{}
// Crie uma solicitação HTTP POST
req, err := http.NewRequest("POST", apiURL, bytes.NewBuffer(requestBody))
if err != nil {
fmt.Println("Erro ao criar a solicitação HTTP:", err)
return
}
// Defina os cabeçalhos da solicitação
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("accept", "application/json")
// Faça a solicitação HTTP
resp, err := client.Do(req)
if err != nil {
fmt.Println("Erro ao fazer a solicitação HTTP:", err)
return
}
defer resp.Body.Close()
// Verifique o status da resposta
if resp.StatusCode == http.StatusOK {
// Leitura do corpo da resposta
var responseBody []byte
_, err := resp.Body.Read(responseBody)
if err != nil {
fmt.Println("Erro ao ler o corpo da resposta:", err)
return
}
fmt.Println("Status da resposta:", resp.Status)
fmt.Println("Corpo da resposta:", string(responseBody))
} else {
fmt.Println("Erro na solicitação. Status da resposta:", resp.Status)
}
}
Still need help?
Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.