# Boletos

## List boletos

> List all available boletos

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"DATETIME":{"description":"Datetime schema","format":"date-time","title":"DATETIME","type":"string"},"Limit":{"description":"Limit list","minimum":10,"title":"Limit","type":"integer"},"Boleto_list":{"description":"Boleto list response","properties":{"data":{"items":{"$ref":"#/components/schemas/Boleto_Response_Params"},"type":"array"}},"title":"Boleto_list","type":"object"},"Boleto_Response_Params":{"description":"Response Params for boleto","properties":{"amount":{"description":"Amount of the boleto","type":"integer"},"barcode":{"description":"Barcode of the boleto","type":"string"},"boleto_url":{"description":"URL of the boleto","type":"string"},"description":{"description":"Description of the boleto","type":"string"},"digitable_line":{"description":"Digitable line of the boleto","type":"string"},"due_detail":{"properties":{"discount":{"properties":{"fixed_until_due":{"properties":{"amounts":{"items":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"date":{"description":"Date of the discount","type":"string"}},"type":"object"},"type":"array"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"},"per_day_antecipated":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"calculation_days":{"description":"Calculation days of the discount","type":"string"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"}},"type":"object"},"due_date":{"description":"Due date of the DueDetail","type":"string"},"fine":{"properties":{"amount":{"description":"Amount of the fine","type":"integer"},"calculation_type":{"description":"Calculation type of the fine","type":"string"}},"type":"object"},"interest":{"properties":{"amount":{"description":"Amount of the interest","type":"integer"},"calculation_type":{"description":"Calculation type of the interest","type":"string"}},"type":"object"}},"type":"object"},"expiration_date":{"description":"Expiration date of the boleto","type":"string"},"external_id":{"description":"External ID of the boleto","type":"string"},"id":{"description":"ID of the boleto","type":"string"},"invoice_type":{"description":"Invoice type of the boleto","type":"string"},"issue_date":{"description":"Issue date of the boleto","type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"status":{"description":"Status of the boleto","type":"string"},"virtual_account_id":{"description":"Virtual account ID of the boleto","type":"string"},"wallet_type":{"description":"Wallet type of the boleto","type":"string"}},"title":"Boleto_Response_Params","type":"object"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"}}},"paths":{"/banking/cashin/boletos":{"get":{"callbacks":{},"description":"List all available boletos","operationId":"TrioFoundationWeb.Banking.Cashin.BoletoController.index","parameters":[{"description":"Entity UUID","in":"query","name":"entity_id","required":false,"schema":{"$ref":"#/components/schemas/UUID"}},{"description":"Virtual account UUID","in":"query","name":"virtual_account_id","required":false,"schema":{"$ref":"#/components/schemas/UUID"}},{"description":"Bank account UUID","in":"query","name":"bank_account_id","required":false,"schema":{"$ref":"#/components/schemas/UUID"}},{"description":"External ID","in":"query","name":"external_id","required":false,"schema":{"type":"string"}},{"description":"Counterparty ID","in":"query","name":"counterparty_id","required":false,"schema":{"type":"string"}},{"description":"Status","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"From datetime","in":"query","name":"from_datetime","required":true,"schema":{"$ref":"#/components/schemas/DATETIME"}},{"description":"To datetime","in":"query","name":"to_datetime","required":true,"schema":{"$ref":"#/components/schemas/DATETIME"}},{"description":"Search term","in":"query","name":"search_term","required":false,"schema":{"type":"string"}},{"description":"Parameter used for pagination. It's a base64 encoded param used to access the previous page of results. Provided along with the data in the metadata section if there is a previous page.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"Parameter used for pagination. It's a base64 encoded param used to access the previous page of results. Provided along with the data in the metadata section if there is a previous page.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"Query limit, default is 50 and max is 100","in":"query","name":"limit","required":false,"schema":{"$ref":"#/components/schemas/Limit"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boleto_list"}}},"description":"Boletos"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"}},"summary":"List boletos","tags":["boletos"]}}}}
```

## Create boleto

> Creates a new boleto

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"401":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"401","type":"object"},"500":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"500","type":"object"},"Boleto_create_params":{"description":"Body params to create a boleto","properties":{"amount":{"description":"Amount of the boleto","type":"integer"},"counterparty":{"properties":{"address":{"maxLength":255,"minLength":1,"type":"string"},"city":{"maxLength":255,"minLength":1,"type":"string"},"district":{"maxLength":255,"minLength":1,"type":"string"},"name":{"maxLength":255,"minLength":3,"type":"string"},"postal_code":{"maxLength":8,"minLength":8,"pattern":"^[0-9]{8}$","type":"string"},"state":{"description":"Allowed values: ACALAPAMBACEDFESGOMAMTMSMGPAPBPRPEPIRJRNRSRORRSCSPSETO","enum":["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO"],"type":"string"},"tax_number":{"description":"Document must contain only digits with length between 11 and 14","maxLength":14,"minLength":11,"pattern":"^[0-9]{11,14}$","type":"string"}},"required":["tax_number","name","address","district","city","state","postal_code"],"type":"object"},"description":{"maxLength":25,"nullable":true,"type":"string"},"due_detail":{"$ref":"#/components/schemas/Boleto_due_detail_params"},"expiration_date":{"format":"date","type":"string"},"external_id":{"description":"External ID","maxLength":40,"nullable":true,"type":"string"},"invoice_type":{"$ref":"#/components/schemas/Boleto_invoice_type"},"notes":{"items":{"type":"string"},"maxLength":3,"nullable":true,"type":"array"},"virtual_account_id":{"$ref":"#/components/schemas/UUID"},"wallet_type":{"$ref":"#/components/schemas/Boleto_wallet_type"}},"required":["virtual_account_id","invoice_type","wallet_type","amount","expiration_date","counterparty","due_detail"],"title":"Boleto_create_params","type":"object"},"Boleto_due_detail_params":{"description":"Body params for boleto due detail","nullable":true,"properties":{"discount":{"nullable":true,"properties":{"fixed_until_due":{"nullable":true,"properties":{"amounts":{"items":{"properties":{"amount":{"description":"Discount amount fixed until due date of due detail","nullable":true,"type":"integer"},"date":{"description":"Discount date fixed until due date of due detail","format":"date","nullable":true,"type":"string"}},"required":["amount","date"],"type":"object"},"type":"array"},"calculation_type":{"$ref":"#/components/schemas/Boleto_due_detail_discount_calculation_type"}},"required":["calculation_type","amounts"],"type":"object"},"per_day_antecipated":{"nullable":true,"properties":{"amount":{"description":"Discount amount per day antecipated of due detail","nullable":true,"type":"integer"},"calculation_days":{"$ref":"#/components/schemas/Boleto_due_detail_discount_calculation_days"},"calculation_type":{"$ref":"#/components/schemas/Boleto_due_detail_discount_calculation_type"}},"required":["amount","calculation_type","calculation_days"],"type":"object"}},"type":"object"},"due_date":{"description":"Due date of the boleto","format":"date","type":"string"},"fine":{"nullable":true,"properties":{"amount":{"description":"Fine amount of the boleto due detail","nullable":true,"type":"integer"},"calculation_type":{"$ref":"#/components/schemas/Boleto_due_detail_fine_calculation_type"}},"required":["amount","calculation_type"],"type":"object"},"interest":{"nullable":true,"properties":{"amount":{"description":"Interest amount of the boleto due detail","nullable":true,"type":"integer"},"calculation_type":{"$ref":"#/components/schemas/Mora_interest_due_detail_interest_calculation_type"}},"required":["amount","calculation_type"],"type":"object"}},"required":["due_date"],"title":"Boleto_due_detail_params","type":"object"},"Boleto_due_detail_discount_calculation_type":{"description":"Discount calculation type of boleto with due detail","items":{"enum":["amount","percentage"],"type":"string"},"nullable":true,"title":"Boleto_due_detail_discount_calculation_type","type":"string"},"Boleto_due_detail_discount_calculation_days":{"description":"Discount calculation days of boleto with due detail","items":{"enum":["calendar","working"],"type":"string"},"nullable":true,"title":"Boleto_due_detail_discount_calculation_days","type":"string"},"Boleto_due_detail_fine_calculation_type":{"description":"Fine calculation type of boleto with due detail","items":{"enum":["amount","percentage"],"type":"string"},"nullable":true,"title":"Boleto_due_detail_fine_calculation_type","type":"string"},"Mora_interest_due_detail_interest_calculation_type":{"description":"Mora interest calculation type of boleto with due detail","items":{"enum":["daily_rate","monthly_fee","exempt","bank_control"],"type":"string"},"nullable":true,"title":"Mora_interest_due_detail_interest_calculation_type","type":"string"},"Boleto_invoice_type":{"description":"Boleto invoice type","enum":["commercial_duplicate","indicated_commercial_duplicate","service_duplicate","indicated_service_duplicate","rural_duplicate","bill_of_exchange","commercial_credit_note","export_credit_note","industrial_credit_note","rural_credit_note","promissory_note","rural_promissory_note","triplicate_commercial","triplicate_service","insurance_note","receipt","invoice","debit_note","insurance_policy","school_fee","consortium_installment","invoice_note","debt_document","rural_product_certificate","warrant","state_active_debt","municipal_active_debt","federal_active_debt","condominium_fee","credit_card","others"],"nullable":true,"title":"Boleto_invoice_type","type":"string"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Boleto_wallet_type":{"description":"Boleto wallet type","enum":["direct_electronic_partial_emission_booklet","book_entry_electronic_booklet","direct_electronic_with_emission_booklet","direct_electronic_no_emission_block_client","direct_electronic_no_emission_block_us","book_entry_electronic_bloquete","direct_electronic_no_emission_block_client2","direct_electronic_partial_emission_bloquete","direct_electronic_with_emission_bloquete","direct_electronic_no_emission_us_emission","direct_electronic_our_number_emission_banks_bloquete","direct_electronic_our_number_emission_banks_booklet"],"title":"Boleto_wallet_type","type":"string"},"Boleto_Response":{"description":"Response for boleto","properties":{"data":{"$ref":"#/components/schemas/Boleto_Response_Params"}},"title":"Boleto_Response","type":"object"},"Boleto_Response_Params":{"description":"Response Params for boleto","properties":{"amount":{"description":"Amount of the boleto","type":"integer"},"barcode":{"description":"Barcode of the boleto","type":"string"},"boleto_url":{"description":"URL of the boleto","type":"string"},"description":{"description":"Description of the boleto","type":"string"},"digitable_line":{"description":"Digitable line of the boleto","type":"string"},"due_detail":{"properties":{"discount":{"properties":{"fixed_until_due":{"properties":{"amounts":{"items":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"date":{"description":"Date of the discount","type":"string"}},"type":"object"},"type":"array"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"},"per_day_antecipated":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"calculation_days":{"description":"Calculation days of the discount","type":"string"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"}},"type":"object"},"due_date":{"description":"Due date of the DueDetail","type":"string"},"fine":{"properties":{"amount":{"description":"Amount of the fine","type":"integer"},"calculation_type":{"description":"Calculation type of the fine","type":"string"}},"type":"object"},"interest":{"properties":{"amount":{"description":"Amount of the interest","type":"integer"},"calculation_type":{"description":"Calculation type of the interest","type":"string"}},"type":"object"}},"type":"object"},"expiration_date":{"description":"Expiration date of the boleto","type":"string"},"external_id":{"description":"External ID of the boleto","type":"string"},"id":{"description":"ID of the boleto","type":"string"},"invoice_type":{"description":"Invoice type of the boleto","type":"string"},"issue_date":{"description":"Issue date of the boleto","type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"status":{"description":"Status of the boleto","type":"string"},"virtual_account_id":{"description":"Virtual account ID of the boleto","type":"string"},"wallet_type":{"description":"Wallet type of the boleto","type":"string"}},"title":"Boleto_Response_Params","type":"object"}}},"paths":{"/banking/cashin/boletos":{"post":{"callbacks":{},"description":"Creates a new boleto","operationId":"TrioFoundationWeb.Banking.Cashin.BoletoController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boleto_create_params"}}},"description":"Boleto payload","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boleto_Response"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}},"description":"Internal server error"}},"summary":"Create boleto","tags":["boletos"]}}}}
```

## Get boleto

> Gets a specific boleto

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"401":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"401","type":"object"},"500":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"500","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Boleto_list":{"description":"Boleto list response","properties":{"data":{"items":{"$ref":"#/components/schemas/Boleto_Response_Params"},"type":"array"}},"title":"Boleto_list","type":"object"},"Boleto_Response_Params":{"description":"Response Params for boleto","properties":{"amount":{"description":"Amount of the boleto","type":"integer"},"barcode":{"description":"Barcode of the boleto","type":"string"},"boleto_url":{"description":"URL of the boleto","type":"string"},"description":{"description":"Description of the boleto","type":"string"},"digitable_line":{"description":"Digitable line of the boleto","type":"string"},"due_detail":{"properties":{"discount":{"properties":{"fixed_until_due":{"properties":{"amounts":{"items":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"date":{"description":"Date of the discount","type":"string"}},"type":"object"},"type":"array"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"},"per_day_antecipated":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"calculation_days":{"description":"Calculation days of the discount","type":"string"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"}},"type":"object"},"due_date":{"description":"Due date of the DueDetail","type":"string"},"fine":{"properties":{"amount":{"description":"Amount of the fine","type":"integer"},"calculation_type":{"description":"Calculation type of the fine","type":"string"}},"type":"object"},"interest":{"properties":{"amount":{"description":"Amount of the interest","type":"integer"},"calculation_type":{"description":"Calculation type of the interest","type":"string"}},"type":"object"}},"type":"object"},"expiration_date":{"description":"Expiration date of the boleto","type":"string"},"external_id":{"description":"External ID of the boleto","type":"string"},"id":{"description":"ID of the boleto","type":"string"},"invoice_type":{"description":"Invoice type of the boleto","type":"string"},"issue_date":{"description":"Issue date of the boleto","type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"status":{"description":"Status of the boleto","type":"string"},"virtual_account_id":{"description":"Virtual account ID of the boleto","type":"string"},"wallet_type":{"description":"Wallet type of the boleto","type":"string"}},"title":"Boleto_Response_Params","type":"object"},"JsonErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"required":["pointer"],"type":"object"},"title":{"type":"string"}},"required":["title","source","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"JsonErrorResponse","type":"object"}}},"paths":{"/banking/cashin/boletos/{id}":{"get":{"callbacks":{},"description":"Gets a specific boleto","operationId":"TrioFoundationWeb.Banking.Cashin.BoletoController.show","parameters":[{"description":"Boleto Id","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/UUID"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boleto_list"}}},"description":"Show"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}},"description":"Internal server error"}},"summary":"Get boleto","tags":["boletos"]}}}}
```

## Update boleto due date

> Updates a boleto due date

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"401":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"401","type":"object"},"500":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"500","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Boleto_update_params":{"description":"Body params to update a boleto","properties":{"due_detail":{"properties":{"due_date":{"description":"Due date of the boleto","format":"date","type":"string"}},"required":["due_date"],"type":"object"}},"title":"Boleto_update_params","type":"object"},"Boleto_Response":{"description":"Response for boleto","properties":{"data":{"$ref":"#/components/schemas/Boleto_Response_Params"}},"title":"Boleto_Response","type":"object"},"Boleto_Response_Params":{"description":"Response Params for boleto","properties":{"amount":{"description":"Amount of the boleto","type":"integer"},"barcode":{"description":"Barcode of the boleto","type":"string"},"boleto_url":{"description":"URL of the boleto","type":"string"},"description":{"description":"Description of the boleto","type":"string"},"digitable_line":{"description":"Digitable line of the boleto","type":"string"},"due_detail":{"properties":{"discount":{"properties":{"fixed_until_due":{"properties":{"amounts":{"items":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"date":{"description":"Date of the discount","type":"string"}},"type":"object"},"type":"array"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"},"per_day_antecipated":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"calculation_days":{"description":"Calculation days of the discount","type":"string"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"}},"type":"object"},"due_date":{"description":"Due date of the DueDetail","type":"string"},"fine":{"properties":{"amount":{"description":"Amount of the fine","type":"integer"},"calculation_type":{"description":"Calculation type of the fine","type":"string"}},"type":"object"},"interest":{"properties":{"amount":{"description":"Amount of the interest","type":"integer"},"calculation_type":{"description":"Calculation type of the interest","type":"string"}},"type":"object"}},"type":"object"},"expiration_date":{"description":"Expiration date of the boleto","type":"string"},"external_id":{"description":"External ID of the boleto","type":"string"},"id":{"description":"ID of the boleto","type":"string"},"invoice_type":{"description":"Invoice type of the boleto","type":"string"},"issue_date":{"description":"Issue date of the boleto","type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"status":{"description":"Status of the boleto","type":"string"},"virtual_account_id":{"description":"Virtual account ID of the boleto","type":"string"},"wallet_type":{"description":"Wallet type of the boleto","type":"string"}},"title":"Boleto_Response_Params","type":"object"}}},"paths":{"/banking/cashin/boletos/{id}":{"put":{"callbacks":{},"description":"Updates a boleto due date","operationId":"TrioFoundationWeb.Banking.Cashin.BoletoController.update","parameters":[{"description":"Boleto Id","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/UUID"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boleto_update_params"}}},"description":"The dynamic brcode attributes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boleto_Response"}}},"description":"Show"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}},"description":"Internal server error"}},"summary":"Update boleto due date","tags":["boletos"]}}}}
```

## Cancel boleto

> Cancel a boleto

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"401":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"401","type":"object"},"500":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"500","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Boleto_Response":{"description":"Response for boleto","properties":{"data":{"$ref":"#/components/schemas/Boleto_Response_Params"}},"title":"Boleto_Response","type":"object"},"Boleto_Response_Params":{"description":"Response Params for boleto","properties":{"amount":{"description":"Amount of the boleto","type":"integer"},"barcode":{"description":"Barcode of the boleto","type":"string"},"boleto_url":{"description":"URL of the boleto","type":"string"},"description":{"description":"Description of the boleto","type":"string"},"digitable_line":{"description":"Digitable line of the boleto","type":"string"},"due_detail":{"properties":{"discount":{"properties":{"fixed_until_due":{"properties":{"amounts":{"items":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"date":{"description":"Date of the discount","type":"string"}},"type":"object"},"type":"array"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"},"per_day_antecipated":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"calculation_days":{"description":"Calculation days of the discount","type":"string"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"}},"type":"object"},"due_date":{"description":"Due date of the DueDetail","type":"string"},"fine":{"properties":{"amount":{"description":"Amount of the fine","type":"integer"},"calculation_type":{"description":"Calculation type of the fine","type":"string"}},"type":"object"},"interest":{"properties":{"amount":{"description":"Amount of the interest","type":"integer"},"calculation_type":{"description":"Calculation type of the interest","type":"string"}},"type":"object"}},"type":"object"},"expiration_date":{"description":"Expiration date of the boleto","type":"string"},"external_id":{"description":"External ID of the boleto","type":"string"},"id":{"description":"ID of the boleto","type":"string"},"invoice_type":{"description":"Invoice type of the boleto","type":"string"},"issue_date":{"description":"Issue date of the boleto","type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"status":{"description":"Status of the boleto","type":"string"},"virtual_account_id":{"description":"Virtual account ID of the boleto","type":"string"},"wallet_type":{"description":"Wallet type of the boleto","type":"string"}},"title":"Boleto_Response_Params","type":"object"}}},"paths":{"/banking/cashin/boletos/{id}/cancel":{"put":{"callbacks":{},"description":"Cancel a boleto","operationId":"TrioFoundationWeb.Banking.Cashin.BoletoController.cancel","parameters":[{"description":"Boleto Id","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/UUID"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boleto_Response"}}},"description":"Show"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}},"description":"Internal server error"}},"summary":"Cancel boleto","tags":["boletos"]}}}}
```

## Add protest

> Add protest to a boleto

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"401":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"401","type":"object"},"500":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"500","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Boleto_Response":{"description":"Response for boleto","properties":{"data":{"$ref":"#/components/schemas/Boleto_Response_Params"}},"title":"Boleto_Response","type":"object"},"Boleto_Response_Params":{"description":"Response Params for boleto","properties":{"amount":{"description":"Amount of the boleto","type":"integer"},"barcode":{"description":"Barcode of the boleto","type":"string"},"boleto_url":{"description":"URL of the boleto","type":"string"},"description":{"description":"Description of the boleto","type":"string"},"digitable_line":{"description":"Digitable line of the boleto","type":"string"},"due_detail":{"properties":{"discount":{"properties":{"fixed_until_due":{"properties":{"amounts":{"items":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"date":{"description":"Date of the discount","type":"string"}},"type":"object"},"type":"array"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"},"per_day_antecipated":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"calculation_days":{"description":"Calculation days of the discount","type":"string"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"}},"type":"object"},"due_date":{"description":"Due date of the DueDetail","type":"string"},"fine":{"properties":{"amount":{"description":"Amount of the fine","type":"integer"},"calculation_type":{"description":"Calculation type of the fine","type":"string"}},"type":"object"},"interest":{"properties":{"amount":{"description":"Amount of the interest","type":"integer"},"calculation_type":{"description":"Calculation type of the interest","type":"string"}},"type":"object"}},"type":"object"},"expiration_date":{"description":"Expiration date of the boleto","type":"string"},"external_id":{"description":"External ID of the boleto","type":"string"},"id":{"description":"ID of the boleto","type":"string"},"invoice_type":{"description":"Invoice type of the boleto","type":"string"},"issue_date":{"description":"Issue date of the boleto","type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"status":{"description":"Status of the boleto","type":"string"},"virtual_account_id":{"description":"Virtual account ID of the boleto","type":"string"},"wallet_type":{"description":"Wallet type of the boleto","type":"string"}},"title":"Boleto_Response_Params","type":"object"}}},"paths":{"/banking/cashin/boletos/{id}/protest/add":{"put":{"callbacks":{},"description":"Add protest to a boleto","operationId":"TrioFoundationWeb.Banking.Cashin.BoletoController.add_protest","parameters":[{"description":"Boleto Id","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/UUID"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boleto_Response"}}},"description":"Show"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}},"description":"Internal server error"}},"summary":"Add protest","tags":["boletos"]}}}}
```

## Remove protest

> Remove protest from a boleto

```json
{"openapi":"3.0.0","info":{"title":"Trio API","version":"0.1.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"security":[{},{"basic":["Base64encode(<client_id>:<client_secret>)"]}],"components":{"securitySchemes":{},"schemas":{"401":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"401","type":"object"},"500":{"properties":{"error":{"properties":{"error_code":{"description":"Error code","type":"string"},"error_message":{"description":"Error message","type":"string"}},"type":"object"}},"title":"500","type":"object"},"UUID":{"description":"Unique identifier","format":"uuid","title":"UUID","type":"string"},"Boleto_Response":{"description":"Response for boleto","properties":{"data":{"$ref":"#/components/schemas/Boleto_Response_Params"}},"title":"Boleto_Response","type":"object"},"Boleto_Response_Params":{"description":"Response Params for boleto","properties":{"amount":{"description":"Amount of the boleto","type":"integer"},"barcode":{"description":"Barcode of the boleto","type":"string"},"boleto_url":{"description":"URL of the boleto","type":"string"},"description":{"description":"Description of the boleto","type":"string"},"digitable_line":{"description":"Digitable line of the boleto","type":"string"},"due_detail":{"properties":{"discount":{"properties":{"fixed_until_due":{"properties":{"amounts":{"items":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"date":{"description":"Date of the discount","type":"string"}},"type":"object"},"type":"array"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"},"per_day_antecipated":{"properties":{"amount":{"description":"Amount of the discount","type":"integer"},"calculation_days":{"description":"Calculation days of the discount","type":"string"},"calculation_type":{"description":"Calculation type of the discount","type":"string"}},"type":"object"}},"type":"object"},"due_date":{"description":"Due date of the DueDetail","type":"string"},"fine":{"properties":{"amount":{"description":"Amount of the fine","type":"integer"},"calculation_type":{"description":"Calculation type of the fine","type":"string"}},"type":"object"},"interest":{"properties":{"amount":{"description":"Amount of the interest","type":"integer"},"calculation_type":{"description":"Calculation type of the interest","type":"string"}},"type":"object"}},"type":"object"},"expiration_date":{"description":"Expiration date of the boleto","type":"string"},"external_id":{"description":"External ID of the boleto","type":"string"},"id":{"description":"ID of the boleto","type":"string"},"invoice_type":{"description":"Invoice type of the boleto","type":"string"},"issue_date":{"description":"Issue date of the boleto","type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"status":{"description":"Status of the boleto","type":"string"},"virtual_account_id":{"description":"Virtual account ID of the boleto","type":"string"},"wallet_type":{"description":"Wallet type of the boleto","type":"string"}},"title":"Boleto_Response_Params","type":"object"}}},"paths":{"/banking/cashin/boletos/{id}/protest/remove":{"put":{"callbacks":{},"description":"Remove protest from a boleto","operationId":"TrioFoundationWeb.Banking.Cashin.BoletoController.remove_protest","parameters":[{"description":"Boleto Id","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/UUID"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boleto_Response"}}},"description":"Show"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}},"description":"Internal server error"}},"summary":"Remove protest","tags":["boletos"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trio.com.br/api_reference/banking-api/collecting/boletos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
