API
Estatísticas de OCR
Obtenha as contagens consolidadas dos documentos OCR por estado
GET
/
docs-gateway
/
api
/
v1
/
ocr
/
statistics
Estatísticas de OCR
curl --request GET \
--url https://api.valid.com/docs-gateway/api/v1/ocr/statistics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.valid.com/docs-gateway/api/v1/ocr/statistics"
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/statistics', 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/statistics",
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/statistics"
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/statistics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valid.com/docs-gateway/api/v1/ocr/statistics")
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{
"processing": 4,
"error": 1,
"approved": 35,
"rejected": 2,
"pending": 3
}
{
"error": "INTERNAL_ERROR",
"message": "Failed to retrieve document statistics",
"requestId": "7d7a6f2b-8d9f-4f55-9a2d-ec8e7b4f1d0c",
"timestamp": "2026-06-01T12:00:00.000Z"
}
Response
Documentos com status
PENDING, SENDING ou SENT.Exemplo: 4Documentos com status
ERROR.Exemplo: 1Documentos
COMPLETED com resultado APPROVED.Exemplo: 35Documentos
COMPLETED com resultado REJECTED ou MANUAL_REVIEW.Exemplo: 2Documentos
COMPLETED que ainda não têm resultado registrado.Exemplo: 3{
"processing": 4,
"error": 1,
"approved": 35,
"rejected": 2,
"pending": 3
}
{
"error": "INTERNAL_ERROR",
"message": "Failed to retrieve document statistics",
"requestId": "7d7a6f2b-8d9f-4f55-9a2d-ec8e7b4f1d0c",
"timestamp": "2026-06-01T12:00:00.000Z"
}
⌘I
Estatísticas de OCR
curl --request GET \
--url https://api.valid.com/docs-gateway/api/v1/ocr/statistics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.valid.com/docs-gateway/api/v1/ocr/statistics"
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/statistics', 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/statistics",
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/statistics"
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/statistics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valid.com/docs-gateway/api/v1/ocr/statistics")
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{
"processing": 4,
"error": 1,
"approved": 35,
"rejected": 2,
"pending": 3
}
{
"error": "INTERNAL_ERROR",
"message": "Failed to retrieve document statistics",
"requestId": "7d7a6f2b-8d9f-4f55-9a2d-ec8e7b4f1d0c",
"timestamp": "2026-06-01T12:00:00.000Z"
}