Retrieve a File
GET
/v1/files/:id
Retrieves the file with the given ID.
curl "https://api.lemonsqueezy.com/v1/files/1" \
-H 'Accept: application/vnd.api+json' \
-H 'Content-Type: application/vnd.api+json' \
-H 'Authorization: Bearer {api_key}'
Returns
Returns a File object.
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://api.lemonsqueezy.com/v1/files/1"
},
"data": {
"type": "files",
"id": "1",
"attributes": {
"variant_id": 168,
"identifier": "6dce5ba7-76f2-481f-ad1e-9c2bec6eb0e2",
"name": "lemonade.zip",
"extension": "zip",
"download_url": "https://app.lemonsqueezy.com/download/6dce5ba7-76f2-481f-ad1e-9c2bec6eb0e2?expires=1636384018&signature=f0a9bdec44ffabf143d4689594491f42a76d773d3cc88ec23ef84d6e903e8f11",
"size": 874694,
"size_formatted": "854 KB",
"version": "1.0.0",
"sort": 1,
"status": "published",
"createdAt": "2024-11-05T10:22:14.000000Z",
"updatedAt": "2024-11-05T16:16:33.000000Z",
"test_mode": false
},
"relationships": {
"variant": {
"links": {
"related": "https://api.lemonsqueezy.com/v1/files/1/variant",
"self": "https://api.lemonsqueezy.com/v1/files/1/relationships/variant"
}
}
},
"links": {
"self": "https://api.lemonsqueezy.com/v1/files/1"
}
}
}