Saltar al contingut principal
POST

Adjuntar document entrant en un document comptable

Scope:inbox:inbox.write
https://api.holded.com/api/v2/inbox/{incomingDocumentId}/attach

Attaches an incoming document to an existing purchase document (purchase, purchase order, purchase refund, or receipt). Use this to link an invoice or receipt scanned through the inbox to a corresponding document in your accounting records.

Paràmetres

Paràmetres de ruta

incomingDocumentIdstringobligatori

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

Cos de la petició

object
documentIdstringrequired

Identificador del document al qual adjuntar

documentTypestringrequired

Tipus de document (purchase, purchaseorder, purchaserefund, receipt)

Enum:purchaseorderpurchaserefundreceipt

Petició

python
import requests

url = "https://api.holded.com/api/v2/inbox/507f1f77bcf86cd799439011/attach"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "documentId": "507f1f77bcf86cd799439011",
    "documentType": "purchase"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Respostes

Respostes exitoses

204Document adjuntat 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
422Període comptable bloquejat
429Límit de sol·licituds exceditapplication/json