Actualizar un documento entrante
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.
Parámetros
Parámetros de ruta
stringobligatorioID del documento entrante (ObjectId hexadecimal de 24 caracteres)
Cuerpo de la petición
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
Petición
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())Respuestas
Respuestas exitosas
204Documento actualizado correctamenteRespuestas de error
400Solicitud incorrectaapplication/json401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json404Documento entrante no encontradoapplication/json422El tipo de documento no está disponible para esta cuentaapplication/json429Límite de solicitudes excedidoapplication/json