Viewing download links

API reference for viewing and generating download links for orders through the Fileflare API.

Beka Rice Avatar

Written by

Last updated


A separate, unauthenticated endpoint that powers the customer-facing download page. Use this when building a custom storefront or customer-account view that needs to show a customer their download links. The lookup uses the Shopify Order Status page token (visible in the URL when a customer views their order), so only that customer’s links are returned.

Does not require API key authentication — but it’s only useful when called from the storefront with a valid Shopify order token. Customer-account download links require the Premium plan to populate.

Endpoint

GET https://app.digital-downloads.com/api/v2/customer-account-orders?id={token}

Parameters

Query

  • id (string, required) — the Shopify Order Status page token. Found in the URL on the Shopify order status page, e.g. https://my-store.com/account/orders/0c732eb6fd9802a0821a9d29888baee8.

Example request

curl "https://app.digital-downloads.com/api/v2/customer-account-orders?id=0c732eb6fd9802a0821a9d29888baee8"

Example response — 200 OK

{
  "order": {
    "order_number": 1050,
    "lines": [
      {
        "product": {
          "id": "82664d96-6dfd-4343-96b0-05c46f412a5q",
          "name": "My new Book",
          "variant_name": "Paper back",
          "sku": "my-sku",
          "product_id": 123456,
          "variant_id": 1234567,
          "vendor": "my-store",
          "tags": ["books", "paper-books"]
        },
        "assets": [
          {
            "limits": {"downloaded": 5, "limit": 10},
            "data": {
              "id": "82664d96-6dfd-4343-96b0-05c46f412a5b",
              "filename": "My new book",
              "size": "10MB",
              "is_file": false,
              "is_link": true,
              "url": "https://www.my-website.com/download/my-book.pdf"
            }
          }
        ]
      }
    ],
    "assets": [],
    "text": {"title": "Download files for your orders", "text": null}
  }
}

Notes

  • order.lines contains per-product assets (attached to the product/variant).
  • order.assets contains order-level assets (attached directly to the order — see attaching to orders).
  • Each asset includes its current download counter and limit so you can render a “5 of 10 downloaded” indicator.

Common errors

  • 402 Payment required — customer-account download links need the Premium plan. Upgrade to enable.
  • 404 Not found — the order token isn’t valid, or no order matches it.

Keep learning