Attach assets to order
/orders/{id}/attach_assetsCosts 2 rate-limit points · Rate limits
Attach one or more existing assets to an order as custom files. Creates an order-level collection and links the assets to it. Assets attached this way appear on the customer's download page alongside product-level assets.
Beta: this endpoint is in active development. The request and response shapes are stable for production use, but we may add new fields or capabilities without notice.
Path parameters
idstringRequiredThe order ID
Headers
X-Auth-TokenstringRequiredAPI key for authentication
Request body
asset_idsarray of stringsRequiredArray of asset UUIDs to attach to the order
Returns
orderobjectShow 10 child attributesHide child attributes
idstringUnique order identifier
namestringOrder name/number (e.g. "#1001")
emailstringCustomer email address
phonestring, nullableCustomer phone number
financial_statusstring, nullableFinancial status of the order
One ofpaidpendingpartially_paidpartially_refundedrefundedvoidedauthorizedfulfillment_statusstring, nullableFulfillment status of the order
total_pricestring, nullableTotal price of the order
currencystring, nullableCurrency code (ISO 4217)
created_atstringWhen the order was created in Shopify
download_countintegerTotal number of downloads for this order
attached_assetsarray of objectsShow 8 child attributesHide child attributes
idstringAsset identifier
typestringThe asset type.
One ofinternalexternallicencenamestring, nullableDisplay name of the asset.
filenamestring, nullableFilename of the asset.
external_urlstring, nullableExternal URL for
externaltype assets.content_typestring, nullableMIME type of the asset.
byte_sizeintegerFile size in bytes.
created_atstringWhen the asset was created.
Errors
Resource not found
Validation failed
curl -X POST "https://app.filemonk.io/api/v1/external/orders/{id}/attach_assets" \
-H "X-Auth-Token: $FILEMONK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"asset_ids": [
"f1e2d3c4-b5a6-7890-fedc-ba0987654321"
]
}'const res = await fetch("https://app.filemonk.io/api/v1/external/orders/{id}/attach_assets", {
method: "POST",
headers: {
"X-Auth-Token": process.env.FILEMONK_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"asset_ids": [
"f1e2d3c4-b5a6-7890-fedc-ba0987654321"
]
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.filemonk.io/api/v1/external/orders/{id}/attach_assets",
headers={"X-Auth-Token": os.environ["FILEMONK_API_KEY"]},
json={
"asset_ids": [
"f1e2d3c4-b5a6-7890-fedc-ba0987654321"
]
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.filemonk.io/api/v1/external/orders/{id}/attach_assets")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["FILEMONK_API_KEY"], "Content-Type" => "application/json")
req.body = {
asset_ids: [
"f1e2d3c4-b5a6-7890-fedc-ba0987654321"
]
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"order": {
"id": "3e84eb8d-e1d9-4e92-a4b2-a419c7f1122f",
"name": "#1001",
"email": "customer@example.com",
"phone": "+1234567890",
"financial_status": "paid",
"fulfillment_status": "fulfilled",
"total_price": "29.99",
"currency": "USD",
"created_at": "2026-01-15T09:30:00Z",
"download_count": 5
},
"attached_assets": [
{
"id": "3e84eb8d-e1d9-4e92-a4b2-a419c7f1122f",
"type": "internal",
"name": "string",
"filename": "string",
"external_url": "https://example.com",
"content_type": "string",
"byte_size": 1,
"created_at": "2026-01-15T09:30:00Z"
}
]
}{
"error": "API key is required"
}{
"error": "Resource not found"
}