Skip to main content
POST

Attach incoming document to a document

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.

Parameters

Path parameters

incomingDocumentIdstringrequired

Incoming document identifier (24-char hex ObjectId)

Request body

object
documentIdstringrequired

Document identifier

documentTypestringrequired

Document type

Enum:purchaseorderpurchaserefundreceipt

Request

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())

Responses

Success responses

204Document attached successfully

Error responses

400Bad requestapplication/json
401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
404Incoming document or target document not foundapplication/json
422Accounting period locked, or the incoming document cannot be attached (for example, a Holded-to-Holded document without a linked contact)
429Rate limit exceededapplication/json