Exclude bank/account
API reference
Excludes either specific banks from an account's sweep or specific accounts from being swept at all.
- Exclude banks from the sweep network Your customers may already have funds at a certain bank and this is a way to exclude that bank
- Opt out of sweeps When a product is enabled for sweeps, all accounts created from that product are enrolled into the sweeps program. Use this endpoint to mark an account inactive for sweeps, effectively opting out for sweeps.
Endpoint: SweepsIntrafi/v1/accounts/{accountNumber}
PUT
https://sandbox.crbcos.com/SweepsIntrafi/v1/accounts/{accountNumber}
Path Parameters
- accountNumberstringrequiredDescription
Body Parameters
- statusstringrequiredDescription
- bankExclusionsstringDescription
Response
- accountNumberstringDescription
- statusstringDescription
- titlestringDescription
- bankExclusionsarrayDescription
- coreBalancestringDescription
- coreBalanceAsOfstringDescription
- custodialBalanceintegerDescription
- networkBalanceintegerDescription
- networkBalanceAsOfstringDescription
- maxSweepAmountintegerDescription
- clientIdentifierstringDescription
- productIdstringDescription
- partnerIdstringDescription
- openedAtstringDescription
- lastModifiedAtstringDescription
- productNamestringDescription
- partnerNamestringDescription
curl
curl --location --request PUT 'https://sandbox.crbcos.com/SweepsIntrafi/v1/accounts/2666129453' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"status": "Active",
"bankExclusions": [
"30895",
"10015"
]
} 'nodejs
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'PUT',
'hostname': 'sandbox.crbcos.com',
'path': '/SweepsIntrafi/v1/accounts/2666129453',
'headers': {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"status": "Active",
"bankExclusions": [
"30895",
"10015"
]
});
req.write(postData);
req.end();python
import http.client
import json
conn = http.client.HTTPSConnection("sandbox.crbcos.com")
payload = json.dumps({
"status": "Active",
"bankExclusions": [
"30895",
"10015"
]
})
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
conn.request("PUT", "/SweepsIntrafi/v1/accounts/2666129453", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))ruby
require "uri"
require "json"
require "net/http"
url = URI("https://sandbox.crbcos.com/SweepsIntrafi/v1/accounts/2666129453")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"status": "Active",
"bankExclusions": [
"30895",
"10015"
]
})
response = https.request(request)
puts response.read_body
go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.crbcos.com/SweepsIntrafi/v1/accounts/2666129453"
method := "PUT"
payload := strings.NewReader(`{
"status": "Active",
"bankExclusions": [
"30895",
"10015"
]
} `)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}200
{
"accountNumber": "2666129453",
"status": "Active",
"title": "Sweeps Test 2",
"bankExclusions": [
"30895",
"10015"
],
"coreBalance": 125627321,
"coreBalanceAsOf": "2024-09-25T16:17:20.1-04:00",
"custodialBalance": 25627321,
"networkBalance": 100000000,
"networkBalanceAsOf": "2024-09-24T16:33:43.613-04:00",
"maxSweepAmount": 0,
"productId": "e4404005-03c1-4710-b759-b13700ebfac4",
"partnerId": "6e6769ec-99e0-4c4f-8ae8-b13700eab0fc",
"openedAt": "2024-05-14T16:26:10.227-04:00",
"lastModifiedAt": "2024-09-25T16:18:48.5446146-04:00",
"productName": "ibs Checking Product",
"partnerName": "Ibrahim Saeed Partner"
}404
{
"message": "Ain't no cake like that."
}