## Representation document - Upload document

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

Uploads the digitally signed representation document (authorization to act on the company's behalf) for Verifactu, Bizkaia or Gipuzkoa. For individuals, it is signed by the holder; for legal entities, by the legal representative given when downloading the template. A recognized digital certificate (FNMT, Izenpe…) must be used. The NIF (Spanish tax ID) of the signature is checked against that of the company or the representative.

The request is sent as _multipart/form-data_ , not as JSON.

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

- `file` (file, required): PDF of the digitally signed representation document, sent as a _multipart/form-data_  field. Ejemplo: `documento.pdf`

**POST** `https://api.ticketbaiws.eus/doc-representante/`

```bash
$ curl --request POST \
     --url https://api.ticketbaiws.eus/doc-representante/ \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'Token: xxx' \
     --header 'Nif: 00000014Z'
	 --form 'file=@"/ruta/documento-firmado.pdf"'
```

Respuesta:

```json
HTTP/1.1 200 OK
{
	"result": "OK",
	"return": "Documento procesado correctamente",
	"msg": null
}
```

Fuente: https://ticketbaiws.eus/en/doc-representante-post/
