Skip to main content
GET
/
ocr_tasks
Get OCR tasks
curl --request GET \
  --url https://api.sandbox.monite.com/v1/ocr_tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'x-monite-version: <x-monite-version>'
{
  "data": [
    {
      "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"
      }
    }
  ],
  "next_pagination_token": "<string>",
  "prev_pagination_token": "<string>"
}

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.

Query Parameters

order
enum<string>
default:asc

Sort order (ascending by default). Typically used together with the sort parameter.

Available options:
asc,
desc
limit
integer
default:100

The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page.

Required range: 1 <= x <= 100
pagination_token
string

A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If pagination_token is specified, all other query parameters are ignored and inferred from the initial query.

If not specified, the first page of results will be returned.

sort
enum<string>

The field to sort the results by. Typically used together with the order parameter.

Available options:
id,
created_at
created_at__gt
string<date-time>

Return only ocr tasks created after the specified date and time. The value must be in the ISO 8601 format YYYY-MM-DDThh:mm[:ss[.ffffff]][Z|±hh:mm].

created_at__lt
string<date-time>

Return only ocr tasks created in Monite before the specified date and time.

created_at__gte
string<date-time>

Return only ocr tasks created on or after the specified date and time.

created_at__lte
string<date-time>

Return only ocr tasks created before or on the specified date and time.

status
enum<string>

Return only ocr tasks that have the specified status.

Available options:
processing,
success,
error
document_type
enum<string>

Return only OCR tasks related to documents of a specific type.

Available options:
invoice,
credit_note,
receipt
id__in
string<uuid>[]

Return only ocr tasks with specified IDs. Valid but nonexistent IDs do not raise errors but produce no results.

To specify multiple IDs, repeat this parameter for each value: id__in=<id1>&id__in=<id2>

Response

Successful Response

A paginated list of ocr requests.

data
object[]
required
next_pagination_token
string

A token that can be sent in the pagination_token query parameter to get the next page of results, or null if there is no next page (i.e. you've reached the last page).

prev_pagination_token
string

A token that can be sent in the pagination_token query parameter to get the previous page of results, or null if there is no previous page (i.e. you've reached the first page).