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.
purchase-orders:writeGrant 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
- 201
- 401
- 403
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.