## Representation document - Download template

`GET`  https://{entorno}.ticketbaiws.eus/doc-representante/modelo/

Downloads the representation document (authorization to act on the company's behalf) that allows Ticketbai WS to send the company's invoices in production. The template depends on the company's territory:

- **Verifactu:**  representation document before the AEAT (Spanish Tax Agency).
- **Bizkaia:**  Batuz form 140 (individual) or 240 (legal entity).
- **Gipuzkoa:**  TicketBAI representation authorization.

Returns the PDF file in base 64, with the company and representative details already filled in.

**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.**

**Companies in Araba:**  this method is not available, because in Araba the authorization is given by registering the device certificate ([see instructions](https://ticketbaiws.eus/es/registro-de-certificado-de-dispositivo/)). It returns an error:

```
{"result": "ERROR", "return": null, "msg": "El documento de representación no está disponible para empresas de Araba. Registra el certificado de dispositivo de Ticketbai WS en la sede de la Diputación Foral de Álava."}
```

**PARAMETERS**

- `nombre_representante` (string, required only for legal entities): (Verifactu, Bizkaia and Gipuzkoa)
  Full name of the company representative who will digitally sign the document. Ejemplo: `Juan Martínez Pérez`
- `nif_representante` (string, required only for legal entities): (Verifactu, Bizkaia and Gipuzkoa)
  NIF (Spanish tax ID) of the company representative who will digitally sign the document. It must match the NIF of the digital signature. Ejemplo: `12345678Z`
- `poblacion_representante` (string, required only for legal entities): in Verifactu
  Town/city of the company representative who will digitally sign the document. Ejemplo: `Madrid`
- `direccion_representante` (string, required only for legal entities): in Verifactu
  Address of the company representative who will digitally sign the document. Ejemplo: `Calle Falsa 123`

Individuals do not need to send any parameters: the document is filled in with the company details. In Bizkaia and Gipuzkoa _poblacion_representante_  and _direccion_representante_  are not used; if sent, they are ignored.

**GET** `https://{entorno}.ticketbaiws.eus/doc-representante/modelo/`

```bash
$ curl --request GET \
     --url https://api-test.ticketbaiws.eus/doc-representante/modelo/ \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'Token: xxx' \
     --header 'Nif: 00000014Z'
	 --data '{"nombre_representante" : "Persona Representante","nif_representante" : "12345678Z","poblacion_representante" : "Madrid","direccion_representante" : "Calle Falsa 123"}'
```

Respuesta:

```json
HTTP/1.1 200 OK
{
	"result": "OK",
	"return": "JVBERi0xLjcNJeLjz9MNCjE1OSAwIG9iag08PC9MaW5lYXJpemVkIDEvTCAxMzQ0MTMwL08gMTYx...",
	"msg": null
}
```

Fuente: https://ticketbaiws.eus/en/doc-representante-modelo-get/
