Update boleto due date
curl --request PUT \
--url https://api.sandbox.trio.com.br/banking/cashin/boletos/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"due_detail": {
"due_date": "2024-08-10"
}
}
'import requests
url = "https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}"
payload = { "due_detail": { "due_date": "2024-08-10" } }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({due_detail: {due_date: '2024-08-10'}})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'due_detail' => [
'due_date' => '2024-08-10'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}"
payload := strings.NewReader("{\n \"due_detail\": {\n \"due_date\": \"2024-08-10\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"due_detail\": {\n \"due_date\": \"2024-08-10\"\n }\n}")
.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::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"due_detail\": {\n \"due_date\": \"2024-08-10\"\n }\n}"
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"
}
}{
"error": {
"error_code": "INTEGRATION_ERROR",
"error_message": "An unexpected issue occurred"
}
}Boleto
Update boleto
Updates a boleto
PUT
/
banking
/
cashin
/
boletos
/
{id}
Update boleto due date
curl --request PUT \
--url https://api.sandbox.trio.com.br/banking/cashin/boletos/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"due_detail": {
"due_date": "2024-08-10"
}
}
'import requests
url = "https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}"
payload = { "due_detail": { "due_date": "2024-08-10" } }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({due_detail: {due_date: '2024-08-10'}})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'due_detail' => [
'due_date' => '2024-08-10'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}"
payload := strings.NewReader("{\n \"due_detail\": {\n \"due_date\": \"2024-08-10\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.sandbox.trio.com.br/banking/cashin/boletos/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"due_detail\": {\n \"due_date\": \"2024-08-10\"\n }\n}")
.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::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"due_detail\": {\n \"due_date\": \"2024-08-10\"\n }\n}"
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"
}
}{
"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
Body
application/json
The dynamic brcode attributes
Body params to update a boleto
Show child attributes
Show child attributes
Response
Show
Response for boleto
Response Params for boleto
Show child attributes
Show child attributes
Example:
{
"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",
"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"
}
}
⌘I

