comecerodocs

Reset a download

POST
/downloads/{download_id}/reset

Starts a download link over: clicks go back to 0, and the expiry and click limit are set again from the file's expires_in_days and expires_in_clicks, counted from now. Use it when a customer could not finish a download in time. No request body. Secret and trusted tokens may call it.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

download_id*string

The download id.

Query Parameters

expand?string

Comma-separated child objects to return in full instead of as a URL, for example customer,payments. Use dot notation for nested objects (items.product), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See Expanding objects.

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 download, working again.

application/json
  1. response

A download link to one of your files, usually made for an order item when a product with a file is bought. The link stops working after expires or after expires_in_clicks clicks. A limited token may read a download only when it is bound to it, such as one on the signed-in customer's order.

object*"download"

The object type. Always download.

Value in"download"
url*string

The URL of this download in the API.

Formaturi
download_id*string

The id of the download.

date_created*string

When the download was made.

Formatdate-time
date_modified*string

When the download was last changed.

Formatdate-time
test*boolean

True for a test-mode download.

account_id*string

The account the download belongs to.

file?|

The file, as a link, or the full object when you send expand=file. Left out for tokens that may not read files, such as limited tokens.

order*||

The order the download was made for, as a link, or the full object when you send expand=order. Null when it is not tied to an order.

product*||

The product the download was made for, as a link, or the full object when you send expand=product. Null when it is not tied to a product.

link*string

The link the customer uses to download the file. It ends in the file name.

Formaturi
link_short*string

The same link, ending in dl instead of the file name.

Formaturi
filename*string

The name of the file.

bytes*integer

The size of the file in bytes.

expired*boolean

True when the link no longer works, because it is past expires or out of clicks.

expires?string

When the link stops working. Not returned to limited tokens.

Formatdate-time
expires_in_clicks?integer

How many clicks the link allows in all. Not returned to limited tokens.

clicks?integer

How many times the link has been used. Not returned to limited tokens.

formatted?

Present only when you send formatted=true.

Example Request
curl -X POST 'https://api.comecero.com/api/v1/downloads/string/reset'
Example Response
{  "object": "download",  "url": "https://api.comecero.com/api/v1/downloads/0142130710600DoT3ka9Lm",  "download_id": "0142130710600DoT3ka9Lm",  "date_created": "2026-11-02T00:45:12Z",  "date_modified": "2026-11-02T00:45:12Z",  "test": true,  "account_id": "AB1234",  "file": "https://api.comecero.com/api/v1/files/0095012700001FiQ2xT7Ab",  "order": "https://api.comecero.com/api/v1/orders/6622-NXKHE-858",  "product": "https://api.comecero.com/api/v1/products/widget-pro.test",  "link": "https://cdn.comecero.net/sd/0142130710600DoT3ka9Lm/1/3fa9c2d1/widget-pro-setup.zip",  "link_short": "https://cdn.comecero.net/sd/0142130710600DoT3ka9Lm/1/3fa9c2d1/dl",  "filename": "widget-pro-setup.zip",  "bytes": 24518301,  "expired": false,  "expires": "2026-11-09T00:45:12Z",  "expires_in_clicks": 10,  "clicks": 1}