Representation document - Authorization status
GET https://{entorno}.ticketbaiws.eus/doc-representante/estado/
Returns whether the company is authorized for TicketBAI WS to send its invoices to its tax authority in production, and how: own certificate, device certificate or representation document (authorization to act on the company's behalf). It is the same representacion object returned by GET empresas and PUT empresas with the developer token.
Authenticate with the company token: header Nif = the company's NIF (Spanish tax ID) and Token = its token for the environment (test or production). It works in all four territories (Araba, Bizkaia, Gipuzkoa and Verifactu).
Available in the test and production environments. The authorization belongs to the company, not to the environment: the result is the same with either token.
PARAMETERS
-- This method does not accept parameters --
RESPONSE
In return:
estado string autorizada: TicketBAI WS can send the company's invoices to the tax authority in production. pendiente: the authorization is still missing. | autorizada |
| via string How the company is (or has to be) authorized: certificado_propio, certificado_dispositivo or documento_representacion. | documento_representacion |
| fecha string | null dd/mm/yyyy. Date of the representation document ( via = documento_representacion) or of the confirmation that the device certificate has been registered (Araba and Gipuzkoa). null otherwise. | 05/12/2026 |
| caducidad_certificado string dd/mm/yyyy. Only present when via = certificado_propio: expiry date of the company's own certificate. | 31/03/2028 |
HOW IT IS WORKED OUT
The first rule that applies is used:
- Own certificate still valid (any territory): the company has uploaded its own digital certificate in the private area and it has not expired.
autorizada,certificado_propio,fechanull andcaducidad_certificadowith its expiry date. - Verifactu, Bizkaia and Gipuzkoa with a representation document uploaded:
autorizada,documento_representacionand the document'sfecha. - Verifactu without a document:
pendiente,documento_representacion. Without the document (or an own certificate) invoices cannot be sent to the AEAT (Spanish Tax Agency). - Bizkaia without a document:
autorizada,certificado_dispositivo(the TicketBAI WS device certificate is used). - Araba and Gipuzkoa without a document:
certificado_dispositivo.autorizadaonce the registration of the TicketBAI WS device certificate with the Provincial Council (Diputación Foral) has been confirmed in the private area (fecha= date of the confirmation); otherwisependiente.
If the token or the NIF is wrong:
{"result": "ERROR", "return": null, "msg": "TOKEN error"}$ curl --request GET \
--url https://api-test.ticketbaiws.eus/doc-representante/estado/ \
--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->peticion('GET', 'doc-representante/estado');
if ($r->isError()) {
echo $r->getMessageText();
} else {
echo $r->getData('estado') . ' (' . $r->getData('via') . ')';
}
$ python -m pip install requests
import requests
url = "https://api-test.ticketbaiws.eus/doc-representante/estado/"
headers = {"Accept": "application/json", "Token" : "xxx", "Nif" : "00000014Z"}
response = requests.request("GET", 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/estado/");
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/estado/")
.get()
.addHeader("Accept", "application/json")
.addHeader("Token", "xxx")
.addHeader("Nif", "00000014Z")
.build();
Response response = client.newCall(request).execute();
HTTP/1.1 200 OK
{
"result": "OK",
"return": {
"estado": "autorizada",
"via": "documento_representacion",
"fecha": "05/12/2026"
},
"msg": null
}
HTTP/1.1 200 OK
{
"result": "OK",
"return": {
"estado": "autorizada",
"via": "certificado_propio",
"fecha": null,
"caducidad_certificado": "31/03/2028"
},
"msg": null
}
TicketBAI / Verifactu methods
- POST New invoice / resubmission (zuzendu) TicketBAI / Verifactu
- POST Complete a simplified invoice
- GET Get a TicketBAI / Verifactu invoice
- GET List TicketBAI / Verifactu invoices
- GET Download TicketBAI / Verifactu XML
- GET Download invoice in FacturaE format
- GET Download invoice as PDF
- GET System status
- DEL Cancel a TicketBAI / Verifactu invoice
- PUT Force TicketBAI / Verifactu resend
- POST Validate a NIF with the AEAT
- POST Validate a VAT number in VIES
Representation document
- GET Representation document - Download template
- POST Representation document - Upload document
- GET Representation document - Download uploaded document
- GET Representation document - Authorization status
- DELETE Representation document - Revoke uploaded document
BATUZ BIZKAIA specific methods
- GET List IAE activity codes
- POST LROE - Received invoices - Submit (BATUZ)
- PUT LROE - Received invoices - Update (BATUZ)
- GET LROE - Received invoices - Query (BATUZ)
- DEL LROE - Received invoices - Cancel (BATUZ)
- POST LROE - Expenses without invoice - Submit (BATUZ, form 140)
- PUT LROE - Expenses without invoice - Update (BATUZ, form 140)
- GET LROE - Expenses without invoice - Query (BATUZ, form 140)
- DEL LROE - Expenses without invoice - Cancel (BATUZ, form 140)
- POST LROE - Cash accounting COLLECTIONS - Submit (BATUZ)
- PUT LROE - Cash accounting COLLECTIONS - Update (BATUZ)
- GET LROE - Cash accounting COLLECTIONS - Query (BATUZ)
- DEL LROE - Cash accounting COLLECTIONS - Cancel (BATUZ)
- POST LROE - Cash accounting PAYMENTS - Submit (BATUZ)
- PUT LROE - Cash accounting PAYMENTS - Update (BATUZ)
- GET LROE - Cash accounting PAYMENTS - Query (BATUZ)
- DEL LROE - Cash accounting PAYMENTS - Cancel (BATUZ)
SII (AEAT)
Customers and products (invoicing tool)
- GET Customers - Search / get customers
- POST Customers - New customer
- PUT Customers - Update customer
- GET Products - Search / get products
