---
title: "Returns a list of files"
method: GET
path: "/files"
tags: ["Files"]
---

# Returns a list of files

`GET /files`

Gets all files specified in the request.

## Query parameters

- `createdTime` object
- `endingBefore` string
- `startingAfter` string
- `limit` integer
- `ids` string[]
- `purpose` string
- `fileName` string
- `title` string
- `size` object
- `type` string

## Response `200`

200 OK

- object
  - `hasMore` boolean — Indicates whether or not there are more elements available after this set. If false this set represents the end of the list.
  - `data` FileObject[]
    - `id` string — The unique identifier of the file.
    - `createdTime` string, date-time — The time when the file was created.
    - `fileName` string — A filename for the file, suitable for saving to a filesystem.
    - `links` FileLink[] — An array of file links.
      - `id` string — Unique identifier for the file link.
      - `createdTime` string, date-time — Time when the file link was created.
      - `expired` boolean — Whether this link has already expired.
      - `expiresTime` string, date-time — Time at which the link expires.
      - `fileId` string — The file object this link points to.
      - `liveMode` boolean — Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      - `metadata` Metadata — Key-value pairs used to store additional data. Value can be string, boolean or integer types.
      - `url` string — The publicly accessible URL to download the file.
    - `purpose` 'tax_document_customer_upload' | 'customer_invoice' | 'customer_credit_memo' — The purpose of the file.
    - `title` string — A user friendly title for the document.
    - `size` number — The size in bytes of the file object.
    - `type` string — The type of the file returned (e.g. pdf, jpg, or png).
    - `url` string — The URL from which the file can be downloaded. To download the file, use your live secret API key.
    - `liveMode` boolean — Has the value true if the object exists in live mode or the value false if the object exists in test mode.

## Other responses

- `400` — 400 Bad Request
- `401` — 401 Unauthorized
- `403` — 403 Forbidden
- `405` — 405 Method Not Allowed
- `406` — 406 Not Acceptable
- `408` — 408 Request Timeout
- `429` — 429 Too Many Requests
- `500` — 500 Internal Server Error
- `502` — 502 Bad Gateway Error
- `503` — 503 Service Unavailable Error
- `504` — 504 Gateway Timeout Error

---

[API](https://skmtc.net/digitalriver/apis/digital-river-api-reference.md) · [All operations](https://skmtc.net/digitalriver/apis/digital-river-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalriver/digital-river-api-reference/revisions/f21981db32be/schema)
