Bulk delete invoices
Scope: sales:invoices.write https://api.alladdin.com/api/v2/invoices
Deletes up to 100 invoices in a single request. Returns 207 when some could not be deleted and 422 when all fail.
Request body
object ids[] string[]
List of invoice IDs to delete
default: ``
Request
import requests
url = "https://api.alladdin.com/api/v2/invoices"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"ids": [
"507f1f77bcf86cd799439011"
]
}
response = requests.delete(url, headers=headers, json=payload)
print(response.json())Responses
Success responses
204 All invoices deleted successfully 207 Some invoices could not be deleted
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 422 None of the invoices could be deleted application/json 429 Rate limit exceeded application/json
