curl -X POST "https://www.sharkfac.com/api/v1/facturas/112/anular" \
-H "Content-Type: application/json" \
-H "x-sharkfac-key: TU_API_KEY_AQUI" \
-d '{
"codigoMotivo": 1
}'
const payload = {
codigoMotivo: 1
};
fetch("https://www.sharkfac.com/api/v1/facturas/112/anular", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-sharkfac-key": "TU_API_KEY_AQUI"
},
body: JSON.stringify(payload)
})
.then(res => res.text())
.then(console.log);
Facturación
Anular Factura
Invalida una factura previamente emitida y validada por el SIAT.
POST
/
api
/
v1
/
facturas
/
{id}
/
anular
curl -X POST "https://www.sharkfac.com/api/v1/facturas/112/anular" \
-H "Content-Type: application/json" \
-H "x-sharkfac-key: TU_API_KEY_AQUI" \
-d '{
"codigoMotivo": 1
}'
const payload = {
codigoMotivo: 1
};
fetch("https://www.sharkfac.com/api/v1/facturas/112/anular", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-sharkfac-key": "TU_API_KEY_AQUI"
},
body: JSON.stringify(payload)
})
.then(res => res.text())
.then(console.log);
Anula una factura electrónica registrada previamente en el sistema del Servicio de Impuestos Nacionales (SIAT).
Por normativa del SIAT, solo puedes anular facturas emitidas hasta el día 9 del mes siguiente a su emisión.
Path Parameters
integer
required
ID interno de la factura que deseas anular.Debes utilizar el valor retornado en el campo
id al momento de emitir la factura.No debes usar el número correlativo de factura (numeroFactura).Headers
string
required
Tu API Key secreta.
string
required
Debe ser
application/json.Body Parameters
integer
required
Código del motivo de anulación según el catálogo oficial del SIAT.Motivos comunes:
1= Factura mal emitida2= Datos de emisión incorrectos3= Factura o artículo devuelto
Ejemplo de petición
curl -X POST "https://www.sharkfac.com/api/v1/facturas/112/anular" \
-H "Content-Type: application/json" \
-H "x-sharkfac-key: TU_API_KEY_AQUI" \
-d '{
"codigoMotivo": 1
}'
const payload = {
codigoMotivo: 1
};
fetch("https://www.sharkfac.com/api/v1/facturas/112/anular", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-sharkfac-key": "TU_API_KEY_AQUI"
},
body: JSON.stringify(payload)
})
.then(res => res.text())
.then(console.log);
Respuesta
Factura anulada correctamente.

