Update an incoming document
Scope: inbox:inbox.write https://api.alladdin.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
incomingDocumentId string required
Incoming document identifier (24-char hex ObjectId)
Request body
object type string | null
Document type
Enum: invoice salesreceipt creditnote purchase order purchaseshipment salesorder receipt purchaserefund estimate waybill proform receiptnote invoicerecurring purchaserecurring payroll payrollrecurring amazonorder productionorder invoicingforecast `` documentNumber string | null
Document number as it appears on the document
description string | null
Free-text description or concept
issuedDate string<date-time> | null
Document issue date (ISO 8601)
dueDate string<date-time> | null
Document due date (ISO 8601)
paymentDate string<date-time> | null
Payment date when the document is marked as paid (ISO 8601)
currency string | null
ISO 4217 currency code
total number | null
Total amount including taxes
discount number | null
Discount amount
taxBase number | null
Taxable base amount before taxes
multiline boolean | null
Whether the document has multiple line items
lines[] object[] | null
Line items of the document
taxes[] string[] | null
List of applicable tax keys
contactId string | null
Contact identifier
accountingAccountId string | null
Accounting account identifier
tags[] string[] | null
List of tags to assign to the document
projectId string | null
Project identifier
Request
import requests
url = "https://api.alladdin.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
204 Document updated successfully
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Incoming document not found application/json 429 Rate limit exceeded application/json
← PreviousConvert incoming document into a purchase document →
