curl -X GET "https://www.sharkfac.com/api/v1/facturas/112/ticket" \
-H "x-sharkfac-key: TU_API_KEY_AQUI" \
--output ticket-112.pdf
fetch("https://www.sharkfac.com/api/v1/facturas/112/ticket", {
method: "GET",
headers: {
"x-sharkfac-key": "TU_API_KEY_AQUI"
}
})
.then(res => res.blob())
.then(blob => {
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "ticket-112.pdf";
document.body.appendChild(a);
a.click();
a.remove();
});
Facturación
Descargar Ticket (80mm)
Genera y devuelve el PDF en formato ticket (80mm).
GET
/
api
/
v1
/
facturas
/
{id}
/
ticket
curl -X GET "https://www.sharkfac.com/api/v1/facturas/112/ticket" \
-H "x-sharkfac-key: TU_API_KEY_AQUI" \
--output ticket-112.pdf
fetch("https://www.sharkfac.com/api/v1/facturas/112/ticket", {
method: "GET",
headers: {
"x-sharkfac-key": "TU_API_KEY_AQUI"
}
})
.then(res => res.blob())
.then(blob => {
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "ticket-112.pdf";
document.body.appendChild(a);
a.click();
a.remove();
});
Descarga el archivo PDF optimizado para impresoras térmicas de rollo de 80mm.
Ideal para puntos de venta (POS) e impresoras térmicas estándar.
Path Parameters
integer
required
ID interno de la factura.
Headers
string
required
Tu API Key secreta.
Ejemplo de petición
curl -X GET "https://www.sharkfac.com/api/v1/facturas/112/ticket" \
-H "x-sharkfac-key: TU_API_KEY_AQUI" \
--output ticket-112.pdf
fetch("https://www.sharkfac.com/api/v1/facturas/112/ticket", {
method: "GET",
headers: {
"x-sharkfac-key": "TU_API_KEY_AQUI"
}
})
.then(res => res.blob())
.then(blob => {
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "ticket-112.pdf";
document.body.appendChild(a);
a.click();
a.remove();
});
Respuesta
Archivo binario (application/pdf) optimizado para impresora térmica.

