Update a bank account
curl --request PATCH \
--url https://app.sandbox.rio.trade/api/bank/accounts/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"notes": "Notes",
"email": "<string>"
}
'import requests
url = "https://app.sandbox.rio.trade/api/bank/accounts/{id}"
payload = {
"notes": "Notes",
"email": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({notes: 'Notes', email: '<string>'})
};
fetch('https://app.sandbox.rio.trade/api/bank/accounts/{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://app.sandbox.rio.trade/api/bank/accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'notes' => 'Notes',
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.sandbox.rio.trade/api/bank/accounts/{id}"
payload := strings.NewReader("{\n \"notes\": \"Notes\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://app.sandbox.rio.trade/api/bank/accounts/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"Notes\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/bank/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": \"Notes\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "66562bc04fe8bf83c577c178",
"createdAt": "2024-05-31T13:55:11.452Z",
"bankName": "BANAMEX",
"country": "MX",
"accountHolderName": "Account holder name",
"fiat": "USD",
"accountNumber": "0123456789",
"CLABE": "0023764000000012345",
"CCI": "00111233001112345678",
"approved": true,
"notes": "Bank Account",
"email": "<string>",
"advancedVerificationStatus": "initiated",
"id": "6659d6bfd78151f639e74d53"
}{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}Bank accounts API
Update a bank account
PATCH
/
api
/
bank
/
accounts
/
{id}
Update a bank account
curl --request PATCH \
--url https://app.sandbox.rio.trade/api/bank/accounts/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"notes": "Notes",
"email": "<string>"
}
'import requests
url = "https://app.sandbox.rio.trade/api/bank/accounts/{id}"
payload = {
"notes": "Notes",
"email": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({notes: 'Notes', email: '<string>'})
};
fetch('https://app.sandbox.rio.trade/api/bank/accounts/{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://app.sandbox.rio.trade/api/bank/accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'notes' => 'Notes',
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.sandbox.rio.trade/api/bank/accounts/{id}"
payload := strings.NewReader("{\n \"notes\": \"Notes\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://app.sandbox.rio.trade/api/bank/accounts/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"Notes\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/bank/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": \"Notes\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "66562bc04fe8bf83c577c178",
"createdAt": "2024-05-31T13:55:11.452Z",
"bankName": "BANAMEX",
"country": "MX",
"accountHolderName": "Account holder name",
"fiat": "USD",
"accountNumber": "0123456789",
"CLABE": "0023764000000012345",
"CCI": "00111233001112345678",
"approved": true,
"notes": "Bank Account",
"email": "<string>",
"advancedVerificationStatus": "initiated",
"id": "6659d6bfd78151f639e74d53"
}{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}Requirements to consume the endpoint.
Create and modify role
The user must have the role to create and modify.
User approved
The user must be approved in at least one country.
Authorizations
Path Parameters
Body
application/json
Response
OK
Id of the user who updated the bank account.
Example:
"66562bc04fe8bf83c577c178"
Creation date and time of the bank account.
Example:
"2024-05-31T13:55:11.452Z"
Name of the bank.
Example:
"BANAMEX"
Country of the bank.
Available options:
MX, PE, CO Name of the account holder.
Example:
"Account holder name"
Fiat currency of the bank account.
Available options:
USD, MXN, PEN, COP Number of the bank account.
Example:
"0123456789"
The Standardized Bank Code (CLABE) associated with the bank account, used in Mexico.
Example:
"0023764000000012345"
Only for bank accounts in Peru.
Example:
"00111233001112345678"
Indicates if the bank account has been approved.
Example:
true
Notes about the bank account.
Example:
"Bank Account"
Only for MXN accounts held at NVIO.
Advanced verification status of the bank account.
Available options:
initiated, sent, passed, cancelled Id of the bank account.
Example:
"6659d6bfd78151f639e74d53"