logo

Important:

This API is designed for experienced developers only and is provided as a self-service tool with minimal support.

Please be aware that currently, this API only supports legacy checkouts and classic customer accounts. It does not support integration with New Customer Accounts & new Checkout Extensibility. Shopify has not yet enabled app integration capabilities for New Customer Accounts. It is anticipated that these Shopify features will become available later in 2024. See Shopify’s consideration guide.

Fileflare API

Assets: URL Assets

There are two types of assets:

We will cover adding “URL Assets” here. For uploading files, view this API page.


Creating URL assets

URL Assets require three fields. To create a URL asset, send a POST request to:

https://app.digital-downloads.com/api/v1/assets/store

Request

JSON
{
    "filename": "My new book",
    "size": "10MB",
    "url": "https://www.my-website.com/download/my-book.pdf"
}

Response

JSON
{
    "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"
    }
}

Using the ID returned, you can link this asset to a product.


Updating URL assets

URL Assets can be updated by sending a PUT request with the ID in the URL

https://app.digital-downloads.com/api/v1/assets/:id

Example PUT URL

https://app.digital-downloads.com/api/v1/assets/82664d96-6dfd-4343-96b0-05c46f412a5b

Request

JSON
{
    "filename": "My new book",
    "size": "12MB",
    "url": "https://www.my-website.com/download/my-new-book.pdf"
}

Response

JSON
{
    "data": {
        "id": "82664d96-6dfd-4343-96b0-05c46f412a5b",
        "filename": "My new book",
        "size": "12MB",
        "is_file": false,
        "is_link": true,
        "url": "https://www.my-website.com/download/my-new-book.pdf"
    }
}