Baixar um arquivo do pedido
curl --request GET \
--url https://app.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}import requests
url = "https://app.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}', 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.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}"
req, _ := http.NewRequest("GET", url, nil)
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.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 200,
"status_message": "<string>",
"data": {
"file_name": "<string>",
"file_type": "<string>",
"id_job": "<string>",
"file_base64": "<string>"
}
}{
"status": 400,
"status_message": "Requisição incompleta",
"data": null
}{
"status": 401,
"status_message": "Token inválido",
"data": null
}{
"status": 200,
"status_message": "<string>",
"data": {}
}Letters & Telegram
Baixar um arquivo do pedido
Retorna o arquivo solicitado em base64 dentro do envelope JSON.
GET
/
api
/
v2
/
download
/
{securityToken}
/
{job_id}
/
{type}
Baixar um arquivo do pedido
curl --request GET \
--url https://app.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}import requests
url = "https://app.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}', 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.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}"
req, _ := http.NewRequest("GET", url, nil)
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.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.escrybe.com.br/api/v2/download/{securityToken}/{job_id}/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 200,
"status_message": "<string>",
"data": {
"file_name": "<string>",
"file_type": "<string>",
"id_job": "<string>",
"file_base64": "<string>"
}
}{
"status": 400,
"status_message": "Requisição incompleta",
"data": null
}{
"status": 401,
"status_message": "Token inválido",
"data": null
}{
"status": 200,
"status_message": "<string>",
"data": {}
}Parâmetros de caminho
Seu token de segurança (usado como autenticação).
Visual id do pedido — dígitos para cartas/telegramas (ex.: 2607031); ids de e-mail registrado começam com E (ex.: E2607031).
Tipo de arquivo a baixar.
Opções disponíveis:
pdf, letter_front, rr, rr_electronic, sender_copy Parâmetros de consulta
Opcional. Quando type é rr ou rr_electronic e o pedido tem mais de um aviso de recebimento, seleciona um arquivo específico (veja files no detalhe do pedido); padrão é o mais recente.