> ## Documentation Index
> Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Download a Digital Asset

> This endpoint allows you to download a digital item using the unique digital_link token.

The digital_link token value can be found by including `line_items.digital_links` in a completed order lookup.

Use the **Retrieve an Order Status** endpoint found under the Order Status tab, or the **Retrieve an Order** endpoint found under the Account / Orders tab to perform a completed order lookup.

Depending on the store that the item was purchased in, downloads may be restricted to a set number of days since the purchase was made. Additionally, the number of times a download link can be used may be restricted.

If you are not authorized to perform the download due to the download limit restrictions mentioned above, a 403 response will be returned.



## OpenAPI

````yaml /api-reference/storefront.yaml get /api/v2/storefront/digitals/{token}
openapi: 3.0.3
info:
  version: 2.0.0
  title: Storefront API
  description: >-
    Storefront API is a modern REST API based on the [JSON API
    spec](https://jsonapi.org/) which provides you with all the necessary
    endpoints to build amazing user interfaces either in JavaScript frameworks
    or native mobile libraries.


    Import to
    [Postman](https://raw.githubusercontent.com/spree/spree/main/docs/api-reference/storefront.yaml)
  contact:
    name: Vendo Connect Inc.
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  license:
    name: BSD-3-Clause
    url: https://github.com/spree/spree/blob/main/LICENSE.md
servers:
  - url: https://demo.spreecommerce.org
    description: demo
  - url: http://localhost:3000
    description: localhost
security: []
tags:
  - name: Account
  - name: Account / Address
  - name: Account / Credit Cards
  - name: Account / Orders
  - name: Cart
  - name: Cart / Line Items
  - name: Cart / Coupons
  - name: Cart / Other
  - name: Checkout
  - name: Checkout / State
  - name: Checkout / Shipments
  - name: Checkout / Payments
  - name: Checkout / Store Credit
  - name: Stripe
  - name: Adyen
  - name: Countries
  - name: Digital Downloads
  - name: Order Status
  - name: Products
  - name: Variants
  - name: Stores
  - name: Policies
  - name: Taxons
  - name: Vendors
  - name: Wishlists
  - name: Wishlists / Wished Items
paths:
  /api/v2/storefront/digitals/{token}:
    parameters:
      - schema:
          type: string
          example: 4WaA5vjMbnivskav2rMPGKzt
        name: token
        in: path
        required: true
        description: Use the token from the digital link.
    get:
      tags:
        - Digital Downloads
      summary: Download a Digital Asset
      description: >-
        This endpoint allows you to download a digital item using the unique
        digital_link token.


        The digital_link token value can be found by including
        `line_items.digital_links` in a completed order lookup.


        Use the **Retrieve an Order Status** endpoint found under the Order
        Status tab, or the **Retrieve an Order** endpoint found under the
        Account / Orders tab to perform a completed order lookup.


        Depending on the store that the item was purchased in, downloads may be
        restricted to a set number of days since the purchase was made.
        Additionally, the number of times a download link can be used may be
        restricted.


        If you are not authorized to perform the download due to the download
        limit restrictions mentioned above, a 403 response will be returned.
      operationId: get-digitals
      responses:
        '200':
          description: 200 Success - Returns the digital asset.
          content:
            image/jpeg:
              schema:
                type: object
                format: binary
            image/gif:
              schema:
                type: object
                format: binary
            image/svg+xml:
              schema:
                type: object
                format: binary
            image/bmp:
              schema:
                type: object
                format: binary
            image/tiff:
              schema:
                type: object
                format: binary
            image/png:
              schema:
                type: object
                format: binary
            video/mpeg:
              schema:
                type: object
                format: binary
            application/gzip:
              schema:
                type: object
                format: binary
            application/zip:
              schema:
                type: object
                format: binary
            application/pdf:
              schema:
                type: object
                format: binary
            font/woff:
              schema:
                type: object
                format: binary
            font/woff2:
              schema:
                type: object
                format: binary
            font/otf:
              schema:
                type: object
                format: binary
            font/ttf:
              schema:
                type: object
                format: binary
            text/plain:
              schema:
                type: object
                format: binary
        '403':
          $ref: '#/components/responses/403Forbidden'
components:
  responses:
    403Forbidden:
      description: 403 Forbidden - You are not authorized to access this page.
      content:
        application/vnd.api+json:
          schema:
            properties:
              error:
                type: string
                example: You are not authorized to access this page.
                default: You are not authorized to access this page.
          examples:
            403 Example:
              value:
                error: You are not authorized to access this page.

````