## List documents `GET https://getkollek.com/api/copies/{copy}/documents` Retrieve the documents attached to a copy and to every record on it: its transactions, provenance events, valuations, insurance records, maintenance records and loans. Each document names the record it hangs from through documentable_type and documentable_id. A document is either a file stored with us or a link to one held elsewhere. A stored file is never served from a public URL; reach it through the download_url, which streams it to members of the account. Deleting a document removes its stored file too, and deleting a record removes the documents attached to it. **Permissions:** Any member of the account. ### Path parameters - `copy` (integer, required): The ID of the copy whose documents you are listing or adding to. ### Query parameters - `per_page` (integer, optional): The number of documents to return per page, between 1 and 100. Default: `10`. - `page` (integer, optional): The page number to return. Default: `1`. **Returns:** A paginated list of document objects. ### Example request ```bash curl https://getkollek.com/api/copies/1/documents \ -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/json" ``` ### Example response `Status: 200` ```json { "data": [ { "type": "document", "id": "2", "attributes": { "documentable_type": "valuation", "documentable_id": "5", "document_type": "receipt", "name": "Appraisal report", "external_url": null, "download_url": "https://getkollek.com/api/documents/2", "mime_type": "application/pdf", "size": 248000, "description": "Signed and dated by the appraiser.", "issued_at": 1704067200, "reference_number": "INV-2024-0117", "created_at": 1752537600, "updated_at": 1752537600 }, "links": { "self": "https://getkollek.com/api/documents/2" } }, { "type": "document", "id": "1", "attributes": { "documentable_type": "copy", "documentable_id": "1", "document_type": "receipt", "name": "Certificate of authenticity", "external_url": "https://drive.example.com/appraisal.pdf", "download_url": null, "mime_type": null, "size": null, "description": "Signed and dated by the appraiser.", "issued_at": 1704067200, "reference_number": "INV-2024-0117", "created_at": 1752537600, "updated_at": 1752537600 }, "links": { "self": "https://getkollek.com/api/documents/1" } } ], "links": { "first": "https://getkollek.com/api/copies/1/documents?page=1", "last": "https://getkollek.com/api/copies/1/documents?page=1", "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "last_page": 1, "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "https://getkollek.com/api/copies/1/documents?page=1", "label": "1", "active": true }, { "url": null, "label": "Next »", "active": false } ], "path": "https://getkollek.com/api/copies/1/documents", "per_page": 10, "to": 2, "total": 2 } } ```