Aprovar factures en lot
sales:invoices.writehttps://api.holded.com/api/v2/invoices/bulk/approveAprova múltiples factures en una única sol·licitud. Cada factura es processa de forma independent: un error en una no bloqueja les altres.
Cos de la petició
Optional scoping filter for the invoices to approve. This endpoint ALREADY targets only invoices pending approval, so for "approve all pending" pass an EMPTY object `{}` — do NOT add a payment status. Narrow only by date range (start_date/end_date) and/or contact (contact_id). The server resolves and approves every matching unapproved invoice (up to 200 per call). Provide either `filter` or `ids`, not both.
Explicit invoice ids to approve (alternative to `filter`, for a specific selection). Max 100.
Petició
import requests
url = "https://api.holded.com/api/v2/invoices/bulk/approve"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"filter": {
"start_date": "2026-05-01",
"end_date": "2026-05-31",
"contact_id": "string"
},
"ids": [
"string"
]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Respostes
Respostes exitoses
204Totes les factures aprovades correctament207Algunes factures no s'han pogut aprovarapplication/jsonHuman-readable summary
Failed document ids (with any reason produced)
Invoices approved (or already approved)
Invoices attempted in this request
Present and true when more invoices matched than the per-call limit; narrow the filter to approve the rest
Respostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json422Cap de les factures s'ha pogut aprovarapplication/json429Límit de sol·licituds exceditapplication/json