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();
});