Bulk cancel invoices
Scope: sales:invoices.write https://api.alladdin.com/api/v2/invoices/bulk/cancel
Cancels multiple invoices (facturas) in a single request; returns 207 when some could not be cancelled (e.g. drafts or already cancelled) and 422 when all fail. Use when the user asks to cancel several invoices at once, or "cancelar facturas en bloque". See the single-invoice cancel endpoint for individual cancellations.
Request body
object ids[] string[] required
List of invoice IDs to cancel
Request
import requests
url = "https://api.alladdin.com/api/v2/invoices/bulk/cancel"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"ids": [
"string"
]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Success responses
204 All invoices cancelled 207 Some invoices could not be cancelled application/json object message string
Human-readable description of the partial failure
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 422 Unable to cancel invoices application/json 429 Rate limit exceeded application/json
