For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • API Concepts
    • Overview
    • Environments and URLs
    • Authentication
    • API versioning
    • Rate limiting
    • HTTP headers
    • Pagination, sorting, and filtering
  • General
  • Common
  • Accounts payable
  • Accounts receivable
  • E-invoicing
  • Payments
  • Accounting integration
  • Expense management
  • Utilities
      • GETGet OCR tasks
      • POSTOCR a file from URL
      • POSTUpload a file for OCR
      • GETGet an OCR task by ID
LogoLogo
API StatusPartner Portal
UtilitiesOCR

Upload a file for OCR

POST
/ocr_tasks/upload_from_file
POST
/v1/ocr_tasks/upload_from_file
$curl -X POST https://api.sandbox.monite.com/v1/ocr_tasks/upload_from_file \
> -H "x-monite-version: 2024-05-25" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: multipart/form-data" \
> -F file=@<file1>
1{
2 "id": "id",
3 "created_at": "2024-01-15T09:30:00Z",
4 "updated_at": "2024-01-15T09:30:00Z",
5 "status": "processing",
6 "document_type": "invoice",
7 "recognized_data": {
8 "type": "invoice",
9 "recipient": {
10 "address": {
11 "city": "city",
12 "country": "AF",
13 "postal_code": "postal_code",
14 "state": "state",
15 "street_and_number": "street_and_number"
16 },
17 "bank_account": {
18 "bank_account_number": "bank_account_number",
19 "iban": "iban",
20 "swift_bic": "swift_bic"
21 },
22 "email": "email",
23 "name": "name",
24 "tax_number": "tax_number",
25 "vat_number": "vat_number"
26 },
27 "sender": {
28 "address": {
29 "city": "city",
30 "country": "AF",
31 "postal_code": "postal_code",
32 "state": "state",
33 "street_and_number": "street_and_number"
34 },
35 "bank_account": {
36 "bank_account_number": "bank_account_number",
37 "iban": "iban",
38 "swift_bic": "swift_bic"
39 },
40 "email": "email",
41 "name": "name",
42 "tax_number": "tax_number",
43 "vat_number": "vat_number"
44 },
45 "amount_paid": 1.1,
46 "currency": "AED",
47 "document_number": "document_number",
48 "due_date": "due_date",
49 "issue_date": "issue_date",
50 "line_items": [
51 {
52 "description": "description",
53 "line_reference": "line_reference",
54 "name": "name",
55 "quantity": 1.1,
56 "subtotal": 1.1,
57 "tax_amount": 1.1,
58 "tax_rate": 1.1,
59 "total_amount": 1.1,
60 "unit": "unit",
61 "unit_price": 1.1
62 }
63 ],
64 "payment_terms": "payment_terms",
65 "subtotal": 1.1,
66 "tax_amount": 1.1,
67 "tax_rate": 1.1,
68 "total_amount": 1.1
69 }
70}
Was this page helpful?
Previous

Get an OCR task by ID

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-monite-versionstringRequired
x-monite-entity-idstringOptional
The ID of the entity that owns the requested resource.

Query parameters

document_typeenumOptional
Allowed values:

Request

This endpoint expects a multipart form containing a file.
filefileRequired

Response

OCR task has been accepted for execution.
idstringformat: "uuid"
created_atdatetime
updated_atdatetime
statusenum
Allowed values:
document_typeenum
Allowed values:
recognized_dataobject

Errors

400
Post OCR Tasks Upload from File Request Bad Request Error
401
Post OCR Tasks Upload from File Request Unauthorized Error
413
Post OCR Tasks Upload from File Request Content Too Large Error
415
Post OCR Tasks Upload from File Request Unsupported Media Type Error
422
Post OCR Tasks Upload from File Request Unprocessable Entity Error
429
Post OCR Tasks Upload from File Request Too Many Requests Error