Skip to main content
POST
/
ocr_tasks
OCR a file from URL
curl --request POST \
  --url https://api.sandbox.monite.com/v1/ocr_tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-monite-version: <x-monite-version>' \
  --data '
{
  "file_url": "<string>",
  "document_type": "invoice"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "status": "processing",
  "document_type": "invoice",
  "recognized_data": {
    "recipient": {
      "address": {
        "city": "<string>",
        "country": "AF",
        "postal_code": "<string>",
        "state": "<string>",
        "street_and_number": "<string>"
      },
      "bank_account": {
        "bank_account_number": "<string>",
        "iban": "<string>",
        "swift_bic": "<string>"
      },
      "email": "<string>",
      "name": "<string>",
      "tax_number": "<string>",
      "vat_number": "<string>"
    },
    "sender": {
      "address": {
        "city": "<string>",
        "country": "AF",
        "postal_code": "<string>",
        "state": "<string>",
        "street_and_number": "<string>"
      },
      "bank_account": {
        "bank_account_number": "<string>",
        "iban": "<string>",
        "swift_bic": "<string>"
      },
      "email": "<string>",
      "name": "<string>",
      "tax_number": "<string>",
      "vat_number": "<string>"
    },
    "amount_paid": 123,
    "currency": "AED",
    "document_number": "<string>",
    "due_date": "2023-12-25",
    "issue_date": "2023-12-25",
    "line_items": [
      {
        "description": "<string>",
        "line_reference": "<string>",
        "name": "<string>",
        "quantity": 123,
        "subtotal": 123,
        "tax_amount": 123,
        "tax_rate": 123,
        "total_amount": 123,
        "unit": "<string>",
        "unit_price": 123
      }
    ],
    "payment_terms": "<string>",
    "subtotal": 123,
    "tax_amount": 123,
    "tax_rate": 123,
    "total_amount": 123,
    "type": "invoice"
  }
}

Authorizations

Authorization
string
header
required

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

Headers

x-monite-version
string<date>
required
x-monite-entity-id
string<uuid>

The ID of the entity that owns the requested resource.

Body

application/json
file_url
string
required
document_type
enum<string>
Available options:
invoice,
credit_note,
receipt

Response

OCR task has been accepted for execution.

id
string<uuid>
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
status
enum<string>
required
Available options:
processing,
success,
error
document_type
enum<string>
Available options:
invoice,
credit_note,
receipt
recognized_data
object