comecerodocs

Get a file

GET
/files/{file_id}

Returns one file. Secret and trusted tokens may call it.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

file_id*string

The file id.

Query Parameters

show?string

Comma-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?string

Comma-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?boolean

When 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.

Defaultfalse

Response Body

The file.

application/json
  1. 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.

Value in"file"
url*string

The URL of this file in the API.

Formaturi
file_id*string

The id of the file.

date_created*string

When the file was uploaded.

Formatdate-time
date_modified*string

When the file was last changed.

Formatdate-time
test*boolean

True for a test-mode file.

account_id*string

The account the file belongs to.

name*string

Your name for the file. The file name when you gave none.

description*|

Your notes about the file.

filename*string

The file name customers download, cleaned to letters, numbers, dashes, underscores and periods.

bytes*integer

The size of the file in bytes.

version*|

A version label, for example 2.1.

expires_in_days*integer

How many days a new download link to this file works. The default is 7.

expires_in_clicks*integer

How many clicks a new download link to this file allows. The default is 10.

formatted?

Present only when you send formatted=true.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/files/string'
Example Response
{  "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}