latestOpenAPI 3.0.12026-08-101292701.1 MB

f21981db32be

Files

Creates a file

To upload a file to Digital River, you’ll need to send a request of type <code>multipart/form-data</code>. The request should contain the file you would like to upload, as well as the parameters for creating a file. For appliation/JSON request type, a base64 encoded string may be sent in the payload.

post/files

Response

201 Created

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"
}