Cancel invoice
Cancel a stamped invoice or credit note with the SAT.
POST https://cotlet.dev/api/v1/facturama/invoices/{invoice_id}/cancel
write Confirm
Asks the SAT to cancel one stamped document and returns its new status. The cancellation reason is the code the SAT asks for. A cancellation cannot be undone from here. Fails with a not-found error when the ID does not exist. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id string required | string | Invoice ID from list_invoices or create_invoice. |
| reason string required | string | The SAT cancellation reason code Facturama asks for. |
| replacement_uuid string | string | UUID of the invoice that replaces this one, when the reason needs one. |
Request
curl -X POST https://cotlet.dev/api/v1/facturama/invoices/invoice_8c41d2/cancel \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"reason"}' result = client.call("facturama", "cancel_invoice", {"invoice_id":"invoice_8c41d2","reason":"reason"}) const result = await cotlet.call('facturama', 'cancel_invoice', {"invoice_id":"invoice_8c41d2","reason":"reason"}); cotlet call facturama cancel_invoice --data '{"invoice_id":"invoice_8c41d2","reason":"reason"}' Example response
{
"invoice_id": "Y61TLX-Ls_ZJFqzjanPN1w2",
"series": "FAC",
"folio": "99",
"status": "cancel_requested"
}