API > Webhooks - Delete webhook

Webhooks - Delete webhook

DEL  https://{entorno}.ticketbaiws.eus/webhooks/{codigo_webhook}/

Deletes a webhook by its codigo (returned by POST and GET webhooks). Accepts both the DELETE and DEL methods.

Available in the test and production environments. Use the same environment the webhook was created in (api-test or api).

PARAMETERS

No parameters: the webhook code goes in the URL.

DEL https://{entorno}.ticketbaiws.eus/webhooks/{codigo_webhook}/
$ curl --request DELETE \
     --url https://api-test.ticketbaiws.eus/webhooks/6904a3501884e/ \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'Token: xxx' \
     --header 'Nif: 00000014Z'
$ composer require ticketbaiws/ticketbaiws-php
<?php
// Installation: composer require ticketbaiws/ticketbaiws-php
require 'vendor/autoload.php';

$tbai = new \TicketbaiWS\Client('xxx', '00000014Z', ['entorno' => 'test']);

// Requires ticketbaiws-php 1.3.0 or later
$r = $tbai->eliminarWebhook('6904a3501884e');

if ($r->isError()) {
    echo $r->getMessageText();
} else {
    print_r($r->getData());
}
$ python -m pip install requests
import requests

url = "https://api-test.ticketbaiws.eus/webhooks/6904a3501884e/"

headers = {"Accept": "application/json", "Token" : "xxx", "Nif" : "00000014Z"}
response = requests.request("DELETE", url, headers=headers)

print(response.text)
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-test.ticketbaiws.eus/webhooks/6904a3501884e/");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
headers = curl_slist_append(headers, "Content-Type: application/json");
headers = curl_slist_append(headers, "Token: xxx");
headers = curl_slist_append(headers, "Nif: 00000014Z");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api-test.ticketbaiws.eus/webhooks/6904a3501884e/")
  .delete()
  .addHeader("Accept", "application/json")
  .addHeader("Token", "xxx")
  .addHeader("Nif", "00000014Z")
  .build();

Response response = client.newCall(request).execute();
{ } Response JSON
HTTP/1.1 200 OK
{
    "result": "OK",
    "return": [],
    "msg": "Webhook deleted successfully"
}
{ } Response (not found) JSON
HTTP/1.1 200 OK
{
    "result": "ERROR",
    "return": null,
    "msg": "WEBHOOK Not Found"
}

TicketBAI / Verifactu methods

Representation document

BATUZ BIZKAIA specific methods

SII (AEAT)

Customers and products (invoicing tool)

Other methods