# Get files

Retrieve a list of file resources (File, Folder, ContractDocument)
**Recursive behavior:**
- When filtering by `Folder.Id` (parent folder): `recursive=false` by default (returns direct children only)
- When no folder filter is specified: `recursive=true` by default (returns all files/folders)
- Use the `recursive` query parameter to explicitly override these defaults

**Examples:**
- `GET /v2/files?$filter=Folder/Id eq 786` (direct children only)
- `GET /v2/files?$filter=Folder/Id eq 786&recursive=true` (include nested descendants)
- `GET /v2/files?$filter=Type eq 'Folder'` (folders only)

**Filtering:**
- Only a single `Folder.Id` filter is allowed per request
- Results are automatically filtered to include only Matter and Contract file types

Endpoint: GET /v2/files

## Query parameters:

  - `$filter` (string)
    Filter the results using OData filter syntax

  - `$orderby` (string)
    Order the results using OData orderby syntax

  - `$skip` (integer)
    Skip the specified number of results

  - `$top` (integer)
    Limit the number of results returned

  - `recursive` (boolean)
    Specifies if child files and folders should be returned

## Response 200 fields (application/json):

  - `items` (array)
    The collection of items

  - `items.id` (integer)
    The system identifier for the file
    Example: 9456

  - `items.name` (string)
    The user defined name of the file resource
For file resources with a type of file this includes the file extension
    Example: Standard NDA.docx

  - `items.displayId` (string)
    A system generated identifier of the file resource.
Also known as "Document ID"
    Example: LV0001-0000123.1

  - `items.type` (string)
    The type of file resource
    Enum: "File", "Folder", "ContractDocument"

  - `items.folder` (object)
    The folder where the file resource is located 

Folder is null when the file resource is located at the root of the resource

  - `items.folder.folder` (object)
    The parent folder. 

The folder will be null when the folder is at the root of the resource

  - `items.folder.id` (integer)
    The system identifier for the folder
    Example: 786

  - `items.folder.name` (string)
    The name of the folder
    Example: Drafts

  - `items.contentType` (string)
    The content type of the file binary
    Example: text/plain

  - `items.resource` (object)
    The resource where the file resource is located within

  - `items.resource.id` (integer)
    The system identifier for the resource
    Example: 78914

  - `items.resource.type` (string)
    The type of the resource
    Enum: "Contract", "Matter"

  - `items.restricted` (boolean)
    Is the file resource access restricted
    Example: false

  - `items.size` (integer)
    The size of the file binary in bytes
    Example: 18139

  - `items.version` (integer)
    The version of the file
    Example: 3

  - `items.created` (object)
    The user who created the file resource and when

  - `items.created.dateUtc` (string)
    The date and time the action was performed. The date and time uses the ISO-8601 format and will be in UTC
    Example: 2024-12-25T00:00:00Z

  - `items.created.user` (object)
    The user who performed the action

  - `items.created.user.email` (string)
    The email address of the user
    Example: api.developer@lawvu.com

  - `items.created.user.firstName` (string)
    The first name of the user
    Example: Api

  - `items.created.user.id` (string)
    The unique identifier of the user
    Example: f0f1e06e-3005-4093-af7f-1934d55617e1

  - `items.created.user.lastName` (string)
    The last name of the user
    Example: Developer

  - `items.created.user.organization` (object)
    The organization the user belongs to

  - `items.created.user.organization.id` (integer)
    The system identifier for the organization
    Example: 8134

  - `items.created.user.organization.name` (string)
    The name of the organization
    Example: Api Development Organization

  - `items.created.user.organizationId` (integer)
    The system identifier for the organization
    Example: 8134

  - `items.created.userName` (string)
    The username of who performed the action
    Example: api.developer@lawvu.com

  - `items.modified` (object)
    The username who modified the file resource and when

  - `items.modified.dateUtc` (string)
    The date and time the action was performed. The date and time uses the ISO-8601 format and will be in UTC
    Example: 2024-12-25T00:00:00Z

  - `items.modified.userName` (string)
    The username of who performed the action
    Example: api.developer@lawvu.com

## Response 400 fields (application/problem+json):

  - `detail` (string)
    More information about the problem.

  - `instance` (string)
    The URI of the resource which the error relates to.

  - `operationId` (string)
    A unique trace identifier for the request. This should be provided when requesting support.

  - `status` (integer)
    The HTTP status code for the problem.

  - `title` (string)
    A short description of the error.

  - `type` (string)
    A URI which can be followed to find out more about the problem.

