Status e resultado de uma requisição
curl --request GET \
--url https://api.scanify.com.br/extract/{requestId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scanify.com.br/extract/{requestId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scanify.com.br/extract/{requestId}', 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.scanify.com.br/extract/{requestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.scanify.com.br/extract/{requestId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.scanify.com.br/extract/{requestId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanify.com.br/extract/{requestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"document_type": "<string>",
"status": "<string>",
"current_step": "<string>",
"callback_url": "<string>",
"reference_id": "<string>",
"validation_errors": [
{}
],
"payload": {
"request_id": "<string>",
"document_type": "NFE",
"status": "success",
"fields": {},
"processed_at": "2023-11-07T05:31:56Z",
"scanify": {
"reliability_score": 123,
"reliability_level": "high",
"missing_fields": [
"<string>"
],
"inconsistencies": [
"<string>"
],
"summary": "<string>",
"schema_version": "<string>",
"confidence_heatmap": {},
"document_type_detection": {
"source": "provided",
"provided_document_type": "<string>",
"detected_document_type": "<string>",
"confidence": 123,
"threshold": 123,
"accepted": true,
"reason": "<string>"
}
},
"markdown": "<string>"
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"processed_at": "2023-11-07T05:31:56Z",
"markdown_status": "pending",
"markdown_generated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"request_id": "<string>"
}{
"error": "Unauthorized"
}{
"message": "<string>",
"request_id": "<string>"
}Consultar resultado
Consulta o status atual e, quando concluído, o resultado de uma requisição de extração assíncrona.
GET
/
extract
/
{requestId}
Status e resultado de uma requisição
curl --request GET \
--url https://api.scanify.com.br/extract/{requestId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scanify.com.br/extract/{requestId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scanify.com.br/extract/{requestId}', 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.scanify.com.br/extract/{requestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.scanify.com.br/extract/{requestId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.scanify.com.br/extract/{requestId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanify.com.br/extract/{requestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"document_type": "<string>",
"status": "<string>",
"current_step": "<string>",
"callback_url": "<string>",
"reference_id": "<string>",
"validation_errors": [
{}
],
"payload": {
"request_id": "<string>",
"document_type": "NFE",
"status": "success",
"fields": {},
"processed_at": "2023-11-07T05:31:56Z",
"scanify": {
"reliability_score": 123,
"reliability_level": "high",
"missing_fields": [
"<string>"
],
"inconsistencies": [
"<string>"
],
"summary": "<string>",
"schema_version": "<string>",
"confidence_heatmap": {},
"document_type_detection": {
"source": "provided",
"provided_document_type": "<string>",
"detected_document_type": "<string>",
"confidence": 123,
"threshold": 123,
"accepted": true,
"reason": "<string>"
}
},
"markdown": "<string>"
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"processed_at": "2023-11-07T05:31:56Z",
"markdown_status": "pending",
"markdown_generated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"request_id": "<string>"
}{
"error": "Unauthorized"
}{
"message": "<string>",
"request_id": "<string>"
}Consulta o status e o resultado de uma extração. Veja também
GET /extract/{requestId}/markdown (texto em markdown) e GET /extract/{requestId}/bounding-box (coordenadas dos campos).Authorizations
Chave de API enviada no cabeçalho Authorization no formato: Authorization: Bearer <API_KEY>.
Path Parameters
Identificador da requisição.
Response
Estado da requisição.
Resultados de validação por campo (field, error, etc.). Para a visão consolidada, prefira fields e scanify.
Quando status === 'completed' (ou 'success'/'partial_success'/'failed' no terminal), contém o ExtractionResult completo. Enquanto a requisição ainda está em processamento, é null.
Show child attributes
Show child attributes
Available options:
pending, success, failed