[POST] .../v1/doccontractfile/get
Returns files attached to a contract. Use this method to retrieve files linked to contracts before showing attachments, downloading file metadata or verifying whether a contract already has supporting documents. The response returns DocContractFile link records with nested CommonFile metadata; filters are id, contract_id and file_id. include_data controls whether nested file data is included and is not a filter. The contract tariff parameter must be enabled and the current request user must have contract-file select permission. Missing body, denied access, unavailable tariff, invalid file metadata schema state, database failures and other business errors are returned as HTTP 200 ErrorResult responses.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| include_data | Boolean | Optional | Indicates whether file content is included in the response. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| contract_id | int | Contract IDs. |
| file_id | int | File IDs. |
| id | int | Attached file link IDs. |
Request Example
{
"filters": [
{
"field": "contract_id",
"operator": "Equal",
"value": "9101"
}
],
"include_data": false
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of DocContractFile | Result array. |
Response Example
{
"ok": true,
"result": [
{
"id": 8101,
"contract_id": 9101,
"file": {
"id": 7001,
"name": "signed-contract",
"extension": "pdf",
"mime_type": "application/pdf",
"size": 184320,
"url": "https://cdn.example.test/documents/signed-contract.pdf",
"last_update": 1767225600
}
}
]
}