API
Listar Documentos OCR
Liste os documentos enviados para extração de dados, com filtros e paginação
GET
/
docs-gateway
/
api
/
v1
/
ocr
Listar Documentos OCR
curl --request GET \
--url https://api.valid.com/docs-gateway/api/v1/ocr \
--header 'x-api-key: <api-key>'import requests
url = "https://api.valid.com/docs-gateway/api/v1/ocr"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.valid.com/docs-gateway/api/v1/ocr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valid.com/docs-gateway/api/v1/ocr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valid.com/docs-gateway/api/v1/ocr"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.valid.com/docs-gateway/api/v1/ocr")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valid.com/docs-gateway/api/v1/ocr")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"projectId": "123e4567-e89b-12d3-a456-426614174002",
"productId": "123e4567-e89b-12d3-a456-426614174003",
"cpf": "12345678909",
"status": "COMPLETED",
"type": "ocr",
"createdAt": "2026-06-01T12:00:00.000Z",
"updatedAt": "2026-06-01T12:02:00.000Z",
"sentAt": "2026-06-01T12:00:01.000Z",
"sentToBackofficeAt": "2026-06-01T12:00:02.000Z",
"finishedAt": "2026-06-01T12:02:00.000Z",
"errorMessage": null,
"errorCode": null,
"backofficeBatchId": "229462",
"requestId": "7d7a6f2b-8d9f-4f55-9a2d-ec8e7b4f1d0c",
"name": "JOAO DA SILVA",
"workflowPresetAlias": "ocr_auto_2min",
"result": null
}
],
"pagination": {
"total": 1,
"limit": 20,
"offset": 0
}
}
{
"error": "INTERNAL_ERROR",
"message": "Failed to list documents",
"requestId": "7d7a6f2b-8d9f-4f55-9a2d-ec8e7b4f1d0c",
"timestamp": "2026-06-01T12:00:00.000Z"
}
Query Params
Os filtros são os mesmos de Listar Documentos:cpf, name, workflowPresetAlias, status, consolidatedStatus, createdFrom, createdTo, sortBy, sortOrder, limit e offset.
Response
Documentos OCR encontrados. Cada item traz os mesmos campos de Consultar Documento.Os dados extraídos não são retornados na listagem. Para obtê-los, consulte o documento pelo identificador.
Total de documentos que atendem aos filtros.Exemplo:
1Quantidade máxima de itens por página aplicada.Exemplo:
20Número de itens ignorados na paginação.Exemplo:
0{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"projectId": "123e4567-e89b-12d3-a456-426614174002",
"productId": "123e4567-e89b-12d3-a456-426614174003",
"cpf": "12345678909",
"status": "COMPLETED",
"type": "ocr",
"createdAt": "2026-06-01T12:00:00.000Z",
"updatedAt": "2026-06-01T12:02:00.000Z",
"sentAt": "2026-06-01T12:00:01.000Z",
"sentToBackofficeAt": "2026-06-01T12:00:02.000Z",
"finishedAt": "2026-06-01T12:02:00.000Z",
"errorMessage": null,
"errorCode": null,
"backofficeBatchId": "229462",
"requestId": "7d7a6f2b-8d9f-4f55-9a2d-ec8e7b4f1d0c",
"name": "JOAO DA SILVA",
"workflowPresetAlias": "ocr_auto_2min",
"result": null
}
],
"pagination": {
"total": 1,
"limit": 20,
"offset": 0
}
}
{
"error": "INTERNAL_ERROR",
"message": "Failed to list documents",
"requestId": "7d7a6f2b-8d9f-4f55-9a2d-ec8e7b4f1d0c",
"timestamp": "2026-06-01T12:00:00.000Z"
}
⌘I
Listar Documentos OCR
curl --request GET \
--url https://api.valid.com/docs-gateway/api/v1/ocr \
--header 'x-api-key: <api-key>'import requests
url = "https://api.valid.com/docs-gateway/api/v1/ocr"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.valid.com/docs-gateway/api/v1/ocr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valid.com/docs-gateway/api/v1/ocr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valid.com/docs-gateway/api/v1/ocr"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.valid.com/docs-gateway/api/v1/ocr")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valid.com/docs-gateway/api/v1/ocr")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"projectId": "123e4567-e89b-12d3-a456-426614174002",
"productId": "123e4567-e89b-12d3-a456-426614174003",
"cpf": "12345678909",
"status": "COMPLETED",
"type": "ocr",
"createdAt": "2026-06-01T12:00:00.000Z",
"updatedAt": "2026-06-01T12:02:00.000Z",
"sentAt": "2026-06-01T12:00:01.000Z",
"sentToBackofficeAt": "2026-06-01T12:00:02.000Z",
"finishedAt": "2026-06-01T12:02:00.000Z",
"errorMessage": null,
"errorCode": null,
"backofficeBatchId": "229462",
"requestId": "7d7a6f2b-8d9f-4f55-9a2d-ec8e7b4f1d0c",
"name": "JOAO DA SILVA",
"workflowPresetAlias": "ocr_auto_2min",
"result": null
}
],
"pagination": {
"total": 1,
"limit": 20,
"offset": 0
}
}
{
"error": "INTERNAL_ERROR",
"message": "Failed to list documents",
"requestId": "7d7a6f2b-8d9f-4f55-9a2d-ec8e7b4f1d0c",
"timestamp": "2026-06-01T12:00:00.000Z"
}