curl --request GET \
--url https://app.useqx.com/api/v1/documents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.useqx.com/api/v1/documents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.useqx.com/api/v1/documents/{id}', 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://app.useqx.com/api/v1/documents/{id}",
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://app.useqx.com/api/v1/documents/{id}"
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://app.useqx.com/api/v1/documents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.useqx.com/api/v1/documents/{id}")
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{
"id": "doc_318",
"document_type": {
"id": "dtp_31",
"name": "Fatura Comercial (Commercial Invoice)"
},
"status": "uploaded",
"reading": {
"state": "complete",
"finished_at": "2026-09-25T10:33:20.000-03:00",
"refusal": null
},
"contact": {
"id": "com_12",
"type": "company",
"name": "Importadora Exemplo Ltda"
},
"collection_id": "col_40",
"in_triage": false,
"discarded": false,
"discard_reason": null,
"replaced_by": null,
"number": "INV-81244/2026",
"external_id": "CAMBIO-2026-0042",
"arrival_channel": "api",
"arrived_at": "2026-09-25T10:32:05.000-03:00",
"files": [
{
"name": "fatura.pdf",
"content_type": "application/pdf",
"size": 182044
}
],
"created_at": "2026-09-25T10:32:05.000-03:00",
"has_problem": false,
"reading_rules": [],
"fields": [
{
"key": "invoice_number",
"label": "Número da Fatura",
"raw_value": "INV-81244/2026",
"value": "INV-81244/2026",
"value_type": "text",
"source": "reading"
},
{
"key": "invoice_date",
"label": "Data da Fatura",
"raw_value": "18/09/2026",
"value": "2026-09-18",
"value_type": "date",
"source": "reading"
},
{
"key": "exporter_name",
"label": "Exportador (Vendedor)",
"raw_value": "Shanghai Example Trading Co., Ltd.",
"value": "Shanghai Example Trading Co., Ltd.",
"value_type": "text",
"source": "reading"
},
{
"key": "invoice_amount",
"label": "Valor da Fatura",
"raw_value": "48,250.00",
"value": {
"amount": "48250.00",
"currency": "USD"
},
"value_type": "money",
"source": "reading"
},
{
"key": "currency",
"label": "Moeda",
"raw_value": "USD",
"value": "USD",
"value_type": "text",
"source": "reading"
},
{
"key": "incoterm",
"label": "Incoterm",
"raw_value": "FOB",
"value": "FOB",
"value_type": "text",
"source": "reading"
},
{
"key": "line_items",
"label": "Itens da Fatura",
"raw_value": [
{
"part_number": "A-100",
"description": "STAINLESS STEEL VALVE 1/2 IN",
"quantity": "1000",
"quantity_unit": "PCS",
"unit_price": "25.00",
"total_price": "25,000.00"
},
{
"part_number": "B-220",
"description": "BRASS FITTING 3/4 IN",
"quantity": "500",
"quantity_unit": "PCS",
"unit_price": "46.50",
"total_price": "23,250.00"
}
],
"value": [
{
"part_number": "A-100",
"description": "STAINLESS STEEL VALVE 1/2 IN",
"quantity": "1000",
"quantity_unit": "PCS",
"unit_price": "25.00",
"total_price": "25000.00"
},
{
"part_number": "B-220",
"description": "BRASS FITTING 3/4 IN",
"quantity": "500",
"quantity_unit": "PCS",
"unit_price": "46.50",
"total_price": "23250.00"
}
],
"value_type": "table",
"source": "reading",
"complete": true
}
]
}Ler um documento
Lê um documento da organização da chave, com os campos que a leitura extraiu. A chamada acha também o documento descartado. Na versão anterior de uma troca de arquivo, discard_reason é replaced, e replaced_by traz o id do documento atual.
curl --request GET \
--url https://app.useqx.com/api/v1/documents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.useqx.com/api/v1/documents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.useqx.com/api/v1/documents/{id}', 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://app.useqx.com/api/v1/documents/{id}",
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://app.useqx.com/api/v1/documents/{id}"
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://app.useqx.com/api/v1/documents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.useqx.com/api/v1/documents/{id}")
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{
"id": "doc_318",
"document_type": {
"id": "dtp_31",
"name": "Fatura Comercial (Commercial Invoice)"
},
"status": "uploaded",
"reading": {
"state": "complete",
"finished_at": "2026-09-25T10:33:20.000-03:00",
"refusal": null
},
"contact": {
"id": "com_12",
"type": "company",
"name": "Importadora Exemplo Ltda"
},
"collection_id": "col_40",
"in_triage": false,
"discarded": false,
"discard_reason": null,
"replaced_by": null,
"number": "INV-81244/2026",
"external_id": "CAMBIO-2026-0042",
"arrival_channel": "api",
"arrived_at": "2026-09-25T10:32:05.000-03:00",
"files": [
{
"name": "fatura.pdf",
"content_type": "application/pdf",
"size": 182044
}
],
"created_at": "2026-09-25T10:32:05.000-03:00",
"has_problem": false,
"reading_rules": [],
"fields": [
{
"key": "invoice_number",
"label": "Número da Fatura",
"raw_value": "INV-81244/2026",
"value": "INV-81244/2026",
"value_type": "text",
"source": "reading"
},
{
"key": "invoice_date",
"label": "Data da Fatura",
"raw_value": "18/09/2026",
"value": "2026-09-18",
"value_type": "date",
"source": "reading"
},
{
"key": "exporter_name",
"label": "Exportador (Vendedor)",
"raw_value": "Shanghai Example Trading Co., Ltd.",
"value": "Shanghai Example Trading Co., Ltd.",
"value_type": "text",
"source": "reading"
},
{
"key": "invoice_amount",
"label": "Valor da Fatura",
"raw_value": "48,250.00",
"value": {
"amount": "48250.00",
"currency": "USD"
},
"value_type": "money",
"source": "reading"
},
{
"key": "currency",
"label": "Moeda",
"raw_value": "USD",
"value": "USD",
"value_type": "text",
"source": "reading"
},
{
"key": "incoterm",
"label": "Incoterm",
"raw_value": "FOB",
"value": "FOB",
"value_type": "text",
"source": "reading"
},
{
"key": "line_items",
"label": "Itens da Fatura",
"raw_value": [
{
"part_number": "A-100",
"description": "STAINLESS STEEL VALVE 1/2 IN",
"quantity": "1000",
"quantity_unit": "PCS",
"unit_price": "25.00",
"total_price": "25,000.00"
},
{
"part_number": "B-220",
"description": "BRASS FITTING 3/4 IN",
"quantity": "500",
"quantity_unit": "PCS",
"unit_price": "46.50",
"total_price": "23,250.00"
}
],
"value": [
{
"part_number": "A-100",
"description": "STAINLESS STEEL VALVE 1/2 IN",
"quantity": "1000",
"quantity_unit": "PCS",
"unit_price": "25.00",
"total_price": "25000.00"
},
{
"part_number": "B-220",
"description": "BRASS FITTING 3/4 IN",
"quantity": "500",
"quantity_unit": "PCS",
"unit_price": "46.50",
"total_price": "23250.00"
}
],
"value_type": "table",
"source": "reading",
"complete": true
}
]
}Autorizações
Resposta
O documento, com os campos.
Um documento, com os campos.
O motivo do descarte. O valor é null no documento que não está descartado. outside_pack: nenhum pacote de operação ativo pede o tipo do documento. identical_copy: o documento repete o arquivo de outro documento. superseded: um documento mais novo substituiu este. operator: o operador descartou o documento. replaced: uma troca de arquivo criou um documento novo, e este documento ficou como versão anterior.
outside_pack, identical_copy, superseded, operator, replaced, null O canal de chegada do arquivo. O valor é null no slot vazio. email: o arquivo chegou por e-mail. portal_upload: o cliente enviou o arquivo no portal. operator_upload: o operador enviou o arquivo na tela. spreadsheet: o arquivo saiu de uma planilha. vault: o cliente reaproveitou no portal um arquivo do Cofre. api: o arquivo chegou pela API.
email, portal_upload, operator_upload, spreadsheet, vault, api, null Com true, o documento é um documento com problema. Numa coleta, a leitura recusou o arquivo, ou uma validação que bloqueia ou uma regra da leitura falhou. Na Triagem, vale a regra da Triagem: as validações que bloqueiam e as regras da leitura da mensagem do documento. Na Triagem, a leitura recusada fica de fora. Enquanto a leitura está em curso, o campo deixa de fora a recusa e as regras da leitura. O campo também deixa de fora as regras da leitura que só a equipe ou só o operador vê.