# Retrieve a Document

`GET /lokta-lms/api/v1/{entityType}/{entityId}/documents/{documentId}`

Example Requests:

- clients/1/documents/1
- loans/1/documents/1
- client_identifiers/1/documents/1?fields=name,description

## Parameters
- `entityType` (path, string, required)
- `entityId` (path, integer, required)
- `documentId` (path, integer, required)

## Responses
- `default`: default response

## Response fields
- `description` (string)
- `fileName` (string)
- `id` (integer)
- `location` (string)
- `name` (string)
- `parentEntityId` (integer)
- `parentEntityType` (string)
- `size` (integer)
- `storageType` (integer)
- `type` (string)

## Example request (cURL)
```bash
curl -X GET \
  'http://localhost:8080/lokta-lms/api/v1/{entityType}/{entityId}/documents/{documentId}' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default'
```

## Example response
```json
{
  "description": "string",
  "fileName": "string",
  "id": 1,
  "location": "string"
}
```

Interactive: https://developer.lokta.ai/reference.html#operation/getDocument
