Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
POST

Attach incoming document to a document

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

incomingDocumentId string required

Incoming document identifier (24-char hex ObjectId)

Request body

object documentId string required

Document identifier

documentType string required

Document type

Enum: purchase order purchaserefund receipt

Request

python
import requests

url = "https://api.alladdin.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

204 Document attached successfully

Error responses

400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Incoming document or target document not found application/json 422 Accounting period locked, or the incoming document cannot be attached (for example, a Alladdin-to-Alladdin document without a linked contact) 429 Rate limit exceeded application/json

← PreviousUpload a document →

Next →Convert incoming document into a purchase document →