Download an order file
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
Download an order file
Returns the requested file as base64 inside the JSON envelope.
GET
/
api
/
v2
/
download
/
{securityToken}
/
{job_id}
/
{type}
Download an order file
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": {}
}Path Parameters
Your account security token (used as authentication).
Order visual id — digits for letters/telegrams (e.g. 2607031); registered e-mail ids start with E (e.g. E2607031).
File type to download.
Available options:
pdf, letter_front, rr, rr_electronic, sender_copy Query Parameters
Optional. When type is rr or rr_electronic and the order has more than one return receipt, selects a specific file (see files in the order detail); defaults to the most recent one.