API > LROE - Query received invoices
LROE - Query received invoices
GET https://{entorno}.ticketbaiws.eus/lroe-recibidas/
IMPORTANT: This method is only valid for BATUZ Bizkaia. Lets you query the invoices sent to the Batuz LROE received invoices (purchases) book. All parameters except the fiscal year are optional (although at least one must be specified) and can be combined, for example to search for a specific supplier's invoices between two dates.
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
| ejercicio integer required Fiscal year of the batch of received invoices, in yyyy format | 2023 |
| fecha_factura_desde string optional Date of the full invoice in dd/mm/yyyy format | 13/09/2023 |
| fecha_factura_hasta string optional Date of the full invoice in dd/mm/yyyy format | 13/10/2023 |
| fecha_recepcion_desde string optional Invoice receipt date in dd/mm/yyyy format | 13/09/2023 |
| fecha_recepcion_hasta string optional Invoice receipt date in dd/mm/yyyy format | 13/10/2023 |
| pais_emisor string optional Two-letter country code of the invoice issuer if the supplier's tax ID is foreign (ISO-3166 Alpha-2 code format) | ES |
| tipo_documento string optional Type of identification document for foreign issuers (suppliers). Defaults to 02. Possible values: 02 => VAT ID (NIF-IVA) 03 => Passport 04 => Official identity document issued by the country or territory of residence, 05 => Certificate of residence 06 => Other supporting document | 02 |
| nif string optional NIF (Spanish tax ID) of the invoice issuer | B01000012 |
| num_factura string optional Invoice number | 2023715273 |
| epigrafe integer optional, only for individuals (natural persons) in Bizkaia (LROE 140) Indicates that the item belongs to a specific IAE activity code, different from the general one defined in the company profile or from the one defined on the invoice. | 197210 |
| estado string optional Invoice status: Correcto, AceptadoConErrores, Incorrecto | Correcto |
| pagina integer optional Page number of the paginated result. | 1 |
GET https://{entorno}.ticketbaiws.eus/lroe-recibidas/
$ curl --request GET \
--url https://api-test.ticketbaiws.eus/lroe-recibidas/ \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Token: xxx' \
--header 'Nif: 00000014Z'
--data '
{
"ejercicio": 2023,
"fecha_factura_desde": "01/06/2023",
"fecha_factura_hasta": "01/10/2023",
"fecha_recepcion_desde": "01/09/2023",
"fecha_recepcion_hasta": "01/10/2023",
"pais_emisor": "IT",
"tipo_documento": "06",
"nif": "IT123895890",
"num_factura": "2023715273",
"epigrafe": "197210",
"estado": "Correcto",
"pagina": 1
}'
$ 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->lroeRecibidas()->consultar([
'ejercicio' => 2023,
'fecha_factura_desde' => '01/06/2023',
'fecha_factura_hasta' => '01/10/2023',
'fecha_recepcion_desde' => '01/09/2023',
'fecha_recepcion_hasta' => '01/10/2023',
'pais_emisor' => 'IT',
'tipo_documento' => '06',
'nif' => 'IT123895890',
'num_factura' => '2023715273',
'epigrafe' => '197210',
'estado' => 'Correcto',
'pagina' => 1,
]);
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-recibidas/"
payload = {
"ejercicio": 2023,
"fecha_factura_desde": "01/06/2023",
"fecha_factura_hasta": "01/10/2023",
"fecha_recepcion_desde": "01/09/2023",
"fecha_recepcion_hasta": "01/10/2023",
"pais_emisor": "IT",
"tipo_documento": "06",
"nif": "IT123895890",
"num_factura": "2023715273",
"epigrafe": "197210",
"estado": "Correcto",
"pagina": 1
}
headers = {"Accept": "application/json", "Token" : "xxx", "Nif" : "00000014Z"}
response = requests.request("GET", url, json=payload, 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/lroe-recibidas/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_GETFIELDS, '{"ejercicio": 2023,"fecha_factura_desde": "01/06/2023","fecha_factura_hasta": "01/10/2023","fecha_recepcion_desde": "01/09/2023","fecha_recepcion_hasta": "01/10/2023","pais_emisor": "IT","tipo_documento": "06","nif": "IT123895890","num_factura": "2023715273","epigrafe": "197210","estado": "Correcto","pagina": 1}');
CURLcode ret = curl_easy_perform(hnd);
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{"ejercicio": 2023,"fecha_factura_desde": "01/06/2023","fecha_factura_hasta": "01/10/2023","fecha_recepcion_desde": "01/09/2023","fecha_recepcion_hasta": "01/10/2023","pais_emisor": "IT","tipo_documento": "06","nif": "IT123895890","num_factura": "2023715273","epigrafe": "197210","estado": "Correcto","pagina": 1}');
Request request = new Request.Builder()
.url("https://api-test.ticketbaiws.eus/lroe-recibidas/")
.GET(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": "31/08/2023",
"fecha_operacion": "",
"fecha_recepcion": "31/08/2023",
"num_factura": "8064",
"descripcion": "21312",
"nif": "A88888888",
"nombre_social": "EMPRESA EJEMPLO S.A.",
"bases": [
{
"base_imponible": "400.72",
"tipo_iva": "21.00"
}
],
"importe_total": "484.87",
"inversion_sujeto_pasivo": false,
"regimen_iva": "01",
"fecha_presentacion": "15/11/2023 11:16:56",
"fecha_modificacion": "15/11/2023 11:16:56",
"estado": "Correcto"
}
]
},
"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
- 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
