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_status": "complete",
"contact": {
"id": "com_12",
"type": "company",
"name": "Importadora Exemplo Ltda"
},
"collection_id": "col_40",
"in_triage": false,
"discarded": false,
"discard_reason": null,
"number": "INV-81244/2026",
"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",
"fields": [
{
"key": "invoice_number",
"label": "Número da Fatura",
"value": "INV-81244/2026"
},
{
"key": "invoice_date",
"label": "Data da Fatura",
"value": "2026-09-18"
},
{
"key": "exporter_name",
"label": "Exportador (Vendedor)",
"value": "Shanghai Example Trading Co., Ltd."
},
{
"key": "invoice_amount",
"label": "Valor da Fatura",
"value": "48,250.00"
},
{
"key": "currency",
"label": "Moeda",
"value": "USD"
},
{
"key": "incoterm",
"label": "Incoterm",
"value": "FOB"
},
{
"key": "line_items",
"label": "Itens da Fatura",
"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"
}
]
}
]
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "A chamada não trouxe uma chave de API válida. Envie a chave no cabeçalho Authorization, no formato Bearer <chave>.",
"code": "unauthorized"
}{
"type": "about:blank",
"title": "Payment Required",
"status": 402,
"detail": "A assinatura da organização está bloqueada. Regularize o pagamento no QX para usar a API.",
"code": "subscription_blocked"
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "O plano gratuito não inclui a API. Assine um plano pago no QX para usar a API.",
"code": "plan_required"
}{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "O recurso não existe na organização da chave.",
"code": "not_found"
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "A chave passou de um limite por minuto. Espere os segundos do cabeçalho Retry-After e chame de novo.",
"code": "rate_limited"
}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.
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_status": "complete",
"contact": {
"id": "com_12",
"type": "company",
"name": "Importadora Exemplo Ltda"
},
"collection_id": "col_40",
"in_triage": false,
"discarded": false,
"discard_reason": null,
"number": "INV-81244/2026",
"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",
"fields": [
{
"key": "invoice_number",
"label": "Número da Fatura",
"value": "INV-81244/2026"
},
{
"key": "invoice_date",
"label": "Data da Fatura",
"value": "2026-09-18"
},
{
"key": "exporter_name",
"label": "Exportador (Vendedor)",
"value": "Shanghai Example Trading Co., Ltd."
},
{
"key": "invoice_amount",
"label": "Valor da Fatura",
"value": "48,250.00"
},
{
"key": "currency",
"label": "Moeda",
"value": "USD"
},
{
"key": "incoterm",
"label": "Incoterm",
"value": "FOB"
},
{
"key": "line_items",
"label": "Itens da Fatura",
"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"
}
]
}
]
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "A chamada não trouxe uma chave de API válida. Envie a chave no cabeçalho Authorization, no formato Bearer <chave>.",
"code": "unauthorized"
}{
"type": "about:blank",
"title": "Payment Required",
"status": 402,
"detail": "A assinatura da organização está bloqueada. Regularize o pagamento no QX para usar a API.",
"code": "subscription_blocked"
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "O plano gratuito não inclui a API. Assine um plano pago no QX para usar a API.",
"code": "plan_required"
}{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "O recurso não existe na organização da chave.",
"code": "not_found"
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "A chave passou de um limite por minuto. Espere os segundos do cabeçalho Retry-After e chame de novo.",
"code": "rate_limited"
}Authorizations
A chave de API da organização, no cabeçalho Authorization: Bearer <chave>. A chave começa com qx_.
Path Parameters
O id do documento. O id começa com doc_.
Response
O documento, com os campos.
Um documento, com os campos.
O id do documento.
^doc_[1-9][0-9]*$"doc_310"
Show child attributes
Show child attributes
O andamento do documento. pending: o documento espera o envio. uploaded: o documento chegou e espera a revisão. approved: o operador aprovou o documento. rejected: o operador recusou o documento.
pending, uploaded, approved, rejected O andamento da leitura do documento. not_started: a leitura não começou. extracting, enriching e validating: a leitura está em curso. complete: a leitura terminou. failed: a leitura falhou. no_reader: o tipo de documento não tem leitura.
not_started, extracting, enriching, validating, complete, failed, no_reader O contato do documento. O valor é null quando o documento não tem contato.
Show child attributes
Show child attributes
O id da coleta do documento. O valor é null enquanto o documento está na Triagem.
^col_[1-9][0-9]*$"col_40"
Com true, o documento está na Triagem e ainda não tem coleta.
Com true, o documento está descartado.
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.
outside_pack, identical_copy, superseded, operator, null O número impresso que identifica o documento, como o número da fatura. O valor é null antes da leitura.
"INV-81244/2026"
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 A data e a hora da chegada do arquivo, no fuso horário da organização. O valor é null no slot vazio.
Os arquivos do documento. No slot vazio, a lista é vazia.
Show child attributes
Show child attributes
A data e a hora da criação, no fuso horário da organização.
"2026-09-25T10:30:00.000-03:00"
Os campos do tipo de documento, na ordem do catálogo, sem os campos de arquivo. O campo sem resposta vem com value igual a null.
Show child attributes
Show child attributes