Skip to main content

Upload Bill Invoice File

POST 

/api/bills/ocr/files

Store a vendor invoice file without reading it, for a bill you enter by hand (for example when invoice reading is switched off). The file is kept unlinked; once the bill is saved, attach it with Link Document to Bill.

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Body (multipart/form-data):

  • file (required) - PDF or image (pdf, jpg, jpeg, png, tif, tiff, bmp, webp), max 20 MB.
  • supplier_id (optional, integer, nullable) - an existing supplier.

A file already uploaded (same content) is refused with 422 on file, with existing naming where the first copy is.

Authentication: Requires Bearer token. Permission: create bills (bills.create). Scope: purchase-orders (read/write).

Request​

Responses​

Created

Response Headers
    Content-Type