> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.monite.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server.

# Get OCR tasks

GET https://api.sandbox.monite.com/v1/ocr_tasks

Reference: https://docs.monite.com/api/ocr/get-ocr-tasks

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.sandbox.monite.com/v1` (sandbox, default)
- `https://api.monite.com/v1` (eu_production)
- `https://us.api.monite.com/v1` (na_production)

## Request

### Query parameters

- `order` (enum, optional) — Sort order (ascending by default). Typically used together with the `sort` parameter.
  - Allowed values: `asc`, `desc`
- `limit` (integer, optional, 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.
- `pagination_token` (string, optional) — 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, optional) — The field to sort the results by. Typically used together with the `order` parameter.
  - Allowed values: `id`, `created_at`
- `created_at__gt` (datetime, optional) — 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` (datetime, optional) — Return only ocr tasks created in Monite before the specified date and time.
- `created_at__gte` (datetime, optional) — Return only ocr tasks created on or after the specified date and time.
- `created_at__lte` (datetime, optional) — Return only ocr tasks created before or on the specified date and time.
- `status` (enum, optional) — Return only ocr tasks that have the specified status.
  - Allowed values: `processing`, `success`, `error`
- `document_type` (enum, optional) — Return only OCR tasks related to documents of a specific type.
  - Allowed values: `invoice`, `credit_note`, `receipt`
- `id__in` (string, optional) — 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>`

### Headers

- `x-monite-version` (string, required)
- `x-monite-entity-id` (string, optional) — The ID of the entity that owns the requested resource.

## Response

### 200

Successful Response

- `data` (list of OcrTaskResponseSchema, required)
- `next_pagination_token` (string, optional) — 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, optional) — 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).

## Errors

### 404 Get OCR Tasks Request Not Found Error

OCR request is not found

- `any`

### 422 Get OCR Tasks Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 500 Get OCR Tasks Request Internal Server Error

Internal Server Error

- `error` (ErrorSchema, required)

## Types

### OcrTaskResponseSchema

- `id` (string, required)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `status` (enum, required)
  - Allowed values: `processing`, `success`, `error`
- `document_type` (enum, optional)
  - Allowed values: `invoice`, `credit_note`, `receipt`
- `recognized_data` (OcrTaskResponseSchemaRecognizedData, optional)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### ErrorSchema

- `message` (string, required)

### OcrTaskResponseSchemaRecognizedData

- `type`: `invoice`
  - `recipient` (OcrCounterpartDetails, required)
  - `sender` (OcrCounterpartDetails, required)
  - `amount_paid` (double, optional)
  - `currency` (enum, optional)
    - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
  - `document_number` (string, optional)
  - `due_date` (string, optional)
  - `issue_date` (string, optional)
  - `line_items` (list of OcrLineItem, optional)
  - `payment_terms` (string, optional)
  - `subtotal` (double, optional)
  - `tax_amount` (double, optional)
  - `tax_rate` (double, optional)
  - `total_amount` (double, optional)
- `type`: `credit_note`
  - `line_items` (list of OcrLineItem, required)
  - `recipient` (OcrCounterpartDetails, required)
  - `sender` (OcrCounterpartDetails, required)
  - `currency` (enum, optional)
    - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
  - `document_number` (string, optional)
  - `issue_date` (string, optional)
  - `original_invoice_number` (string, optional)
  - `subtotal` (double, optional)
  - `tax_amount` (double, optional)
  - `tax_rate` (double, optional)
  - `total_amount` (double, optional)
- `type`: `receipt`
  - `line_items` (list of OcrReceiptLineItem, required)
  - `sender` (OcrCounterpartDetails, required)
  - `currency` (enum, optional)
    - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
  - `discount` (double, optional)
  - `document_number` (string, optional)
  - `issued_at` (datetime, optional)
  - `subtotal` (double, optional)
  - `tax_amount` (double, optional)
  - `tax_rate` (double, optional)
  - `tax_type` (string, optional)
  - `total_amount` (double, optional)

### ValidationErrorLocItem

### OcrCounterpartDetails

- `address` (OcrAddressDetails, required)
- `bank_account` (OcrBankDetails, required)
- `email` (string, optional)
- `name` (string, optional)
- `tax_number` (string, optional)
- `vat_number` (string, optional)

### OcrLineItem

- `description` (string, optional)
- `line_reference` (string, optional)
- `name` (string, optional)
- `quantity` (double, optional)
- `subtotal` (double, optional)
- `tax_amount` (double, optional)
- `tax_rate` (double, optional)
- `total_amount` (double, optional)
- `unit` (string, optional)
- `unit_price` (double, optional)

### OcrReceiptLineItem

- `description` (string, optional)
- `discount_amount` (double, optional)
- `line_reference` (string, optional)
- `name` (string, optional)
- `quantity` (double, optional)
- `subtotal` (double, optional)
- `tax_amount` (double, optional)
- `tax_rate` (double, optional)
- `total_amount` (double, optional)
- `unit` (string, optional)
- `unit_price` (double, optional)

### OcrAddressDetails

- `city` (string, optional)
- `country` (enum, optional)
  - Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `IC`, `CV`, `KY`, `CF`, `EA`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `AN`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `MK`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `SH`, `KN`, `LC`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SK`, `SI`, `SB`, `SO`, `ZA`, `SS`, `GS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `BL`, `BQ`, `CW`, `MF`, `SX`
- `postal_code` (string, optional)
- `state` (string, optional)
- `street_and_number` (string, optional)

### OcrBankDetails

- `bank_account_number` (string, optional)
- `iban` (string, optional)
- `swift_bic` (string, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "id",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "status": "processing",
      "document_type": "invoice",
      "recognized_data": {
        "type": "invoice",
        "recipient": {
          "address": {
            "city": "city",
            "country": "AF",
            "postal_code": "postal_code",
            "state": "state",
            "street_and_number": "street_and_number"
          },
          "bank_account": {
            "bank_account_number": "bank_account_number",
            "iban": "iban",
            "swift_bic": "swift_bic"
          },
          "email": "email",
          "name": "name",
          "tax_number": "tax_number",
          "vat_number": "vat_number"
        },
        "sender": {
          "address": {
            "city": "city",
            "country": "AF",
            "postal_code": "postal_code",
            "state": "state",
            "street_and_number": "street_and_number"
          },
          "bank_account": {
            "bank_account_number": "bank_account_number",
            "iban": "iban",
            "swift_bic": "swift_bic"
          },
          "email": "email",
          "name": "name",
          "tax_number": "tax_number",
          "vat_number": "vat_number"
        },
        "amount_paid": 1.1,
        "currency": "AED",
        "document_number": "document_number",
        "due_date": "due_date",
        "issue_date": "issue_date",
        "line_items": [
          {
            "description": "description",
            "line_reference": "line_reference",
            "name": "name",
            "quantity": 1.1,
            "subtotal": 1.1,
            "tax_amount": 1.1,
            "tax_rate": 1.1,
            "total_amount": 1.1,
            "unit": "unit",
            "unit_price": 1.1
          }
        ],
        "payment_terms": "payment_terms",
        "subtotal": 1.1,
        "tax_amount": 1.1,
        "tax_rate": 1.1,
        "total_amount": 1.1
      }
    }
  ],
  "next_pagination_token": "next_pagination_token",
  "prev_pagination_token": "prev_pagination_token"
}
```

**SDK Code**

```python
import requests

url = "https://api.sandbox.monite.com/v1/ocr_tasks"

headers = {
    "x-monite-version": "2024-01-31",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sandbox.monite.com/v1/ocr_tasks';
const options = {
  method: 'GET',
  headers: {'x-monite-version': '2024-01-31', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.monite.com/v1/ocr_tasks"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-monite-version", "2024-01-31")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.monite.com/v1/ocr_tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-monite-version"] = '2024-01-31'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.sandbox.monite.com/v1/ocr_tasks")
  .header("x-monite-version", "2024-01-31")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sandbox.monite.com/v1/ocr_tasks', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'x-monite-version' => '2024-01-31',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sandbox.monite.com/v1/ocr_tasks");
var request = new RestRequest(Method.GET);
request.AddHeader("x-monite-version", "2024-01-31");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-monite-version": "2024-01-31",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/ocr_tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```