Editar un webhook
curl --request PUT \
--url https://www.facture.ar/api/webhooks/{webhookId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "<string>",
"events": [],
"headers": {},
"isActive": true
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: [], headers: {}, isActive: true})
};
fetch('https://www.facture.ar/api/webhooks/{webhookId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/webhooks/{webhookId}"
payload = {
"url": "<string>",
"events": [],
"headers": {},
"isActive": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.facture.ar/api/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'events' => [
],
'headers' => [
],
'isActive' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"userId": "<string>",
"url": "<string>",
"headers": {},
"events": [
"delegation.completed"
],
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}Webhooks
Editar un webhook
Cambia la URL, los eventos, los headers o lo pausa (isActive: false). Solo se cambian los campos que mandás.
PUT
/
webhooks
/
{webhookId}
Editar un webhook
curl --request PUT \
--url https://www.facture.ar/api/webhooks/{webhookId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "<string>",
"events": [],
"headers": {},
"isActive": true
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: [], headers: {}, isActive: true})
};
fetch('https://www.facture.ar/api/webhooks/{webhookId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.facture.ar/api/webhooks/{webhookId}"
payload = {
"url": "<string>",
"events": [],
"headers": {},
"isActive": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.facture.ar/api/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'events' => [
],
'headers' => [
],
'isActive' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"userId": "<string>",
"url": "<string>",
"headers": {},
"events": [
"delegation.completed"
],
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"resolution": "<string>",
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<unknown>"
}Authorizations
API Key para autenticación. Formato: test_sk_xxx para testing, prod_sk_xxx para producción.
Path Parameters
ID del webhook
Body
application/json
Response
Webhook actualizado
Headers propios que se agregan a cada envío
Show child attributes
Show child attributes
Available options:
delegation.completed, invoice.completed, invoice.failed, batch.completed, draft.review_required