LogoLogo
System Status
2021-03-23
2021-03-23
  • 2021-03-23
  • Charges
  • Checkouts
  • Country specifications
  • Customers
  • Events
  • Fees
  • File links
  • Files
  • Fulfillment cancellations
  • Fulfillment orders
  • Fulfillment returns
  • Fulfillments
  • Inventory items
  • Inventory levels
  • Invoices
  • Orders
  • Payouts
  • Plans
  • Refunds
  • Reservations
  • Returns
  • Sales summaries
  • Sales transactions
  • Shipments
  • Shipping quotes
  • SKUs
  • SKU groups
  • Sources
  • Subscriptions
  • Tax identifiers
  • Webhooks
Powered by GitBook
On this page

Files

PreviousFile linksNextFulfillment cancellations

Last updated 5 months ago

The Files resource in the Digital River API provides a secure and organized way to manage and access various documents and records associated with order management. This resource facilitates the uploading and storing of files, such as customer tax certificates and invoices, ensuring they are readily available for retrieval and review. By leveraging the Files resource, you can efficiently handle documentation critical to transaction processing and compliance within the Digital River ecosystem.

Gets a file by ID

get

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

Authorizations
Path parameters
idstringRequired

File identifier.

Responses
200
OK.
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
404
404 Not Found
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
get
GET /files/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "09e2464f-9b4f-482b-ae89-732183c705be",
  "createdTime": "2025-05-09T05:01:19.000Z",
  "fileName": "file.png",
  "links": [
    {
      "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
      "createdTime": "2025-05-09T05:01:19.000Z",
      "expired": false,
      "expiresTime": "2025-05-09T05:01:19.000Z",
      "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
      "liveMode": false,
      "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",
  "liveMode": false
}

Deletes a file by ID

delete

Permanently deletes a file. Supply the unique identifier of the file.

Authorizations
Path parameters
idstringRequired

File ID

Responses
204
204 No Content
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
404
401 Not Found
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
409
409 Conflict
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
delete
DELETE /files/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

  • GETReturns a list of files
  • POSTCreates a file
  • GETGets a file by ID
  • DELETEDeletes a file by ID

Returns a list of files

get

Gets all files specified in the request.

Authorizations
Query parameters
endingBeforestringOptional

A cursor for use in pagination. The endingBefore parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with xyz your subsequent calls can include endingBefore=xyz in order to fetch the previous page of the list.

startingAfterstringOptional

A cursor for use in pagination. The startingAfter parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with xyz, your subsequent calls can include startingAfter=xyz in order to fetch the next page of the list.

limitinteger · min: 1 · max: 100Optional

A limit on the number of objects returned. Limit can range between 1 and 100, and the default is 10.

idsstring[]Optional

Only return objects with these IDs.

purposestringOptional

Only return files with this purpose.

fileNamestringOptional

Only return files with this file name.

titlestringOptional

Only return files with this title.

typestringOptional

Only return files of this type.

Responses
200
200 OK
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
get
GET /files HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "hasMore": true,
  "data": [
    {
      "id": "09e2464f-9b4f-482b-ae89-732183c705be",
      "createdTime": "2025-05-09T05:01:19.000Z",
      "fileName": "file.png",
      "links": [
        {
          "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
          "createdTime": "2025-05-09T05:01:19.000Z",
          "expired": false,
          "expiresTime": "2025-05-09T05:01:19.000Z",
          "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
          "liveMode": false,
          "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",
      "liveMode": false
    }
  ]
}

Creates a file

post

To upload a file to Digital River, you’ll need to send a request of type multipart/form-data. 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.

Authorizations
Body
filestring · binaryRequired

A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the multipart/form-data protocol). Alternatively, a base64 encoded string may be sent.

purposestring · enumRequired

The purpose of the uploaded file.

Example: tax_document_customer_uploadPossible values:
fileNamestringOptional

A filename for the file, suitable for saving to a filesystem. fileName is required for a based64 encoded file.

Example: file.png
titlestringOptional

A user friendly title for the document.

Example: My 2019 Tax Certificate.
linkExpiresTimestring · date-timeOptional

Time at which the link expires.

Responses
201
201 Created
application/json
400
400 Bad Request
application/json
401
401 Unauthorized
application/json
403
403 Forbidden
application/json
405
405 Method Not Allowed
application/json
406
406 Not Acceptable
application/json
408
408 Request Timeout
application/json
409
409 Conflict
application/json
429
429 Too Many Requests
application/json
500
500 Internal Server Error
application/json
502
502 Bad Gateway Error
application/json
503
503 Service Unavailable Error
application/json
504
504 Gateway Timeout Error
application/json
post
POST /files HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 160

{
  "file": "binary",
  "purpose": "tax_document_customer_upload",
  "fileName": "file.png",
  "title": "My 2019 Tax Certificate.",
  "linkExpiresTime": "2025-05-09T05:01:19.000Z"
}
{
  "id": "09e2464f-9b4f-482b-ae89-732183c705be",
  "createdTime": "2025-05-09T05:01:19.000Z",
  "fileName": "file.png",
  "links": [
    {
      "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
      "createdTime": "2025-05-09T05:01:19.000Z",
      "expired": false,
      "expiresTime": "2025-05-09T05:01:19.000Z",
      "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
      "liveMode": false,
      "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",
  "liveMode": false
}