Get a file
Returns one file. Secret and trusted tokens may call it.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
file_id*stringThe file id.
show?stringComma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
hide?stringComma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falseThe file.
application/json- response
A file you uploaded to sell as a download, such as an installer. Give it to a product with file_id, and each buyer gets a download link to it.
object*"file"The object type. Always file.
"file"url*stringThe URL of this file in the API.
urifile_id*stringThe id of the file.
date_created*stringWhen the file was uploaded.
date-timedate_modified*stringWhen the file was last changed.
date-timetest*booleanTrue for a test-mode file.
account_id*stringThe account the file belongs to.
name*stringYour name for the file. The file name when you gave none.
description*|Your notes about the file.
filename*stringThe file name customers download, cleaned to letters, numbers, dashes, underscores and periods.
bytes*integerThe size of the file in bytes.
version*|A version label, for example 2.1.
expires_in_days*integerHow many days a new download link to this file works. The default is 7.
expires_in_clicks*integerHow many clicks a new download link to this file allows. The default is 10.
formatted?Present only when you send formatted=true.
curl -X GET 'https://api.comecero.com/api/v1/files/string'{ "object": "file", "url": "https://api.comecero.com/api/v1/files/0095012700001FiQ2xT7Ab", "file_id": "0095012700001FiQ2xT7Ab", "date_created": "2026-11-01T10:12:40Z", "date_modified": "2026-11-01T10:12:40Z", "test": true, "account_id": "AB1234", "name": "Widget Pro installer", "description": null, "filename": "widget-pro-setup.zip", "bytes": 24518301, "version": "2.1", "expires_in_days": 7, "expires_in_clicks": 10}Upload a file POST
Adds a file to sell as a download. The body must be `multipart/form-data`: send the file in a part named `file` (up to 200 MB), or send `file_url` for Comecero to fetch it (up to 500 MB live, 200 MB test). A JSON body is refused with `400`. Secret and trusted tokens may call it.
Update a file POST
Changes a file's settings, or replaces the file itself. The body must be `multipart/form-data`, like the upload. Send only the fields you want to change; empty fields are ignored, so a name or description cannot be cleared. A new `file` or `file_url` replaces the stored file. Secret and trusted tokens may call it.