Update an incoming document
inbox:inbox.writehttps://api.holded.com/api/v2/inbox/{incomingDocumentId}Updates the details of an incoming document. Send only the fields you want to update; omitted fields are left unchanged. Use this to modify document information such as type, document number, dates, totals, contact, tags, etc.
Parameters
Path parameters
stringrequiredIncoming document identifier (24-char hex ObjectId)
Request body
Document type
invoicesalesreceiptcreditnotepurchaseorderpurchaseshipmentsalesorderreceiptpurchaserefundestimatewaybillproformreceiptnoteinvoicerecurringpurchaserecurringpayrollpayrollrecurringamazonorderproductionorderinvoicingforecastDocument number as it appears on the document
Free-text description or concept
Document issue date (ISO 8601)
Document due date (ISO 8601)
Payment date when the document is marked as paid (ISO 8601)
ISO 4217 currency code
Total amount including taxes
Discount amount
Taxable base amount before taxes
Whether the document has multiple line items
Line items of the document
List of applicable tax keys
Contact identifier
Accounting account identifier
List of tags to assign to the document
Project identifier
Request
import requests
url = "https://api.holded.com/api/v2/inbox/507f1f77bcf86cd799439011"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"type": "purchase",
"documentNumber": "INV-2024-001",
"description": "Office supplies",
"issuedDate": "2024-01-15T00:00:00Z",
"dueDate": "2024-02-15T00:00:00Z",
"paymentDate": "2024-01-20T00:00:00Z",
"currency": "EUR",
"total": 1210,
"discount": 0,
"taxBase": 1000,
"multiline": true,
"lines": [
{}
],
"taxes": [
"IVA_21"
],
"contactId": "507f1f77bcf86cd799439011",
"accountingAccountId": "507f1f77bcf86cd799439011",
"tags": [
"office",
"supplies"
],
"projectId": "507f1f77bcf86cd799439011"
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())Responses
Success responses
204Document updated successfullyError responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Incoming document not foundapplication/json422Validation errorapplication/json429Rate limit exceededapplication/json