Consultar estado AML 
Recupera el estado más reciente y la evaluación de riesgo de una verificación AML existente. Los datos se actualizan cuando hay nueva información disponible.
POST /v1/aml-checks/check
Solicitud 
Parámetros 
| Campo | Tipo | Requerido | Descripción | 
|---|---|---|---|
| id | string | Sí | Identificador de la verificación AML | 
bash
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{
  "id": "01jq7h6bvf6p5t1amnz6y3n8c4"
}'
# Calcular firma
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)
# Realizar solicitud a la API
curl -X POST "https://api.tronzap.com/v1/aml-checks/check" \
  -H "Authorization: Bearer ${API_TOKEN}" \
  -H "X-Signature: ${SIGNATURE}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}"javascript
const crypto = require('crypto');
const axios = require('axios');
const apiToken = 'your_api_token';
const apiSecret = 'your_api_secret';
const requestBody = JSON.stringify({
  id: '01jq7h6bvf6p5t1amnz6y3n8c4'
});
// Calcular firma
const signature = crypto
  .createHash('sha256')
  .update(requestBody + apiSecret)
  .digest('hex');
// Realizar solicitud a la API
axios({
  method: 'post',
  url: 'https://api.tronzap.com/v1/aml-checks/check',
  headers: {
    'Authorization': `Bearer ${apiToken}`,
    'X-Signature': signature,
    'Content-Type': 'application/json'
  },
  data: requestBody
})
.then(response => console.log(response.data))
.catch(error => console.error(error));php
<?php
$apiToken = 'your_api_token';
$apiSecret = 'your_api_secret';
$requestBody = json_encode([
  'id' => '01jq7h6bvf6p5t1amnz6y3n8c4'
]);
// Calcular firma
$signature = hash('sha256', $requestBody . $apiSecret);
// Realizar solicitud a la API
$ch = curl_init('https://api.tronzap.com/v1/aml-checks/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $requestBody);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Authorization: Bearer ' . $apiToken,
  'X-Signature: ' . $signature,
  'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>python
import hashlib
import json
import requests
api_token = 'your_api_token'
api_secret = 'your_api_secret'
request_body = json.dumps({
  'id': '01jq7h6bvf6p5t1amnz6y3n8c4'
})
# Calcular firma
signature = hashlib.sha256((request_body + api_secret).encode()).hexdigest()
# Realizar solicitud a la API
headers = {
  'Authorization': f'Bearer {api_token}',
  'X-Signature': signature,
  'Content-Type': 'application/json'
}
response = requests.post(
  'https://api.tronzap.com/v1/aml-checks/check',
  headers=headers,
  data=request_body
)
print(response.json())Respuesta 
Devuelve los datos de la verificación AML con la información de riesgo más reciente. Si la verificación continúa en curso, el estado permanece en pending o processing.
Campos de la respuesta 
| Campo | Tipo | Descripción | 
|---|---|---|
| code | integer | Código de respuesta (0 = éxito) | 
| result | object | Datos de la verificación AML | 
| result.id | string | Identificador de la verificación AML | 
| result.type | string | Tipo de servicio AML (address o hash) | 
| result.address | string | Dirección analizada | 
| result.hash | string | Hash analizado (solo para hashes) | 
| result.direction | string | Dirección de la transacción cuando aplica | 
| result.network | string | Código de red blockchain | 
| result.status | string | Estado actual (pending, processing, completed, failed) | 
| result.risk_score | float | Puntaje de riesgo | 
| result.risk_level | string | Nivel de riesgo textual (low, medium, high) | 
| result.blacklist | boolean | Indica si hay coincidencia con listas negras | 
| result.risk_factors | array | Conjunto de factores de riesgo | 
| result.checked_at | string | Marca temporal de creación de la verificación (ISO 8601) | 
Ejemplo de respuesta 
json
{
  "code": 0,
  "result": {
    "id": "01jq7h6bvf6p5t1amnz6y3n8c4",
    "type": "hash",
    "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
    "hash": "E3F2A1B66DBB9F0B24C4125229163944A7D91EB3F1AC5E409FFCEE0C81A913F2",
    "direction": "withdrawal",
    "network": "BTC",
    "status": "processing",
    "risk_score": null,
    "risk_level": null,
    "blacklist": false,
    "risk_factors": [
      {
        "name": "p2p_exchange_mlrisk_high",
        "label": "P2P Exchange (High Risk)",
        "group": "medium",
        "score": 0.796
      },
      {
        "name": "exchange",
        "label": "Exchange",
        "group": "low",
        "score": 0.203
      }
    ],
    "checked_at": "2024-03-25T10:42:12Z"
  }
}Posibles errores 
| Código de error | Descripción | 
|---|---|
| 1 | Error de autenticación (token o firma incorrectos) | 
| 2 | Parámetros inválidos | 
| 30 | Verificación AML no encontrada | 
| 500 | Error interno del servidor | 
