Reset a download
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.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
download_id*stringThe download id.
expand?stringComma-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?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 download, working again.
application/json- 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.
"download"url*stringThe URL of this download in the API.
uridownload_id*stringThe id of the download.
date_created*stringWhen the download was made.
date-timedate_modified*stringWhen the download was last changed.
date-timetest*booleanTrue for a test-mode download.
account_id*stringThe 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*stringThe link the customer uses to download the file. It ends in the file name.
urilink_short*stringThe same link, ending in dl instead of the file name.
urifilename*stringThe name of the file.
bytes*integerThe size of the file in bytes.
expired*booleanTrue when the link no longer works, because it is past expires or out of clicks.
expires?stringWhen the link stops working. Not returned to limited tokens.
date-timeexpires_in_clicks?integerHow many clicks the link allows in all. Not returned to limited tokens.
clicks?integerHow many times the link has been used. Not returned to limited tokens.
formatted?Present only when you send formatted=true.
curl -X POST 'https://api.comecero.com/api/v1/downloads/string/reset'{ "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}Stop a download POST
Stops a download link at once: it is set to have expired yesterday with no clicks allowed, so `expired` becomes true. Use it after a refund or when a link was shared. You can turn it back on with the reset action. No request body. Secret and trusted tokens may call it.
Create a download POST
Makes a new download link to a file, for example to send a customer a file by hand. Comecero makes these on its own for each order item whose product has a file. The link's limits come from the file unless you send your own. The body is JSON and may be an empty object. The token needs the create permission on downloads. Secret and trusted tokens may call it.