Upload a supplier invoice or receipt
Uploads a document (PDF, JPEG, PNG or WEBP, up to 50 MB; the type is read from the file, not its name) by file_url (public https, no redirects) or file_base64 with file_name. The AI reads it as an upload in the app does: the invoice then appears in GET /received-invoices with status pending_review. Check progress with GET /received-invoices/uploads/{id}. Uses one invoice credit per file. Live keys only (403 livemode_required).
Uploads a document (PDF, JPEG, PNG or WEBP, up to 50 MB; the type is read from the file, not its name) by file_url (public https, no redirects) or file_base64 with file_name. The AI reads it as an upload in the app does: the invoice then appears in GET /received-invoices with status pending_review. Check progress with GET /received-invoices/uploads/{id}. Uses one invoice credit per file. Live keys only (403 livemode_required).
apiKeyAuthorizationBearer <token>API key: gb_test_… or gb_live_…
Idempotency-Key?stringRecommended. Retrying with the same key and body within 24 hours replays the first response (header Idempotent-Replayed: true) instead of acting twice. The same key with a different body returns 422 idempotency_key_reused.
length <= 255Getbeel-Company?stringAct on one of the account's client companies (its id from GET /companies) instead of the key's own account. 404 company_not_found when the key cannot act on it.
uuidapplication/json- body
file_url?stringPublic https URL of the file (no redirects)
urilength <= 2048file_base64?stringThe file, base64-encoded (small files)
length <= 69905071file_name?stringFile name, e.g. fattura-rossi.pdf (required with file_base64)
1 <= length <= 255OK
application/json- response
object*stringid*stringUpload id (scan_…), from POST /received-invoices/uploads
^scan_\d+_[a-z0-9]+$status*stringpending and processing: the AI is reading the file; completed: the invoice is in GET /received-invoices (status pending_review); failed: error says why
"pending""processing""completed""failed"files*integer-9007199254740991 <= value <= 9007199254740991processed*integer-9007199254740991 <= value <= 9007199254740991skipped*integerFiles that were not an invoice or a duplicate
-9007199254740991 <= value <= 9007199254740991error*string|nullerror_code*|Why the AI did not read the file: ai_out_of_credits (the AI provider has no credits) or ai_unavailable (it did not answer). Nothing was saved and no invoice credit was used: upload the file again later. null otherwise.
created_at*string^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$date-timecompleted_at*|nullcurl -X POST 'https://www.getbeel.com/api/v1/received-invoices/uploads' \ -H 'Content-Type: application/json' \ -d '{}'{ "object": "received_invoice_upload", "id": "scan_1794408453000_k3j9x2a", "status": "pending", "files": -9007199254740991, "processed": -9007199254740991, "skipped": -9007199254740991, "error": "string", "error_code": "ai_out_of_credits", "created_at": "2019-08-24T14:15:22Z", "completed_at": "2019-08-24T14:15:22Z"}Receive an invoice in the sandbox POST
Test keys only (403 test_mode_required with a live key). Receives a FatturaPA (your XML or base64 .p7m, or a sample addressed to your company when the body is empty) as if a supplier sent it through SDI: it is parsed like a real one, listed by GET /received-invoices with the test key (source sdi, status pending_review) and fires received_invoice.created to test webhook endpoints. Nothing reaches the app.
Status of an upload GET
Where an upload is: pending or processing while the AI reads it, completed (the invoice is in GET /received-invoices), or failed with the error.