## TicketBAI - Complete simplified invoice

`POST`  https://{entorno}.ticketbaiws.eus/tbai-completar/

This method converts one or more simplified invoices into a full invoice. The full invoice must have its own number. It is not a corrective invoice, although it is handled as if it were a replacement invoice

**PARAMETERS**

- `fecha` (string, required): Date of the full invoice, in dd/mm/yyyy format. Ejemplo: `13/11/2021`
- `hora` (string, required): Issue time of the full invoice, in HH:MM:SS format. Ejemplo: `12:14:00`
- `nif` (string, required): NIF (Spanish tax ID) of the customer the invoice is issued to. Ejemplo: `B01000012`
- `pais_cliente` (string, optional): Two-letter country code of the customer if the customer's tax ID is foreign (ISO-3166 Alpha-2 code) Ejemplo: `ES`
- `nombre` (string, required): Legal name of the customer the invoice is issued to. Ejemplo: `Empresa de ejemplo S.L.`
- `direccion` (string, required): Billing address of the customer the invoice is issued to. Ejemplo: `Calle de ejemplo 123`
- `cp` (string, required): Postal code of the customer the invoice is issued to. Ejemplo: `01001`
- `serie` (string, required): Series of the full invoice. Ejemplo: `A`
- `numero` (string, required): Number of the full invoice. Ejemplo: `2021000123`
- `simplificadas` (object array, required (max. 100))
  - `serie` (string, required): Series of the simplified invoice. Ejemplo: `A`
  - `numero` (string, required): Number of the simplified invoice. Ejemplo: `2021000100`
  - `fecha` (string, required): Issue date of the simplified invoice, in dd/mm/yyyy format. Ejemplo: `13/11/2021`
- `intracomunitaria` (boolean, optional): The invoice is an intra-community (EU) invoice. Ejemplo: `false`
- `exportacion` (boolean, optional): The invoice is an export outside the EU. Ejemplo: `false`

**POST** `https://{entorno}.ticketbaiws.eus/tbai-completar/`

```bash
$ curl --request POST \
     --url https://api-test.ticketbaiws.eus/tbai-completar/ \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'Token: xxx' \
     --header 'Nif: 00000014Z'
	 --data '
{
    "fecha": "13\/11\/2021",
    "hora": "12:14:00",
    "pais_cliente": "ES",
	"nif": "B00000011",
    "nombre": "Empresa de ejemplo S.L.",
    "direccion": "Calle Falsa 123",
    "cp": "28080",
    "serie": "A",
    "numero": "2021000123",
    "simplificadas" : [
        {
            "serie": "A",
            "numero": "20210000075",
            "fecha": "10\/11\/2021"
        },
        {
            "serie": "A",
            "numero": "20210000076",
            "fecha": "10\/11\/2021"
        }
    ],
    "intracomunitaria": false,
	"exportacion": false
}'
```

Respuesta:

```json
HTTP/1.1 200 OK
{
	"result": "OK",
	"return": {
		"huella_tbai" : "TBAI-B01000012-131121-zG3wtCW3WlOSN-108",
		"qr" : "iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAIAAABEtEjdAAAABmJ...",
		"url" : "https://batuz.eus/QRTBAI/?id=TBAI-..."
	},
	"msg": null
}
```

Fuente: https://ticketbaiws.eus/en/tbai-completar-post/
