API > Representation document - Revoke uploaded document

Representation document - Revoke uploaded document

DELETE  https://{entorno}.ticketbaiws.eus/doc-representante/

Revokes the uploaded representation document (Verifactu, Bizkaia or Gipuzkoa). Without it, the company will not be able to send in production with the Ticketbai WS certificate. It can only be revoked as long as no submissions have been made in production; after that, revocation is not allowed in any territory.

Companies in Araba: this method is not available, because in Araba the authorization is given by registering the device certificate (see instructions). It returns an error:

{"result": "ERROR", "return": null, "msg": "El documento de representación no está disponible para empresas de Araba. Registra el certificado de dispositivo de Ticketbai WS en la sede de la Diputación Foral de Álava."}

PARAMETERS

-- This method does not accept parameters --


DELETE https://{entorno}.ticketbaiws.eus/doc-representante/
$ curl --request DELETE \
     --url https://api-test.ticketbaiws.eus/doc-representante/ \
     --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']);

$r = $tbai->revocarDocRepresentante();

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

url = "https://api-test.ticketbaiws.eus/doc-representante/"
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, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-test.ticketbaiws.eus/doc-representante/");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
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/doc-representante/")
  .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": null, 
	"msg": "Document voided" 
}

TicketBAI / Verifactu methods

Representation document

BATUZ BIZKAIA specific methods

SII (AEAT)

Customers and products (invoicing tool)

Other methods