Access purchased assets

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

HL Connector does not stream or proxy asset files directly. Instead, it provides secure that grant 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 can be safely exposed to end users.



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:

HL Connector does not require additional authentication when accessing the URL.


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.


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 Connector
    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