enrollment
curl --request POST \
--url https://nufi.azure-api.net/kyb/enrollment/v1/url \
--header 'Content-Type: application/json' \
--header 'NUFI-API-KEY: <nufi-api-key>' \
--header 'X-Workspace: <x-workspace>' \
--data '
{
"DocumentId": "eaeea393-81db-4269-9dcc-ede8669f2ecf",
"PersonId": "7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e",
"AgentMail": "ejecutivo@correo.com"
}
'import requests
url = "https://nufi.azure-api.net/kyb/enrollment/v1/url"
payload = {
"DocumentId": "eaeea393-81db-4269-9dcc-ede8669f2ecf",
"PersonId": "7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e",
"AgentMail": "ejecutivo@correo.com"
}
headers = {
"NUFI-API-KEY": "<nufi-api-key>",
"X-Workspace": "<x-workspace>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'NUFI-API-KEY': '<nufi-api-key>',
'X-Workspace': '<x-workspace>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
DocumentId: 'eaeea393-81db-4269-9dcc-ede8669f2ecf',
PersonId: '7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e',
AgentMail: 'ejecutivo@correo.com'
})
};
fetch('https://nufi.azure-api.net/kyb/enrollment/v1/url', 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://nufi.azure-api.net/kyb/enrollment/v1/url",
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([
'DocumentId' => 'eaeea393-81db-4269-9dcc-ede8669f2ecf',
'PersonId' => '7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e',
'AgentMail' => 'ejecutivo@correo.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"NUFI-API-KEY: <nufi-api-key>",
"X-Workspace: <x-workspace>"
],
]);
$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://nufi.azure-api.net/kyb/enrollment/v1/url"
payload := strings.NewReader("{\n \"DocumentId\": \"eaeea393-81db-4269-9dcc-ede8669f2ecf\",\n \"PersonId\": \"7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e\",\n \"AgentMail\": \"ejecutivo@correo.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("NUFI-API-KEY", "<nufi-api-key>")
req.Header.Add("X-Workspace", "<x-workspace>")
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://nufi.azure-api.net/kyb/enrollment/v1/url")
.header("NUFI-API-KEY", "<nufi-api-key>")
.header("X-Workspace", "<x-workspace>")
.header("Content-Type", "application/json")
.body("{\n \"DocumentId\": \"eaeea393-81db-4269-9dcc-ede8669f2ecf\",\n \"PersonId\": \"7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e\",\n \"AgentMail\": \"ejecutivo@correo.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nufi.azure-api.net/kyb/enrollment/v1/url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["NUFI-API-KEY"] = '<nufi-api-key>'
request["X-Workspace"] = '<x-workspace>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"DocumentId\": \"eaeea393-81db-4269-9dcc-ede8669f2ecf\",\n \"PersonId\": \"7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e\",\n \"AgentMail\": \"ejecutivo@correo.com\"\n}"
response = http.request(request)
puts response.read_body{
"Code": 200,
"Status": "Success",
"Message": "Enrolamiento generado",
"Data": {
"Id": "2b0db6c2-9e1d-4a4b-8a4b-5a7b7d9b6c3f",
"EnrollmentUrl": "https://oam.institucional.com:5442/AbeWeb#/firstStepOrq?data=sample"
}
}{
"Code": 400,
"Status": "bad_request",
"Message": "Error de validacion",
"Data": [
"El campo DocumentId es obligatorio",
"El campo PersonId es obligatorio",
"El campo AgentMail es obligatorio",
"El DocumentId no es válido.",
"El PersonId no es válido.",
"El AgentMail no es válido."
]
}{
"code": 401,
"status": "forbidden",
"message": "La API Key ha sido denegada, asegurate de mandar una API Key valida y con una suscripción activa",
"data": null
}{
"Code": 403,
"Status": "forbidden",
"Message": "El ID de Workspace no es válido o no está activo",
"Data": null
}{
"Code": 403,
"Status": "not_allowed",
"Message": "Enrolamiento no permitido",
"Data": null
}Endpoints
Enrolamiento
POST
/
enrollment
/
v1
/
url
enrollment
curl --request POST \
--url https://nufi.azure-api.net/kyb/enrollment/v1/url \
--header 'Content-Type: application/json' \
--header 'NUFI-API-KEY: <nufi-api-key>' \
--header 'X-Workspace: <x-workspace>' \
--data '
{
"DocumentId": "eaeea393-81db-4269-9dcc-ede8669f2ecf",
"PersonId": "7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e",
"AgentMail": "ejecutivo@correo.com"
}
'import requests
url = "https://nufi.azure-api.net/kyb/enrollment/v1/url"
payload = {
"DocumentId": "eaeea393-81db-4269-9dcc-ede8669f2ecf",
"PersonId": "7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e",
"AgentMail": "ejecutivo@correo.com"
}
headers = {
"NUFI-API-KEY": "<nufi-api-key>",
"X-Workspace": "<x-workspace>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'NUFI-API-KEY': '<nufi-api-key>',
'X-Workspace': '<x-workspace>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
DocumentId: 'eaeea393-81db-4269-9dcc-ede8669f2ecf',
PersonId: '7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e',
AgentMail: 'ejecutivo@correo.com'
})
};
fetch('https://nufi.azure-api.net/kyb/enrollment/v1/url', 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://nufi.azure-api.net/kyb/enrollment/v1/url",
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([
'DocumentId' => 'eaeea393-81db-4269-9dcc-ede8669f2ecf',
'PersonId' => '7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e',
'AgentMail' => 'ejecutivo@correo.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"NUFI-API-KEY: <nufi-api-key>",
"X-Workspace: <x-workspace>"
],
]);
$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://nufi.azure-api.net/kyb/enrollment/v1/url"
payload := strings.NewReader("{\n \"DocumentId\": \"eaeea393-81db-4269-9dcc-ede8669f2ecf\",\n \"PersonId\": \"7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e\",\n \"AgentMail\": \"ejecutivo@correo.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("NUFI-API-KEY", "<nufi-api-key>")
req.Header.Add("X-Workspace", "<x-workspace>")
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://nufi.azure-api.net/kyb/enrollment/v1/url")
.header("NUFI-API-KEY", "<nufi-api-key>")
.header("X-Workspace", "<x-workspace>")
.header("Content-Type", "application/json")
.body("{\n \"DocumentId\": \"eaeea393-81db-4269-9dcc-ede8669f2ecf\",\n \"PersonId\": \"7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e\",\n \"AgentMail\": \"ejecutivo@correo.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nufi.azure-api.net/kyb/enrollment/v1/url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["NUFI-API-KEY"] = '<nufi-api-key>'
request["X-Workspace"] = '<x-workspace>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"DocumentId\": \"eaeea393-81db-4269-9dcc-ede8669f2ecf\",\n \"PersonId\": \"7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e\",\n \"AgentMail\": \"ejecutivo@correo.com\"\n}"
response = http.request(request)
puts response.read_body{
"Code": 200,
"Status": "Success",
"Message": "Enrolamiento generado",
"Data": {
"Id": "2b0db6c2-9e1d-4a4b-8a4b-5a7b7d9b6c3f",
"EnrollmentUrl": "https://oam.institucional.com:5442/AbeWeb#/firstStepOrq?data=sample"
}
}{
"Code": 400,
"Status": "bad_request",
"Message": "Error de validacion",
"Data": [
"El campo DocumentId es obligatorio",
"El campo PersonId es obligatorio",
"El campo AgentMail es obligatorio",
"El DocumentId no es válido.",
"El PersonId no es válido.",
"El AgentMail no es válido."
]
}{
"code": 401,
"status": "forbidden",
"message": "La API Key ha sido denegada, asegurate de mandar una API Key valida y con una suscripción activa",
"data": null
}{
"Code": 403,
"Status": "forbidden",
"Message": "El ID de Workspace no es válido o no está activo",
"Data": null
}{
"Code": 403,
"Status": "not_allowed",
"Message": "Enrolamiento no permitido",
"Data": null
}Generar un enlace de enrolamiento para que el ejecutivo pueda detonarlo.
Objetivo
Este endpoint permite crear una URL de enrolamiento por persona dentro de un expediente existente, para iniciar el proceso desde el canal de atención (por ejemplo, Microsoft Teams).¿Cuándo usarlo?
Úsalo cuando:- Ya cuentas con un
DocumentIdválido del expediente. - Ya identificaste a la persona (
PersonId) que debe completar su enrolamiento. - En la petición de
tracking, el campoIsEnrollmentAllowedestrue.
Datos requeridos
La petición requiere:DocumentId: identificador del expediente.PersonId: identificador de la persona a enrolar.AgentMail: correo del ejecutivo que dispara la acción.
{
"DocumentId": "eaeea393-81db-4269-9dcc-ede8669f2ecf",
"PersonId": "7c1cf3c0-9c2c-4c66-9b34-6b5f4c6c9a1e",
"AgentMail": "ejecutivo@correo.com"
}
Respuesta esperada (200)
Cuando la operación es exitosa, se devuelve un objeto con:Code: código de resultado interno.Status: estado general de la operación.Message: mensaje descriptivo.Data.Id: identificador del registro generado.Data.EnrollmentUrl: URL de enrolamiento lista para compartirse con el ejecutivo.
{
"Code": 200,
"Status": "Success",
"Message": "Enrolamiento generado",
"Data": {
"Id": "2b0db6c2-9e1d-4a4b-8a4b-5a7b7d9b6c3f",
"EnrollmentUrl": "https://oam.institucional.com:5442/AbeWeb#/firstStepOrq?data=..."
}
}
Posibles respuestas de error
| Código | Escenario | Descripción |
|---|---|---|
| 400 | Validación | Faltan campos requeridos o formato inválido (DocumentId, PersonId, AgentMail). |
| 401 | Autenticación | API Key inválida o sin suscripción activa. |
| 403 | Autorización | Workspace inválido o inactivo. |
| 404 | Regla de negocio | Enrolamiento no permitido para la persona/expediente. |
Recomendación operativa
Después de generarEnrollmentUrl, compártela de inmediato al ejecutivo y registra el seguimiento con el endpoint de tracking para monitorear el avance del enrolamiento.Was this page helpful?
⌘I
.png?fit=max&auto=format&n=SrFWYqQUIKuRmdvu&q=85&s=29a9d6074794b17ba1b2d2cd5d208849)