Actualitzar un document entrant
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àmetres
Paràmetres de ruta
stringobligatoriID del document entrant (ObjectId hexadecimal de 24 caràcters)
Cos de la petició
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ó
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())Respostes
Respostes exitoses
204Document actualitzat correctamentRespostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Document entrant no trobatapplication/json429Límit de sol·licituds exceditapplication/json