Skip to content
FirmEasy

Download File

POST
https://app.firmeasy.legal/api/v1/digital/archivo/download

This endpoint allows you to download a specific digital file. The download is processed using the unique file identifier provided in the request body.



This resource is protected. You must include your access token in the request header.

Authorization
string
Access token (Bearer token).
Limits:Obligatorio
Content-Type
string
Specifies the format of the request.
Limits:application/json

Required Fields

Fields marked with an asterisk (*) are required and must be provided in the request. Other fields are optional.

Send the file identifier in JSON format to initiate the download.

archivo_id
string
Unique identifier (UUID) of the file you wish to download.
Limits:Obligatorio (Formato UUID)

Ventana de terminal
curl -X POST [https://app.firmeasy.legal/api/v1/digital/archivo/download](https://app.firmeasy.legal/api/v1/digital/archivo/download) \
-H "Authorization: Bearer TU_TOKEN_AQUI" \
-H "Content-Type: application/json" \
-d '{
"archivo_id": "1eebd53e-a10e-4ce8-a714-31ef4c8fabc0"
}'
const myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer TU_TOKEN_AQUI");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"archivo_id": "1eebd53e-a10e-4ce8-a714-31ef4c8fabc0"
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("[https://app.firmeasy.legal/api/v1/digital/archivo/download](https://app.firmeasy.legal/api/v1/digital/archivo/download)", requestOptions)
.then((response) => response.blob()) // Los archivos se manejan como Blob
.then((blob) => {
// Lógica para descargar el archivo en el navegador/sistema
console.log("Archivo recibido");
})
.catch((error) => console.error(error));

This endpoint returns a binary stream of the requested file.

  • 200 OK: The download will start immediately.
  • Headers: The response will include headers such as Content-Type: application/pdf or similar depending on the file type.

Code Status Description
200 OK Download started successfully.
401 Unauthorized Missing or invalid token.
404 Not Found No file found with that ID.
500 Server Error Internal server failure.