File basics
Learn about the files resource.
Last updated
Learn about the files resource.
Last updated
The represents a customer-related document that is hosted on Digital River's servers. You can use the to upload, retrieve, search for, download, and delete files.
Every contains a unique identifier, which you can use to or .
To upload a customer's tax documents to our servers, and then .
When defining a file, you're only required to designate a . Providing a , along with specifying a , are optional values.
In the request, file
should adhere to the specification, which defines file transfers for the multipart/form-data protocol.
The purpose
parameter should describe the function of the file.
If you're providing Digital River with a customer's tax document, set purpose
to tax_document_customer_upload
. For details, refer to on the page.
In the request, you have the option of sending a fileName
that is suitable for saving to a filesystem as well as a user-friendly title
for the document.
If you provide a linkExpiresTime
, make sure the value adheres to the used in the Digital River APIs.
A file's size
is represented in bytes, and its type
signifies a format (e.g. pdf, jpg, or png).
A request sent with the wrong key returns a 401 Unauthorized
response status code.
In your requests, set the Content-Type
header to multipart/form-data
:
A 201 Created
response returns a :
You can use id
to , , and . You'll also need it to to share with customers.
Files may contain an array of publicly accessible . If no links have been generated, however, then links[]
does not exist.
The url
allows you to .
Once a file is created, you can or .
You can use to download a document for internal use. But to , you must provide your .
As a result, don't share url
with your customers. if you'd like to provide them access to a document.
To share files with customers, .