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

# API Reference

> Complete reference for all Filemonk API endpoints.

## Overview

The Filemonk API is a REST API for managing digital products, assets, and orders in your Shopify store. All endpoints return JSON responses and require authentication via the `X-Auth-Token` header.

## Endpoints

### Assets

Create, read, update, and delete assets — uploaded files, external URLs, and licence keys delivered to customers.

<CardGroup cols={2}>
  <Card title="List assets" icon="list" href="/api-reference/assets/list-assets">
    `GET /assets` — Search and paginate through your store's assets.
  </Card>

  <Card title="Get asset" icon="file" href="/api-reference/assets/get-asset">
    `GET /assets/{id}` — Retrieve a single asset by ID.
  </Card>

  <Card title="Create asset" icon="plus" href="/api-reference/assets/create-asset">
    `POST /assets` — Create an internal (uploaded), external URL, or licence key asset.
  </Card>

  <Card title="Upload asset" icon="upload" href="/api-reference/assets/upload-asset">
    `POST /assets` — Upload a file directly to Filemonk storage in one call.
  </Card>

  <Card title="Update asset" icon="pen" href="/api-reference/assets/update-asset">
    `PATCH /assets/{id}` — Update an existing asset.
  </Card>

  <Card title="Delete asset" icon="trash" href="/api-reference/assets/delete-asset">
    `DELETE /assets/{id}` — Remove an asset.
  </Card>
</CardGroup>

### Digital Products

Link assets to Shopify products and variants to create digital products.

<CardGroup cols={2}>
  <Card title="List digital products" icon="list" href="/api-reference/digital-products/list-digital-products">
    `GET /digital_products` — List and filter digital products.
  </Card>

  <Card title="Get digital product" icon="box" href="/api-reference/digital-products/get-digital-product">
    `GET /digital_products/{id}` — Retrieve a single digital product by ID.
  </Card>

  <Card title="Create digital product" icon="plus" href="/api-reference/digital-products/create-digital-product">
    `POST /digital_products` — Link assets to a Shopify product.
  </Card>

  <Card title="Update digital product" icon="pen" href="/api-reference/digital-products/update-digital-product">
    `PATCH /digital_products/{id}` — Update an existing digital product.
  </Card>

  <Card title="Delete digital product" icon="trash" href="/api-reference/digital-products/delete-digital-product">
    `DELETE /digital_products/{id}` — Remove a digital product.
  </Card>
</CardGroup>

### Orders

Access orders, manage attached assets, and trigger customer notifications.

<CardGroup cols={2}>
  <Card title="List orders" icon="list" href="/api-reference/orders/list-orders">
    `GET /orders` — Search, filter, and paginate through your store's orders.
  </Card>

  <Card title="Get order" icon="file" href="/api-reference/orders/get-order">
    `GET /orders/{id}` — Retrieve a single order by ID.
  </Card>

  <Card title="Get order downloads" icon="download" href="/api-reference/orders/get-order-downloads">
    `GET /orders/{id}/downloads` — Get all download files for an order with pre-computed status flags.
  </Card>

  <Card title="Attach assets to order" icon="paperclip" href="/api-reference/orders/attach-assets">
    `POST /orders/{id}/attach_assets` — Attach files to an order. **Beta**
  </Card>

  <Card title="Detach assets from order" icon="unlink" href="/api-reference/orders/detach-assets">
    `DELETE /orders/{id}/detach_assets` — Remove custom-attached files. **Beta**
  </Card>

  <Card title="Notify order" icon="envelope" href="/api-reference/orders/notify-order">
    `POST /orders/{id}/notify` — Send the download notification email. **Beta**
  </Card>

  <Card title="Upload file to order" icon="cloud-arrow-up" href="/api-reference/orders/upload-to-order">
    End-to-end guide: upload → attach → notify. **Beta**
  </Card>
</CardGroup>

## Common response codes

| Status Code                | Description                                                  |
| -------------------------- | ------------------------------------------------------------ |
| `200 OK`                   | Request succeeded                                            |
| `201 Created`              | Resource created successfully                                |
| `401 Unauthorized`         | Missing or invalid API key                                   |
| `404 Not Found`            | Resource does not exist                                      |
| `422 Unprocessable Entity` | Validation failed — check the `errors` array in the response |
| `429 Too Many Requests`    | Rate limit exceeded — check the `Retry-After` header         |
