Creates an association between the specified source document and a target item (document or folder). Associations let you link related content together so that users can navigate between items that are conceptually connected. The association type controls the semantic relationship -“ for example, marking one document as a rendition or a copy of another. Use this API to build cross-references between documents, or to link documents to folders.
/srv.asmx/AssociateDocument
/srv.asmx/AssociateDocument?AuthenticationTicket=...&DocumentPath=...&AssociateWith_ItemPath=...&AssociationTypeID=.../srv.asmx/AssociateDocument (form data)http://tempuri.org/AssociateDocument| Parameter | Type | Required | Description |
|---|---|---|---|
AuthenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
DocumentPath |
string | Yes | Full infoRouter path to the source document (e.g. /Finance/Reports/Q1-Report.pdf). |
AssociateWith_ItemPath |
string | Yes | Full infoRouter path to the target document or folder to associate with. The API first attempts to resolve this as a document; if not found, it attempts to resolve it as a folder. |
AssociationTypeID |
int | Yes | Numeric code representing the type of association to create. See valid values below. Note: If the target item (AssociateWith_ItemPath) resolves to a folder, this parameter is ignored and Related (0) is always used. |
| Value | Name | Description |
|---|---|---|
0 |
Related | General relationship between two items. |
1 |
Rendition | The target is a rendition (alternate format) of the source document. |
2 |
Copy | The target is a copy of the source document. |
3 |
ParentChild | The source is a parent of the target document. |
4 |
Derivation | The target is derived from the source document. |
<response success="true" />
<response success="false" error="Insufficient rights." />
The calling user must have the DocumentPropertyChange permission on the source document (DocumentPath). This is typically granted to document owners, domain managers, and users with Edit access. Read-only users cannot create associations.
No specific permission check is performed on the target item (AssociateWith_ItemPath) -“ only read access is needed to resolve the target path.
GET /srv.asmx/AssociateDocument
?AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&DocumentPath=/Finance/Reports/Q1-2024-Report.pdf
&AssociateWith_ItemPath=/Finance/Reports/Q1-2024-Report-Final.pdf
&AssociationTypeID=1
HTTP/1.1
POST /srv.asmx/AssociateDocument HTTP/1.1
Content-Type: application/x-www-form-urlencoded
AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&DocumentPath=/Finance/Reports/Q1-2024-Report.pdf
&AssociateWith_ItemPath=/Finance/Reports/Q1-2024-Report-Final.pdf
&AssociationTypeID=1
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://tempuri.org/">
<soap:Body>
<tns:AssociateDocument>
<tns:AuthenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:AuthenticationTicket>
<tns:DocumentPath>/Finance/Reports/Q1-2024-Report.pdf</tns:DocumentPath>
<tns:AssociateWith_ItemPath>/Finance/Reports/Q1-2024-Report-Final.pdf</tns:AssociateWith_ItemPath>
<tns:AssociationTypeID>1</tns:AssociationTypeID>
</tns:AssociateDocument>
</soap:Body>
</soap:Envelope>
AssociateWith_ItemPath resolves to a document, the AssociationTypeID is applied as specified. The association is stored bidirectionally in the database.AssociateWith_ItemPath resolves to a folder (i.e., is not found as a document), AssociationTypeID is ignored and the Related (0) type is always used for folder associations.Related between the same two items already exists, the call returns success="true" without creating a duplicate record.Related, any existing association between the same two items is deleted and then re-created with the new type. This means calling AssociateDocument is effectively an upsert operation.DocumentPath and AssociateWith_ItemPath returns an error.AssociateWith_ItemPath as a document. Only if no document is found does it try to resolve it as a folder. If neither is found, the call fails.Related (0). If you need typed associations, both sides must be documents.| Error | Description |
|---|---|
[900] Authentication failed |
Invalid or missing authentication ticket. |
[901] Session expired or Invalid ticket |
The ticket has expired or does not exist. |
Document not found. |
DocumentPath does not resolve to an existing document. |
[error from path resolution] |
AssociateWith_ItemPath does not resolve to any existing document or folder. |
Insufficient rights. |
The calling user does not have the DocumentPropertyChange permission on the source document. |
Objects cannot be associated with themselves. |
DocumentPath and AssociateWith_ItemPath resolve to the same object. |
SystemError:... |
An unexpected server-side error occurred. |