Access purchased assets

This guide explains how to retrieve secure access links for purchased digital assets after an order has been successfully completed.

HL Connect does not stream or proxy asset files directly. Instead, it provides short-lived secure URLs that grant temporary access to purchased content.


Overview

Access to assets is only available after a purchase reaches the COMPLETED state.

Access URLs are generated on demand and are short-lived. They must be requested at the moment the customer is ready to download or view the asset, and used immediately. See Link lifetime and expiration below.



Prerequisites

Before requesting access URLs, ensure that:

Attempting to access assets for orders in other states may result in an error.


Download the asset

Use this endpoint to retrieve a secure URL for downloading the purchased asset file (PDF, audio, media file, etc.).

The returned URL:

Do not cache or persist this URL. Request it the moment the customer initiates the download and redirect them straight to it. See Link lifetime and expiration.

View the asset online

Some assets support online viewing instead of direct download (for example, sheet music or interactive viewers).

This endpoint returns a secure URL suitable for embedding or redirecting the user to an online viewer.


Download and view URLs are short-lived and expire automatically. Treat every URL as single-use: request a fresh one each time the customer needs the asset, and never store, cache, or pre-send it.

The endpoint automatically re-issues a new, valid URL on every call, including after a previous link has expired, as long as the order is still COMPLETED. No separate refresh call is required.


Access lifecycle

Asset access is tightly coupled to the order lifecycle.

Order status Access behavior
PROCESSING Access not available
COMPLETED Access URLs can be generated
FAILED No access available
CANCELED Previously granted access is revoked

Vendor-initiated revocation

If a refund, dispute, or other business event occurs on the vendor side, access to the asset can be revoked.

After cancellation:


Common access pattern

sequenceDiagram
    participant Vendor
    participant HL as HL Connect
    participant Customer

    Vendor->>HL: GET /purchase/download-url
    HL-->>Vendor: Secure URL
    Vendor-->>Customer: Redirect / link
    Customer->>HL: Download / View asset

Error handling

Asset access endpoints use standard HTTP status codes:

Errors are returned in a structured JSON format and are safe to log.


Summary