Saltar al contingut principal
PUT

Actualitzar un document entrant

Scope:inbox:inbox.write
https://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

incomingDocumentIdstringobligatori

ID del document entrant (ObjectId hexadecimal de 24 caràcters)

Cos de la petició

object
typestring | null

Document type

Enum:invoicesalesreceiptcreditnotepurchaseorderpurchaseshipmentsalesorderreceiptpurchaserefundestimatewaybillproformreceiptnoteinvoicerecurringpurchaserecurringpayrollpayrollrecurringamazonorderproductionorderinvoicingforecast
documentNumberstring | null

Document number as it appears on the document

descriptionstring | null

Free-text description or concept

issuedDatestring<date-time> | null

Document issue date (ISO 8601)

dueDatestring<date-time> | null

Document due date (ISO 8601)

paymentDatestring<date-time> | null

Payment date when the document is marked as paid (ISO 8601)

currencystring | null

ISO 4217 currency code

totalnumber | null

Total amount including taxes

discountnumber | null

Discount amount

taxBasenumber | null

Taxable base amount before taxes

multilineboolean | null

Whether the document has multiple line items

lines[]object[] | null

Line items of the document

taxes[]string[] | null

List of applicable tax keys

contactIdstring | null

Contact identifier

accountingAccountIdstring | null

Accounting account identifier

tags[]string[] | null

List of tags to assign to the document

projectIdstring | null

Project identifier

Petició

python
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 correctament

Respostes d'error

400Sol·licitud incorrectaapplication/json
401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Document entrant no trobatapplication/json
429Límit de sol·licituds exceditapplication/json