Generar Link de Aprobación
POST
Genera un enlace seguro efímero para revisión de cliente (1-Clic por WhatsApp/Email).
Ejemplos de Código Multilenguaje
curl -X POST https://telaruma.com/api/v1/approvals.cfc?method=generate_link \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brandId": 101,
"entityId": 505,
"expiresDays": 14
}'
const res = await fetch('https://telaruma.com/api/v1/approvals.cfc?method=generate_link', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
brandId: 101,
entityId: 505,
expiresDays: 14
})
});
const data = await res.json();
console.log(data);
var http = new Http();
http.setMethod("POST");
http.setUrl("https://telaruma.com/api/v1/approvals.cfc?method=generate_link");
http.addParam(type="header", name="Authorization", value="Bearer YOUR_API_KEY");
http.addParam(type="header", name="Content-Type", value="application/json");
http.addParam(type="body", value=serializeJson({
"brandId": 101,
"entityId": 505,
"expiresDays": 14
}));
var result = deserializeJson(http.send().getPrefix().fileContent);
writeDump(result);
import requests
url = 'https://telaruma.com/api/v1/approvals.cfc?method=generate_link'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
payload = {
'brandId': 101,
'entityId': 505,
'expiresDays': 14
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
<?php
$ch = curl_init('https://telaruma.com/api/v1/approvals.cfc?method=generate_link');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'brandId' => 101,
'entityId' => 505,
'expiresDays' => 14
])
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);