API > SII - Get the issued invoices book

SII - Get the issued invoices book

GET  https://{entorno}.ticketbaiws.eus/sii-envios/

The SII (Suministro Inmediato de Información, Immediate Supply of Information) requires large companies (turnover above 6 million euros), companies registered in the REDEME (monthly VAT refund register) and VAT groups to send every invoice to the AEAT (Spanish Tax Agency) within 4 working days. Ticketbai WS automatically records in the issued invoices book the invoices you create with POST tbai: corrections (zuzendu) are sent as modifications and cancellations as deletions. In the Basque Country and Navarre each invoice is recorded once the regional tax authority accepts it in TicketBAI.

This method is only available to companies with the SII enabled, using the sii parameter of New company and Edit company details. Once enabled, invoices issued from that day on are recorded. It is for companies in the common VAT territory (outside the Basque Country and Navarre): once enabled, their invoices are no longer sent to Verifactu, because SII companies are exempt from it. Basque companies under the State VAT rules can have it enabled through support. Each submission is also reported with the sii_envio webhook event.

Returns the last 100 records sent to the SII, newest first. All filters are optional and can be combined.

GET methods accept the parameters either in the body as a JSON payload or as a query string in the URL, as shown in the cURL example.

PARAMETERS

serie string optional
Invoice series
A
numero string optional
Invoice number
2026000245
factura string optional
Series and number as recorded in the SII
A2026000245
estado string optional
PENDIENTE (pending), CORRECTO (accepted), ACEPTADO_CON_ERRORES (accepted with errors), INCORRECTO (rejected), ERROR_TEMPORAL (retrying), BAJA (deleted), ESPERANDO_HACIENDA (waiting for the regional tax authority), SUSTITUIDO (superseded) or DESCARTADO (discarded)
INCORRECTO
desde / hasta string optional
Issue date from / to (dd/mm/yyyy)
01/11/2026
limite integer optional
Number of records (100 by default, maximum 1000)
100


RESPONSE (return, one row per record)

serie, numero, factura, fecha_emision
Recorded invoice
A2026000245
periodo string
VAT period (yyyy-mm)
2026-11
operacion string
alta (new), modificacion (correction) or baja (cancellation)
alta
estado string
CORRECTO and ACEPTADO_CON_ERRORES are recorded by the AEAT; INCORRECTO was rejected (see errores); the rest are queued
CORRECTO
csv string
Secure verification code (CSV) of the submission
GTUP7P9NT4S37CYV
errores / avisos array
AEAT errors (codigo and descripcion) and Ticketbai WS warnings
fecha_limite string
Last day of the legal deadline (4 working days)
30/11/2026


GET https://{entorno}.ticketbaiws.eus/sii-envios/
$ curl --request GET \
     --url 'https://api-test.ticketbaiws.eus/sii-envios/?serie=A&numero=2026000245' \
     --header 'Accept: application/json' \
     --header 'Token: xxx' \
     --header 'Nif: 00000014Z'
<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://api-test.ticketbaiws.eus/sii-envios/?serie=A&numero=2026000245",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Accept: application/json", "Token: xxx", "Nif: 00000014Z"],
]);
$respuesta = json_decode(curl_exec($curl), true);
curl_close($curl);

print_r($respuesta["return"]);
$ python -m pip install requests
import requests

url = "https://api-test.ticketbaiws.eus/sii-envios/?serie=A&numero=2026000245"
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/sii-envios/?serie=A&numero=2026000245");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: 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/sii-envios/?serie=A&numero=2026000245")
  .get()
  .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": [
        {
            "id": 512,
            "serie": "A",
            "numero": "2026000245",
            "factura": "A2026000245",
            "fecha_emision": "24\/11\/2026",
            "periodo": "2026-11",
            "libro": "emitidas",
            "operacion": "alta",
            "estado": "CORRECTO",
            "csv": "GTUP7P9NT4S37CYV",
            "errores": [],
            "avisos": [],
            "fecha_limite": "30\/11\/2026",
            "fecha_envio": "24\/11\/2026 10:12:03",
            "intentos": 1
        }
    ],
    "msg": null
}

TicketBAI / Verifactu methods

Representation document

BATUZ BIZKAIA specific methods

SII (AEAT)

Customers and products (invoicing tool)

Other methods