File links

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.

get

Gets all the file links 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.

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
get
GET /file-links HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "hasMore": true,
  "data": [
    {
      "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
      "createdTime": {
        "offset": {
          "totalSeconds": 0,
          "id": "Z",
          "rules": {
            "fixedOffset": true,
            "transitions": [],
            "transitionRules": []
          }
        },
        "nano": 0,
        "year": 2018,
        "monthValue": 4,
        "dayOfMonth": 25,
        "hour": 20,
        "minute": 36,
        "second": 0,
        "dayOfWeek": "WEDNESDAY",
        "dayOfYear": 115,
        "month": "APRIL"
      },
      "expired": false,
      "expiresTime": {
        "offset": {
          "totalSeconds": 0,
          "id": "Z",
          "rules": {
            "fixedOffset": true,
            "transitions": [],
            "transitionRules": []
          }
        },
        "nano": 0,
        "year": 2020,
        "monthValue": 4,
        "dayOfMonth": 25,
        "hour": 20,
        "minute": 36,
        "second": 0,
        "dayOfWeek": "SATURDAY",
        "dayOfYear": 116,
        "month": "APRIL"
      },
      "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.

Authorizations
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.

Example: {"offset":{"totalSeconds":0,"id":"Z","rules":{"fixedOffset":true,"transitions":[],"transitionRules":[]}},"nano":0,"year":2020,"monthValue":4,"dayOfMonth":25,"hour":20,"minute":36,"second":0,"dayOfWeek":"SATURDAY","dayOfYear":116,"month":"APRIL"}
Responses
201
201 Created
application/json
post
POST /file-links HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 342

{
  "fileId": "file_b9bb0bce-c20e-4519-945e-45983a1b239b",
  "expiresTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2020,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "dayOfWeek": "SATURDAY",
    "dayOfYear": 116,
    "month": "APRIL"
  },
  "metadata": {
    "coupon": "iOS"
  }
}
{
  "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
  "createdTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2018,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 115,
    "month": "APRIL"
  },
  "expired": false,
  "expiresTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2020,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "dayOfWeek": "SATURDAY",
    "dayOfYear": 116,
    "month": "APRIL"
  },
  "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
  "liveMode": false,
  "metadata": {
    "coupon": "iOS"
  },
  "url": "https://files.digitalriver.com/links/fl_29a093a2-8989-4def-a50c-d8950d1436d4"
}
get

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

Authorizations
Path parameters
idstringRequired

The identifier of the file link to be retrieved.

Responses
200
OK.
application/json
get
GET /file-links/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
  "createdTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2018,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 115,
    "month": "APRIL"
  },
  "expired": false,
  "expiresTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2020,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "dayOfWeek": "SATURDAY",
    "dayOfYear": 116,
    "month": "APRIL"
  },
  "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.

Authorizations
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.

Example: {"offset":{"totalSeconds":0,"id":"Z","rules":{"fixedOffset":true,"transitions":[],"transitionRules":[]}},"nano":0,"year":2020,"monthValue":4,"dayOfMonth":25,"hour":20,"minute":36,"second":0,"dayOfWeek":"SATURDAY","dayOfYear":116,"month":"APRIL"}
Responses
200
OK.
application/json
post
POST /file-links/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 289

{
  "expiresTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2020,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "dayOfWeek": "SATURDAY",
    "dayOfYear": 116,
    "month": "APRIL"
  },
  "metadata": {
    "coupon": "iOS"
  }
}
{
  "id": "link_d992b05c-31d3-485e-b1f7-7b95f06cbfe8",
  "createdTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2018,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 115,
    "month": "APRIL"
  },
  "expired": false,
  "expiresTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 0,
    "year": 2020,
    "monthValue": 4,
    "dayOfMonth": 25,
    "hour": 20,
    "minute": 36,
    "second": 0,
    "dayOfWeek": "SATURDAY",
    "dayOfYear": 116,
    "month": "APRIL"
  },
  "fileId": "file_09e2464f-9b4f-482b-ae89-732183c705be",
  "liveMode": false,
  "metadata": {
    "coupon": "iOS"
  },
  "url": "https://files.digitalriver.com/links/fl_29a093a2-8989-4def-a50c-d8950d1436d4"
}

Last updated