Gerar TokenOnboarding para SDK
curl --request POST \
--url https://backoffice-hml.idcerberus.com/api/token-history-onboarding \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document": "cpf",
"cpf": "cpf",
"cnpj": "cnpj",
"name": "name",
"documentFiles": [
{
"documentFileType": "OTHER",
"document": "data:image/jpeg;base64",
"documentUrl": "url"
}
]
}
'import requests
url = "https://backoffice-hml.idcerberus.com/api/token-history-onboarding"
payload = {
"document": "cpf",
"cpf": "cpf",
"cnpj": "cnpj",
"name": "name",
"documentFiles": [
{
"documentFileType": "OTHER",
"document": "data:image/jpeg;base64",
"documentUrl": "url"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document: 'cpf',
cpf: 'cpf',
cnpj: 'cnpj',
name: 'name',
documentFiles: [
{
documentFileType: 'OTHER',
document: 'data:image/jpeg;base64',
documentUrl: 'url'
}
]
})
};
fetch('https://backoffice-hml.idcerberus.com/api/token-history-onboarding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://backoffice-hml.idcerberus.com/api/token-history-onboarding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'document' => 'cpf',
'cpf' => 'cpf',
'cnpj' => 'cnpj',
'name' => 'name',
'documentFiles' => [
[
'documentFileType' => 'OTHER',
'document' => 'data:image/jpeg;base64',
'documentUrl' => 'url'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://backoffice-hml.idcerberus.com/api/token-history-onboarding"
payload := strings.NewReader("{\n \"document\": \"cpf\",\n \"cpf\": \"cpf\",\n \"cnpj\": \"cnpj\",\n \"name\": \"name\",\n \"documentFiles\": [\n {\n \"documentFileType\": \"OTHER\",\n \"document\": \"data:image/jpeg;base64\",\n \"documentUrl\": \"url\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://backoffice-hml.idcerberus.com/api/token-history-onboarding")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document\": \"cpf\",\n \"cpf\": \"cpf\",\n \"cnpj\": \"cnpj\",\n \"name\": \"name\",\n \"documentFiles\": [\n {\n \"documentFileType\": \"OTHER\",\n \"document\": \"data:image/jpeg;base64\",\n \"documentUrl\": \"url\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backoffice-hml.idcerberus.com/api/token-history-onboarding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"document\": \"cpf\",\n \"cpf\": \"cpf\",\n \"cnpj\": \"cnpj\",\n \"name\": \"name\",\n \"documentFiles\": [\n {\n \"documentFileType\": \"OTHER\",\n \"document\": \"data:image/jpeg;base64\",\n \"documentUrl\": \"url\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"tokenOnboarding": "56950dae-2d19-4092-a918-a612b3ca8f68",
"dateHourProcess": "2023-02-17T16:49:41.577Z"
}{
"status": {
"code": 400,
"message": "Failed to fetch information"
}
}{
"status": {
"code": 401,
"message": "Unauthorized"
}
}{
"status": {
"code": 403,
"message": "Forbidden"
}
}Integração via SDK
Gerar TokenOnboarding para SDK
Cria um novo tokenOnboarding para iniciar um fluxo de cadastro via SDK.
O token gerado deve ser entregue ao SDK e será usado posteriormente para consultar o resultado processado pelo backoffice e baixar o relatório em PDF.
Use documentFiles quando quiser enviar documentos ou URLs de arquivos
já no início do processo.
POST
/
api
/
token-history-onboarding
Gerar TokenOnboarding para SDK
curl --request POST \
--url https://backoffice-hml.idcerberus.com/api/token-history-onboarding \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document": "cpf",
"cpf": "cpf",
"cnpj": "cnpj",
"name": "name",
"documentFiles": [
{
"documentFileType": "OTHER",
"document": "data:image/jpeg;base64",
"documentUrl": "url"
}
]
}
'import requests
url = "https://backoffice-hml.idcerberus.com/api/token-history-onboarding"
payload = {
"document": "cpf",
"cpf": "cpf",
"cnpj": "cnpj",
"name": "name",
"documentFiles": [
{
"documentFileType": "OTHER",
"document": "data:image/jpeg;base64",
"documentUrl": "url"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document: 'cpf',
cpf: 'cpf',
cnpj: 'cnpj',
name: 'name',
documentFiles: [
{
documentFileType: 'OTHER',
document: 'data:image/jpeg;base64',
documentUrl: 'url'
}
]
})
};
fetch('https://backoffice-hml.idcerberus.com/api/token-history-onboarding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://backoffice-hml.idcerberus.com/api/token-history-onboarding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'document' => 'cpf',
'cpf' => 'cpf',
'cnpj' => 'cnpj',
'name' => 'name',
'documentFiles' => [
[
'documentFileType' => 'OTHER',
'document' => 'data:image/jpeg;base64',
'documentUrl' => 'url'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://backoffice-hml.idcerberus.com/api/token-history-onboarding"
payload := strings.NewReader("{\n \"document\": \"cpf\",\n \"cpf\": \"cpf\",\n \"cnpj\": \"cnpj\",\n \"name\": \"name\",\n \"documentFiles\": [\n {\n \"documentFileType\": \"OTHER\",\n \"document\": \"data:image/jpeg;base64\",\n \"documentUrl\": \"url\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://backoffice-hml.idcerberus.com/api/token-history-onboarding")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document\": \"cpf\",\n \"cpf\": \"cpf\",\n \"cnpj\": \"cnpj\",\n \"name\": \"name\",\n \"documentFiles\": [\n {\n \"documentFileType\": \"OTHER\",\n \"document\": \"data:image/jpeg;base64\",\n \"documentUrl\": \"url\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backoffice-hml.idcerberus.com/api/token-history-onboarding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"document\": \"cpf\",\n \"cpf\": \"cpf\",\n \"cnpj\": \"cnpj\",\n \"name\": \"name\",\n \"documentFiles\": [\n {\n \"documentFileType\": \"OTHER\",\n \"document\": \"data:image/jpeg;base64\",\n \"documentUrl\": \"url\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"tokenOnboarding": "56950dae-2d19-4092-a918-a612b3ca8f68",
"dateHourProcess": "2023-02-17T16:49:41.577Z"
}{
"status": {
"code": 400,
"message": "Failed to fetch information"
}
}{
"status": {
"code": 401,
"message": "Unauthorized"
}
}{
"status": {
"code": 403,
"message": "Forbidden"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Informe os dados iniciais do usuário e, quando aplicável, arquivos ou URLs de documentos que devem ser vinculados ao onboarding.
⌘I
