Download a field reference file (recipient)

gethttps://api.expiryedge.com/v1/getCollectionTemplateReferenceFile
Public - no API key60/min
Request
curl 'https://api.expiryedge.com/v1/getCollectionTemplateReferenceFile?token=3f9a1c7e5b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a&fieldId=fld_insurance&mode=preview'
Response
<file>

Streams the example file the sender attached to a template field. fieldId and mode are read from the query string only. The handler does not check the HTTP method; token may also be sent in a JSON body.

Query parameters

  • tokenstringrequired
    The 64-character hex token from the request link (/collect/{token}).
    pattern: ^[a-f0-9]{64}$
  • fieldIdstringrequired
  • modestring
    download sends Content-Disposition: attachment, anything else inline.
    AllowedpreviewdownloadDefault preview
  • passwordstringDeprecated
    Legacy: request password in the query string (ends up in logs). Use the X-Collection-Password header instead.

Headers

  • X-Collection-Passwordstring
    Request password, when the sender set one. Preferred over the password body field / query parameter.

Returns

200
The file bytes, with the reference file's own Content-Type (for example application/pdf).

file

Errors

400
Malformed token (Invalid link) or invalid input.
401
The request has a password and it is missing ({"requiresPassword": true}) or wrong.
403
The sender paused this request.
404
Unknown token, template gone, or the field has no reference file.
410
The request was cancelled, already completed (alreadySubmitted: true) or has expired.
429
Password locked out after 5 wrong attempts (15 minutes, per request).
500
Unexpected error, or the storage read failed mid-stream (no JSON body in that case).