Recordar a quien no ha respondido
https://api.afer.pro/api/v1/forms/{id}/reminders
POST https://api.afer.pro/api/v1/forms/{formularioId}/reminders
Un correo de recordatorio a quien tiene su enlace y aún no ha respondido.
A los enlaces personales sin responder y, en los formularios de empresa, a la plantilla que no ha respondido. Como mucho uno al día por persona. En dos pasos: sin confirmar dice a quién; con confirmar = true, envía.
Envía tus claves API en las cabeceras X-API-KEY y X-API-SECRET. La cuenta sobre la que se opera se resuelve automáticamente a partir de la clave. Cómo obtener tus claves →
Este endpoint requiere autenticación. La empresa tiene que tener el módulo de formularios activado (si no, 403). A nombre de una persona, como en el panel: administración y RRHH; los confidenciales, solo RRHH y quien los creó.
Parámetros del cuerpo
El cuerpo de la petición es un objeto JSON con Content-Type: application/json.
formularioIdstringobligatorio | El formulario (abierto). |
confirmarboolopcional | Envía. |
Ejemplo de petición
curl -X POST 'https://api.afer.pro/api/v1/forms/aBc123XyZ/reminders' \
-H 'X-API-KEY: afer_tk_TU_TOKEN' \
-H 'X-API-SECRET: afer_sk_TU_SECRET' \
-H 'Content-Type: application/json' \
-d '{
"confirmar": true
}'
<?php
$data = [
'confirmar' => true,
];
$ch = curl_init('https://api.afer.pro/api/v1/forms/aBc123XyZ/reminders');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY: afer_tk_TU_TOKEN',
'X-API-SECRET: afer_sk_TU_SECRET',
'Content-Type: application/json',
]);
$respuesta = json_decode(curl_exec($ch), true);
curl_close($ch);
const respuesta = await fetch('https://api.afer.pro/api/v1/forms/aBc123XyZ/reminders', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'afer_tk_TU_TOKEN',
'X-API-SECRET': 'afer_sk_TU_SECRET'
},
body: JSON.stringify({
"confirmar": true
})
});
const resultado = await respuesta.json();
Respuesta
{
"errorCode": 200,
"errorMsg": "",
"data": {
"enviados": 5,
"errores": []
}
}