## 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. Ejemplo: `2023`
- `fecha_factura_desde` (string, optional): Date of the full invoice in dd/mm/yyyy format. Ejemplo: `13/09/2023`
- `fecha_factura_hasta` (string, optional): Date of the full invoice in dd/mm/yyyy format. Ejemplo: `13/10/2023`
- `fecha_recepcion_desde` (string, optional): Invoice receipt date in dd/mm/yyyy format. Ejemplo: `13/09/2023`
- `fecha_recepcion_hasta` (string, optional): Invoice receipt date in dd/mm/yyyy format. Ejemplo: `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) Ejemplo: `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. Ejemplo: `02`
- `nif` (string, optional): NIF (Spanish tax ID) of the invoice issuer. Ejemplo: `B01000012`
- `num_factura` (string, optional): Invoice number. Ejemplo: `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. Ejemplo: `197210`
- `estado` (string, optional): Invoice status: Correcto, AceptadoConErrores, Incorrecto. Ejemplo: `Correcto`
- `pagina` (integer, optional): Page number of the paginated result. Ejemplo: `1`

**GET** `https://{entorno}.ticketbaiws.eus/lroe-recibidas/`

```bash
$ 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
}'
```

Respuesta:

```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
}
```

Fuente: https://ticketbaiws.eus/en/lroe-recibidas-get/
