Skip to main content
POST
Attach file to a prepared invoice (API key)

Authorizations

Authorization
string
header
default:Bearer sk_live_…
required

Bearer sk_live_… (include the Bearer prefix)

Path Parameters

invoiceId
string
required

Query Parameters

vendorId
string

Optional vendor UUID (alternative to form field)

Body

multipart/form-data
file
file
required

Invoice PDF or image (JPG, JPEG, PNG, PDF)

vendorId
string

Optional vendor UUID to prefer Tier 1 template extraction

Response

File stored and extraction queued

invoice
object
required
fileId
string<uuid>
required

Stored file id; download via JWT /api/files/:fileId in the web app

statusUrl
string
required

Relative path — prepend your API host (e.g. https://api.trysnapit.com). Poll until ready is true, then read data for extracted JSON.

Example:

"/api/v1/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890"