curl --request POST \
--url https://api.scanify.com.br/extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": {
"fileUrl": "<string>",
"fileBase64": "<string>",
"filename": "<string>"
},
"callbackUrl": "<string>",
"callbackAuthToken": "<string>",
"callbackMethod": "POST",
"includeMarkdownInWebhook": false,
"referenceId": "<string>",
"metadata": {},
"signature": "<string>"
}
'import requests
url = "https://api.scanify.com.br/extract"
payload = {
"file": {
"fileUrl": "<string>",
"fileBase64": "<string>",
"filename": "<string>"
},
"callbackUrl": "<string>",
"callbackAuthToken": "<string>",
"callbackMethod": "POST",
"includeMarkdownInWebhook": False,
"referenceId": "<string>",
"metadata": {},
"signature": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file: {fileUrl: '<string>', fileBase64: '<string>', filename: '<string>'},
callbackUrl: '<string>',
callbackAuthToken: '<string>',
callbackMethod: 'POST',
includeMarkdownInWebhook: false,
referenceId: '<string>',
metadata: {},
signature: '<string>'
})
};
fetch('https://api.scanify.com.br/extract', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => [
'fileUrl' => '<string>',
'fileBase64' => '<string>',
'filename' => '<string>'
],
'callbackUrl' => '<string>',
'callbackAuthToken' => '<string>',
'callbackMethod' => 'POST',
'includeMarkdownInWebhook' => false,
'referenceId' => '<string>',
'metadata' => [
],
'signature' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scanify.com.br/extract"
payload := strings.NewReader("{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"callbackUrl\": \"<string>\",\n \"callbackAuthToken\": \"<string>\",\n \"callbackMethod\": \"POST\",\n \"includeMarkdownInWebhook\": false,\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"signature\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.scanify.com.br/extract")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"callbackUrl\": \"<string>\",\n \"callbackAuthToken\": \"<string>\",\n \"callbackMethod\": \"POST\",\n \"includeMarkdownInWebhook\": false,\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"signature\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanify.com.br/extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"callbackUrl\": \"<string>\",\n \"callbackAuthToken\": \"<string>\",\n \"callbackMethod\": \"POST\",\n \"includeMarkdownInWebhook\": false,\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"signature\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"status": "in_progress"
}{
"message": "<string>",
"request_id": "<string>"
}{
"error": "Unauthorized"
}Extração assíncrona
Inicia o processamento de um documento de forma assíncrona. Retorna imediatamente um request_id com status in_progress. O resultado pode ser consultado em GET /extract/ ou recebido via callbackUrl quando informado.
curl --request POST \
--url https://api.scanify.com.br/extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": {
"fileUrl": "<string>",
"fileBase64": "<string>",
"filename": "<string>"
},
"callbackUrl": "<string>",
"callbackAuthToken": "<string>",
"callbackMethod": "POST",
"includeMarkdownInWebhook": false,
"referenceId": "<string>",
"metadata": {},
"signature": "<string>"
}
'import requests
url = "https://api.scanify.com.br/extract"
payload = {
"file": {
"fileUrl": "<string>",
"fileBase64": "<string>",
"filename": "<string>"
},
"callbackUrl": "<string>",
"callbackAuthToken": "<string>",
"callbackMethod": "POST",
"includeMarkdownInWebhook": False,
"referenceId": "<string>",
"metadata": {},
"signature": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file: {fileUrl: '<string>', fileBase64: '<string>', filename: '<string>'},
callbackUrl: '<string>',
callbackAuthToken: '<string>',
callbackMethod: 'POST',
includeMarkdownInWebhook: false,
referenceId: '<string>',
metadata: {},
signature: '<string>'
})
};
fetch('https://api.scanify.com.br/extract', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => [
'fileUrl' => '<string>',
'fileBase64' => '<string>',
'filename' => '<string>'
],
'callbackUrl' => '<string>',
'callbackAuthToken' => '<string>',
'callbackMethod' => 'POST',
'includeMarkdownInWebhook' => false,
'referenceId' => '<string>',
'metadata' => [
],
'signature' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scanify.com.br/extract"
payload := strings.NewReader("{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"callbackUrl\": \"<string>\",\n \"callbackAuthToken\": \"<string>\",\n \"callbackMethod\": \"POST\",\n \"includeMarkdownInWebhook\": false,\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"signature\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.scanify.com.br/extract")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"callbackUrl\": \"<string>\",\n \"callbackAuthToken\": \"<string>\",\n \"callbackMethod\": \"POST\",\n \"includeMarkdownInWebhook\": false,\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"signature\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanify.com.br/extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"callbackUrl\": \"<string>\",\n \"callbackAuthToken\": \"<string>\",\n \"callbackMethod\": \"POST\",\n \"includeMarkdownInWebhook\": false,\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"signature\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"status": "in_progress"
}{
"message": "<string>",
"request_id": "<string>"
}{
"error": "Unauthorized"
}request_id imediatamente; o resultado chega no callbackUrl (webhook) ou pode ser consultado em GET /extract/{requestId}.
Exemplos
curl -X POST https://api.scanify.com.br/extract \
-H "Authorization: Bearer SUA_CHAVE_DE_API" \
-H "Content-Type: application/json" \
-d '{
"file": {
"fileUrl": "https://exemplo.com/documento.pdf"
},
"documentType": "NFE",
"callbackUrl": "https://seu-app.com/webhooks/scanify",
"callbackAuthToken": "token-opcional-para-validar-no-seu-endpoint",
"signature": "assinatura-opcional"
}'
import axios from 'axios';
const { data } = await axios.post(
'https://api.scanify.com.br/extract',
{
file: {
fileUrl: 'https://exemplo.com/documento.pdf',
},
documentType: 'NFE',
callbackUrl: 'https://seu-app.com/webhooks/scanify',
callbackAuthToken: 'token-opcional-para-validar-no-seu-endpoint',
signature: 'assinatura-opcional',
},
{
headers: {
Authorization: 'Bearer SUA_CHAVE_DE_API',
},
},
);
console.log(data.request_id);
import requests
response = requests.post(
"https://api.scanify.com.br/extract",
headers={"Authorization": "Bearer SUA_CHAVE_DE_API"},
json={
"file": {
"fileUrl": "https://exemplo.com/documento.pdf",
},
"documentType": "NFE",
"callbackUrl": "https://seu-app.com/webhooks/scanify",
"callbackAuthToken": "token-opcional-para-validar-no-seu-endpoint",
"signature": "assinatura-opcional",
},
)
response.raise_for_status()
print(response.json()["request_id"])
Authorizations
Chave de API enviada no cabeçalho Authorization no formato: Authorization: Bearer <API_KEY>.
Body
Origem do arquivo. Forneça fileUrl OU fileBase64 (com filename obrigatório), nunca ambos.
Show child attributes
Show child attributes
Tipo de documento. Quando omitido na extração, o tipo é detectado automaticamente.
NFE, BOLETO, CONTRATO, RECIBO, CNH, RG, COMPROVANTE_RESIDENCIA, CONTRATO_SOCIAL, IRPF, CERTIDAO_NASCIMENTO, CERTIDAO_CASAMENTO, LAUDO_MEDICO, CERTIDAO_OBITO, PROCURACAO, HOLERITE, DOCUMENTO_VEICULAR, DOCUMENTO_JURIDICO, EXTRATO_BANCARIO, INFORME_RENDIMENTOS_EMPREGADOR_INSS, INFORME_RENDIMENTOS_BANCOS, INFORME_RENDIMENTOS_CORRETORAS, INFORME_PLANO_SAUDE, DESPESA_MEDICA, COMPROVANTE_EDUCACAO, DECLARACAO_IR_ANTERIOR URL que receberá o resultado quando o processamento terminar.
Token enviado no callback para autenticação no seu endpoint.
Método HTTP usado na chamada de callback.
POST, PATCH, PUT Inclui o markdown gerado no payload do callback.
Identificador externo para rastreamento, devolvido nas respostas.
Metadados arbitrários associados à requisição.
Assinatura opcional para validação do callback.