Remove a file from an invoice
DEL
/v1/invoices/{id}/files/{file_id}Removes a file from a draft invoice or offer. A booked invoice's files can't be removed, because they're what the customer received.
Requires one ofinvoices:writewrite:draftwrite:ledger
Path parameters
- Invoice ID
idfromGET /v1/invoices/{id}/files
Errors
401Missing or invalid credentials403A scope is missing, or the company is archived404It doesn't exist in this company409The invoice is not a draft429You're over the rate limit500Something went wrong on our side
Every error has the same shape. See Errors.
curl -X DELETE https://api.numina.app/v1/invoices/550e8400-e29b-41d4-a716-446655440000/files/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer numi_YOUR_API_KEY"const response = await fetch("https://api.numina.app/v1/invoices/550e8400-e29b-41d4-a716-446655440000/files/550e8400-e29b-41d4-a716-446655440000", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.NUMINA_API_KEY}`,
},
});
const data = await response.json();import os
import requests
response = requests.delete(
"https://api.numina.app/v1/invoices/550e8400-e29b-41d4-a716-446655440000/files/550e8400-e29b-41d4-a716-446655440000",
headers={
"Authorization": f"Bearer {os.environ['NUMINA_API_KEY']}",
},
)
data = response.json()