Actualizar nivel de riesgo del perfil de inversión
Actualiza el nivel de riesgo del perfil de inversión de un cliente.
PUT
/v1/broker/investment-profile/update/risk-levelRequest
Headers
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
Authorization | string | Sí | Token de acceso en formato Bearer ACCESS_TOKEN |
Content-Type | string | Sí | Debe ser application/json |
No aplica: Path Parameters, Query Parameters.
Body
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
account_id | integer | Sí | Identificador de la cuenta. |
risk_level | string | Sí | Nuevo nivel de riesgo a asignar al cliente. Valores posibles: LOW, MEDIUM, HIGH. |
Response
2XX Éxito
| Campo | Tipo | Descripción |
|---|---|---|
account_id | integer | Identificador de la cuenta. |
risk_level | string | Nivel de riesgo actualizado. Valores posibles: LOW, MEDIUM, HIGH. |
Códigos de error
| Status | Descripción |
|---|---|
400 | Bad Request — parámetros inválidos o faltantes |
401 | Unauthorized — token de acceso inválido o faltante |
403 | Forbidden — el token no tiene permiso para acceder a este recurso |
404 | Not Found — la cuenta no existe |
500 | Internal Server Error |
Estructura del error:
{
"code": "NOT_FOUND",
"description": "Resource not found"
}
Ejemplo de código
- cURL
- JavaScript
- Python
- Node.js
curl -X PUT https://b2b.allaria.dev/v1/broker/investment-profile/update/risk-level \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"account_id": 12345,
"risk_level": "HIGH"
}'
const response = await fetch(
'https://b2b.allaria.dev/v1/broker/investment-profile/update/risk-level',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: 12345,
risk_level: 'HIGH'
})
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.put(
'https://b2b.allaria.dev/v1/broker/investment-profile/update/risk-level',
headers={
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
json={
'account_id': 12345,
'risk_level': 'HIGH'
}
)
data = response.json()
print(data)
const axios = require('axios');
const response = await axios.put(
'https://b2b.allaria.dev/v1/broker/investment-profile/update/risk-level',
{
account_id: 12345,
risk_level: 'HIGH'
},
{
headers: {
Authorization: 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
}
}
);
console.log(response.data);
2XX Éxito
{
"account_id": 12345,
"risk_level": "HIGH"
}