LogoLogo
System Status
2020-01-07
2020-01-07
  • 2020-01-07
  • Charges
  • Checkouts
  • Country specifications
  • Customers
  • Events
  • Fees
  • File links
  • Files
  • Fulfillments
  • Orders
  • Payouts
  • Refunds
  • Returns
  • SKUs
  • Sales summaries
  • Sales transactions
  • Sources
  • Webhooks
Powered by GitBook
On this page

File links

PreviousFeesNextFiles

Last updated 5 months ago

File Links provide a secure and convenient way to share the contents of a File object with customers by generating a unique URL. This URL allows customers to access the file's content without requiring authentication. File Links are particularly useful for sharing documents, invoices, or other files associated with order management, enhancing the customer experience by simplifying access to important information.

Gets a file link by identifer

get

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

Path parameters
idstringRequired

The identifier of the file link to be retrieved.

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 /file-links/{id} HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
  "createdTime": "2025-05-09T04:58:38.881Z",
  "expired": false,
  "expiresTime": "2025-05-09T04:58:38.881Z",
  "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
  "liveMode": false,
  "metadata": {
    "coupon": "iOS"
  },
  "url": "https://files.digitalriver.com/links/fl_29a093a2-8989-4def-a50c-d8950d1436d4"
}

Deletes a file link by ID

delete

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

Path parameters
idintegerRequired

FileLink 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 /file-links/{id} HTTP/1.1
Host: api.digitalriver.com
Accept: */*

No content

  • GETReturns a list of file links
  • POSTCreates a file link
  • GETGets a file link by identifer
  • POSTUpdates a file link
  • DELETEDeletes a file link by ID

Returns a list of file links

get

Gets all the file links specified in the request.

Query parameters
createdTimestring · date-timeOptional

A filter on the list based on the createdTime field. The value can be a string with an ISO-8601 UTC format datetime or it can be a dictionary with the following options:

  • gt–return values where the createdTime field is after this timestamp
  • gte–return values where the createdTime field is after or equal to this timestamp
  • lt–return values where the createdTime field is before this timestamp
  • lte–return values where the createdTime field is before or equal to this timestamp
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.

fileIdstringOptional

Only return links with this file identifier.

expiredbooleanOptional

Filter links by expired state. By default, all links are returned.

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 /file-links HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "hasMore": true,
  "data": [
    {
      "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
      "createdTime": "2025-05-09T04:58:38.881Z",
      "expired": false,
      "expiresTime": "2025-05-09T04:58:38.881Z",
      "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
      "liveMode": false,
      "metadata": {
        "coupon": "iOS"
      },
      "url": "https://files.digitalriver.com/links/fl_29a093a2-8989-4def-a50c-d8950d1436d4"
    }
  ]
}

Creates a file link

post

Creates a new file link object.

Body
fileIdstringRequired

The identifier of the file to create a link to.

Example: file_b9bb0bce-c20e-4519-945e-45983a1b239b
expiresTimestring · date-timeRequired

A future timestamp, after which the link will no longer be usable.

metadataany ofOptional
or
or
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 /file-links HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 123

{
  "fileId": "file_b9bb0bce-c20e-4519-945e-45983a1b239b",
  "expiresTime": "2025-05-09T04:58:38.881Z",
  "metadata": {
    "coupon": "iOS"
  }
}
{
  "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
  "createdTime": "2025-05-09T04:58:38.881Z",
  "expired": false,
  "expiresTime": "2025-05-09T04:58:38.881Z",
  "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
  "liveMode": false,
  "metadata": {
    "coupon": "iOS"
  },
  "url": "https://files.digitalriver.com/links/fl_29a093a2-8989-4def-a50c-d8950d1436d4"
}

Updates a file link

post

Updates an existing file link. Expired links can no longer be updated.

Path parameters
idstringRequired

The identifier of the file link to be updated.

Body
expiresTimestring · date-timeRequired

A future timestamp, after which the link will no longer be usable.

metadataany ofOptional
or
or
Responses
200
OK.
application/json
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
post
POST /file-links/{id} HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "expiresTime": "2025-05-09T04:58:38.881Z",
  "metadata": {
    "coupon": "iOS"
  }
}
{
  "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
  "createdTime": "2025-05-09T04:58:38.881Z",
  "expired": false,
  "expiresTime": "2025-05-09T04:58:38.881Z",
  "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
  "liveMode": false,
  "metadata": {
    "coupon": "iOS"
  },
  "url": "https://files.digitalriver.com/links/fl_29a093a2-8989-4def-a50c-d8950d1436d4"
}