Developer API
Integra la infraestructura asíncrona de AutomatiSat en cuestión de minutos.
Autenticación
Usa el header X-API-Key en todas tus peticiones. Dominio base: https://automatisat.integratucfdi.net
Endpoints
POST /api/rfc/validate
Validación de RFC Síncrona
Valida hasta 500 RFCs en tiempo real contra el LCO del SAT.
# Enviar JSON con el listado de contribuyentes
curl -X POST https://automatisat.integratucfdi.net/api/rfc/validate \
-H "X-API-Key: su_key_aqui" \
-H "Content-Type: application/json" \
-d '[{"rfc":"AAA010101AAA", "nombre":"EMP S.A."}]'$ch = curl_init("https://automatisat.integratucfdi.net/api/rfc/validate"); curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: su_key", "Content-Type: application/json"]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); $res = curl_exec($ch);
import requests url = "https://automatisat.integratucfdi.net/api/rfc/validate" headers = {"X-API-Key": "su_key"} response = requests.post(url, json=[{"rfc": "..."}], headers=headers)
const res = await fetch('https://automatisat.integratucfdi.net/api/rfc/validate', { method: 'POST', headers: { 'X-API-Key': 'su_key', 'Content-Type': 'application/json' }, body: JSON.stringify([{ rfc: '...' }]) });
POST /api/generarcsd
Generar Trámite CSD
Inicia la automatización de un CSD enviando los archivos de la e.firma (FIEL).
curl -X POST https://automatisat.integratucfdi.net/api/generarcsd \
-H "X-API-Key: su_key" \
-F "cer=@fiel.cer" \
-F "key=@fiel.key" \
-F "password=su_pass"$data = [
'cer' => new CURLFile('/path/to/fiel.cer'),
'key' => new CURLFile('/path/to/fiel.key'),
'password' => 'su_pass'
];
// Send via POST Multipart/form-datafiles = {
'cer': open('fiel.cer', 'rb'),
'key': open('fiel.key', 'rb')
}
data = {'password': 'su_pass'}
requests.post(url, files=files, data=data, headers=headers)Webhooks
Escucha de Eventos
Configura tu receptor para el evento csd.processed. Validamos con firma HMAC-SHA256.
$input = file_get_contents('php://input'); $signature = $_SERVER['HTTP_X_AUTOMATISAT_SIGNATURE']; $expected = hash_hmac('sha256', $input, $secret); if ($signature === $expected) { // Firma válida, procesar JSON }