Get boleto
curl --request GET \
--url https://api.sandbox.trio.com.br/banking/cashin/boletos/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.sandbox.trio.com.br/banking/cashin/boletos/{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://api.sandbox.trio.com.br/banking/cashin/boletos/{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: Basic <encoded-value>"
],
]);
$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://api.sandbox.trio.com.br/banking/cashin/boletos/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"amount": 10000,
"barcode": "12341111222233334444555566667777888899990000",
"boleto_url": "https://example.com/boleto_1",
"description": "description",
"digitable_line": "12341111222233334444555566667777888899990000",
"due_detail": {
"discount": {
"fixed_until_due": {
"amounts": [
{
"amount": 10,
"date": "2024-08-13"
},
{
"amount": 9,
"date": "2024-08-14"
},
{
"amount": 8,
"date": "2024-08-15"
}
],
"calculation_type": "amount"
},
"per_day_antecipated": {
"amount": 2,
"calculation_days": "working",
"calculation_type": "amount"
}
},
"due_date": "2024-08-10",
"fine": {
"amount": 10,
"calculation_type": "percentage"
},
"interest": {
"amount": 20,
"calculation_type": "daily_rate"
}
},
"expiration_date": "2024-08-30T23:59:59.999999Z",
"external_id": "0190b2a4-8a3b-d123-050e-8d659ace1e2d",
"id": "0196f83d-cafa-f412-1f1d-129cdf2dda49",
"invoice_type": "commercial_duplicate",
"issue_date": "2024-07-24T10:00:00.000000Z",
"notes": [
"note 1",
"note 2",
"note 3"
],
"status": "confirmed",
"virtual_account_id": "0196f83d-cafa-f412-1f1d-129cdf2dda49",
"wallet_type": "direct_electronic_partial_emission_booklet"
}
]
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}{
"error": {
"error_code": "INTEGRATION_ERROR",
"error_message": "An unexpected issue occurred"
}
}Boleto
Get boleto
Get a boleto by ID
GET
/
banking
/
cashin
/
boletos
/
{id}
Get boleto
curl --request GET \
--url https://api.sandbox.trio.com.br/banking/cashin/boletos/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.sandbox.trio.com.br/banking/cashin/boletos/{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://api.sandbox.trio.com.br/banking/cashin/boletos/{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: Basic <encoded-value>"
],
]);
$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://api.sandbox.trio.com.br/banking/cashin/boletos/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"amount": 10000,
"barcode": "12341111222233334444555566667777888899990000",
"boleto_url": "https://example.com/boleto_1",
"description": "description",
"digitable_line": "12341111222233334444555566667777888899990000",
"due_detail": {
"discount": {
"fixed_until_due": {
"amounts": [
{
"amount": 10,
"date": "2024-08-13"
},
{
"amount": 9,
"date": "2024-08-14"
},
{
"amount": 8,
"date": "2024-08-15"
}
],
"calculation_type": "amount"
},
"per_day_antecipated": {
"amount": 2,
"calculation_days": "working",
"calculation_type": "amount"
}
},
"due_date": "2024-08-10",
"fine": {
"amount": 10,
"calculation_type": "percentage"
},
"interest": {
"amount": 20,
"calculation_type": "daily_rate"
}
},
"expiration_date": "2024-08-30T23:59:59.999999Z",
"external_id": "0190b2a4-8a3b-d123-050e-8d659ace1e2d",
"id": "0196f83d-cafa-f412-1f1d-129cdf2dda49",
"invoice_type": "commercial_duplicate",
"issue_date": "2024-07-24T10:00:00.000000Z",
"notes": [
"note 1",
"note 2",
"note 3"
],
"status": "confirmed",
"virtual_account_id": "0196f83d-cafa-f412-1f1d-129cdf2dda49",
"wallet_type": "direct_electronic_partial_emission_booklet"
}
]
}{
"error": {
"error_code": "UNAUTHORIZED",
"error_message": "Invalid credentials"
}
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}{
"error": {
"error_code": "INTEGRATION_ERROR",
"error_message": "An unexpected issue occurred"
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Boleto Id Unique identifier
Response
Show
Boleto list response
Show child attributes
Show child attributes
⌘I

