latestOpenAPI 3.0.12026-08-101292701.1 MB

f21981db32be

Files

Gets a file by ID

Retrieves the details of a file. You must supply the unique identifier of the file.

get/files/{id}

Path parameters

idstring required

File identifier.

Response

OK.

idstring

The unique identifier of the file.

createdTimestring date-time

The time when the file was created.

fileNamestring

A filename for the file, suitable for saving to a filesystem.

purpose'tax_document_customer_upload' | 'customer_invoice' | 'customer_credit_memo'

The purpose of the file.

titlestring

A user friendly title for the document.

sizenumber

The size in bytes of the file object.

typestring

The type of the file returned (e.g. pdf, jpg, or png).

urlstring

The URL from which the file can be downloaded. To download the file, use your live secret API key.

liveModeboolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

Example response

{
  "id": "09e2464f-9b4f-482b-ae89-732183c705be",
  "createdTime": "2018-04-25T20:36:00Z",
  "fileName": "file.png",
  "links": [
    {
      "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
      "createdTime": "2018-04-25T20:36:00Z",
      "expiresTime": "2020-04-25T20:36:00Z",
      "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
      "metadata": {
        "coupon": "iOS"
      },
      "url": "https://files.digitalriver.com/links/fl_29a093a2-8989-4def-a50c-d8950d1436d4"
    }
  ],
  "purpose": "tax_document_customer_upload",
  "title": "My 2019 Tax Certificate.",
  "size": 72334,
  "type": "png",
  "url": "https://files.digitalriver.com/files/file_17a0cab7-1ff7-478e-99f9-d4e753dec24d/content"
}