API > LROE - Cancel expenses without invoice

LROE - Cancel expenses without invoice

DEL  https://{entorno}.ticketbaiws.eus/lroe-gastos-sinfactura/

NOTE: This method is only valid for BATUZ Bizkaia and for Form 140 taxpayers (individuals carrying out an economic activity and income-attribution entities such as comunidades de bienes and sociedades civiles). It corresponds to section 2.2 of the LROE: expenses that are not documented by an invoice, such as self-employed social security contributions, bank fees or insurance.

Cancels expenses without invoice previously sent to the Batuz LROE. Only the fields that identify the expense need to be given.

PARAMETERS

ejercicio integer required
Fiscal year in yyyy format
2026
gastos object array required (max 1000) records
fecha_operacion string required
Date of the expense in dd/mm/yyyy format. It must fall within the given fiscal year.
30/09/2026
concepto string required
Accounting concept of the expense. Possible values:
600 Purchases of goods for resale, 601 Purchases of raw materials, 602 Other supplies, 606 Prompt-payment discounts on purchases, 607 Work performed by other companies, 608 Purchase returns, 609 Volume discounts (rappels) on purchases, 620 R&D expenses, 621 Leases and royalties, 622 Repairs and maintenance, 623 Independent professional services, 624 Transport, 625 Insurance premiums, 626 Banking and similar services, 627 Advertising, publicity and public relations, 628 Utilities, 629 / 631 Other services, 634 Negative adjustments to indirect taxation, 639 Positive adjustments to indirect taxation, 640 Wages and salaries, 641 Severance pay, 64201 Social security paid by the company: self-employed, 64202 Social security paid by the company: employees, 643 / 644 Long-term remuneration, 649 Other employee benefit expenses, 65 Other operating expenses, 66 Financial expenses, 67 Exceptional expenses, 680 / 681 / 682 Depreciation and amortization, 69 Impairment losses and other provisions
64201
epigrafe string optional
IAE activity code of the activity (max. 7 digits). If not given, the IAE activity code in the company profile is used.
165140
linea integer optional
Line number (1 to 99). Defaults to 1. Together with the date, the IAE activity code and the concept, it identifies the expense: if there are two expenses with the same date and the same concept, each one must have a different line.
1


DEL https://{entorno}.ticketbaiws.eus/lroe-gastos-sinfactura/
$ curl --request DELETE \
     --url https://api-test.ticketbaiws.eus/lroe-gastos-sinfactura/ \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'Token: xxx' \
     --header 'Nif: 00000014Z' \
     --data '
{
    "ejercicio": 2026,
    "gastos": [
        {
            "fecha_operacion": "30/09/2026",
            "concepto": "626",
            "linea": 2
        }
    ]
}'
$ 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->lroeGastosSinFactura()->anular([
    'ejercicio' => 2026,
    'gastos'    => [
        ['fecha_operacion' => '30/09/2026', 'concepto' => '626', 'linea' => 2],
    ],
]);

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

url = "https://api-test.ticketbaiws.eus/lroe-gastos-sinfactura/"
payload = {
    "ejercicio": 2026,
    "gastos": [
        {
            "fecha_operacion": "30/09/2026",
            "concepto": "626",
            "linea": 2
        }
    ]
}

headers = {"Accept": "application/json", "Token": "xxx", "Nif": "00000014Z"}
response = requests.request("DELETE", url, json=payload, 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/lroe-gastos-sinfactura/");

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);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, R"({"ejercicio":2026,"gastos":[{"fecha_operacion":"30/09/2026","concepto":"626","linea":2}]})");

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

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"ejercicio\":2026,\"gastos\":[{\"fecha_operacion\":\"30/09/2026\",\"concepto\":\"626\",\"linea\":2}]}");

Request request = new Request.Builder()
  .url("https://api-test.ticketbaiws.eus/lroe-gastos-sinfactura/")
  .delete(body)
  .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": {
        "response": [
            {
                "fecha_operacion": "30/09/2026",
                "epigrafe": "165140",
                "concepto": "626",
                "linea": 2,
                "estado": "Correcto"
            }
        ],
        "status": "OK"
    },
    "msg": ""
}

TicketBAI / Verifactu methods

Representation document

BATUZ BIZKAIA specific methods

SII (AEAT)

Customers and products (invoicing tool)

Other methods