Enviar evento de prueba firmado a un webhook
curl --request POST \
--url https://dte.ia-erp.cl/v1/webhooks/{id}/test \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dte.ia-erp.cl/v1/webhooks/{id}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dte.ia-erp.cl/v1/webhooks/{id}/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dte.ia-erp.cl/v1/webhooks/{id}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"delivery_id": "<string>",
"entregado": true,
"evento": "<string>",
"status_code": 123,
"$schema": "https://dte.ia-erp.cl/schemas/ProbarWebhookOutputBody.json",
"detalle": "<string>"
}{
"$schema": "https://dte.ia-erp.cl/schemas/ErrorModel.json",
"code": "rut_invalido",
"detail": "receptor.rut es obligatorio y debe ser un RUT chileno válido",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "urn:uuid:75acf40d-e49d-4267-9199-fdb9a0f98264",
"status": 400,
"title": "Datos del DTE inválidos",
"type": "urn:ia-erp:api:rut_invalido"
}Webhooks
Enviar evento de prueba firmado a un webhook
Envía de inmediato un evento dte.webhook_test firmado con HMAC-SHA256 al endpoint configurado y devuelve el código HTTP de respuesta.
POST
/
v1
/
webhooks
/
{id}
/
test
Enviar evento de prueba firmado a un webhook
curl --request POST \
--url https://dte.ia-erp.cl/v1/webhooks/{id}/test \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dte.ia-erp.cl/v1/webhooks/{id}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dte.ia-erp.cl/v1/webhooks/{id}/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dte.ia-erp.cl/v1/webhooks/{id}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"delivery_id": "<string>",
"entregado": true,
"evento": "<string>",
"status_code": 123,
"$schema": "https://dte.ia-erp.cl/schemas/ProbarWebhookOutputBody.json",
"detalle": "<string>"
}{
"$schema": "https://dte.ia-erp.cl/schemas/ErrorModel.json",
"code": "rut_invalido",
"detail": "receptor.rut es obligatorio y debe ser un RUT chileno válido",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "urn:uuid:75acf40d-e49d-4267-9199-fdb9a0f98264",
"status": 400,
"title": "Datos del DTE inválidos",
"type": "urn:ia-erp:api:rut_invalido"
}