Node.js / Bond APIs / delete external account
Back to Collection Items
var os = require('os');
if (os.platform() == 'win32') {
if (os.arch() == 'ia32') {
var chilkat = require('@chilkat/ck-node21-win-ia32');
} else {
var chilkat = require('@chilkat/ck-node21-win64');
}
} else if (os.platform() == 'linux') {
if (os.arch() == 'arm') {
var chilkat = require('@chilkat/ck-node21-arm');
} else if (os.arch() == 'x86') {
var chilkat = require('@chilkat/ck-node21-linux32');
} else {
var chilkat = require('@chilkat/ck-node21-linux64');
}
} else if (os.platform() == 'darwin') {
if (os.arch() == 'arm64') {
var chilkat = require('@chilkat/ck-node21-mac-m1');
} else {
var chilkat = require('@chilkat/ck-node21-macosx');
}
}
function chilkatExample() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
var http = new chilkat.Http();
var success;
http.SetRequestHeader("Identity","{{identity}}");
http.SetRequestHeader("Authorization","{{authorization}}");
// resp: HttpResponse
var resp = http.QuickRequest("DELETE","https://{{environment}}.bond.tech/api/v0/accounts/:account_id/external_accounts/:external_account_id");
if (http.LastMethodSuccess == false) {
console.log(http.LastErrorText);
return;
}
console.log(resp.StatusCode);
console.log(resp.BodyStr);
}
chilkatExample();
Curl Command
curl -X DELETE
-H "Identity: {{identity}}"
-H "Authorization: {{authorization}}"
https://{{environment}}.bond.tech/api/v0/accounts/:account_id/external_accounts/:external_account_id
Postman Collection Item JSON
{
"name": "delete external account",
"request": {
"method": "DELETE",
"header": [
{
"key": "Identity",
"value": "{{identity}}",
"type": "text"
},
{
"key": "Authorization",
"value": "{{authorization}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{environment}}.bond.tech/api/v0/accounts/:account_id/external_accounts/:external_account_id",
"protocol": "https",
"host": [
"{{environment}}",
"bond",
"tech"
],
"path": [
"api",
"v0",
"accounts",
":account_id",
"external_accounts",
":external_account_id"
],
"variable": [
{
"key": "account_id",
"value": ""
},
{
"key": "external_account_id",
"value": ""
}
]
}
},
"response": [
{
"name": "example",
"originalRequest": {
"method": "DELETE",
"header": [
{
"key": "Identity",
"value": "{{identity}}",
"type": "text"
},
{
"key": "Authorization",
"value": "{{authorization}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://sandbox.bond.tech/api/v0/accounts/:account_id/external_accounts/:external_account_id",
"protocol": "https",
"host": [
"sandbox",
"bond",
"tech"
],
"path": [
"api",
"v0",
"accounts",
":account_id",
"external_accounts",
":external_account_id"
],
"variable": [
{
"key": "account_id",
"value": ""
},
{
"key": "external_account_id",
"value": ""
}
]
}
},
"_postman_previewlanguage": "json",
"header": null,
"cookie": [
],
"body": "{\n \"deleted_at\": \"2021-04-01T04:07:53.685055+00:00\",\n \"date_created\": \"2021-04-01T04:07:08.598071+00:00\",\n \"linked_account_id\": \"13eaf2ec-2b1b-4cd2-ba67-89266be37cb3\",\n \"account_id\": \"b7d9ba73-8189-4df3-a550-0c417c693f4a\",\n \"customer_id\": \"cfd0bb6e-d0da-4d4e-8e06-819eeb4d0284\",\n \"bank_name\": \"Wells Fargo\",\n \"status\": \"removed\"\n}"
}
]
}