N1 APIDemo shop

FILES / Files

POST

/files/:id/download-url

Live

Get a 5-minute presigned download for a checked file

Compare

Returns a presigned S3 GET for one of your shop's files that lives 5 minutes; fetch it directly, it never passes through Core. The URL is pinned to the S3 version the check job saw, and always downloads as an attachment, never inline. Only a READY file has one: a file still being checked answers FILE_NOT_READY (try again in a few seconds) and a failed one FILE_REJECTED. Another shop's file id answers FILE_NOT_FOUND, exactly like an unknown one. Needs Authorization: Bearer <app token> and the file.read permission; no body.

POST/files/:id/download-url

Who can call this. file.read: owner, admin, accountant, supervisor, QC (operators: own jobs, once job cards exist).

Headers

  • X-Request-IdstringOptional

    Your id for this request (8–128 characters of A–Z a–z 0–9 . _ : -). Echoed back in the response header and in every error, so you can quote it when reporting a problem. Core makes one if you send none.

    Example: app-7f3c2a9e-checkout

Returns

A small JSON object; see the response examples on the right.

Errors

CodeHTTPWhen
FILE_NOT_READY409A download was asked for before the check job confirmed the upload. Try again in a few seconds.
FILE_REJECTED409The upload never arrived within its window, or what arrived did not match the declared type or size. Upload it again.
FILE_NOT_FOUND404The file id is unknown in this shop (another shop's ids answer the same).

Every error has the same body. See Errors.

Rate limit tier

Tier: per user. Over the limit you get RATE_LIMITED (HTTP 429) with a Retry-After header. See Response handling.