curl --request POST \
--url https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_customer_id": "<your_customer_id>",
"entity_id": "entity_xyz123"
}
'import requests
url = "https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign"
payload = {
"client_customer_id": "<your_customer_id>",
"entity_id": "entity_xyz123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({client_customer_id: '<your_customer_id>', entity_id: 'entity_xyz123'})
};
fetch('https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign', 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.lead.bank/v1/account_number/{account_number_id}/assign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_customer_id' => '<your_customer_id>',
'entity_id' => 'entity_xyz123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.lead.bank/v1/account_number/{account_number_id}/assign"
payload := strings.NewReader("{\n \"client_customer_id\": \"<your_customer_id>\",\n \"entity_id\": \"entity_xyz123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_customer_id\": \"<your_customer_id>\",\n \"entity_id\": \"entity_xyz123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_customer_id\": \"<your_customer_id>\",\n \"entity_id\": \"entity_xyz123\"\n}"
response = http.request(request)
puts response.read_body{
"id": "account_number_xyz",
"account_number": 123412341234,
"routing_number": 123456789,
"account_id": "account_xyz123",
"client_customer_id": "<your_customer_id>",
"entity_id": "entity_xyz123",
"status": "active",
"ach_controls": {
"originator_id": "originator_xyz123",
"incoming": {
"accept_credit": true,
"accept_debit": true,
"counterparty_filter": "accept_all",
"counterparty_company_ids_allowlist": [
1234567890
]
},
"outgoing": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"type": "us_domestic",
"account_number": 123412341234,
"routing_number": 123412341234
}
]
}
},
"wire_controls": {
"incoming": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"type": "us_domestic",
"account_number": 123412341234,
"routing_number": 123412341234
}
]
},
"outgoing": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"type": "us_domestic",
"account_number": 123412341234,
"routing_number": 123412341234
}
]
},
"outgoing_international": {
"counterparty_filter": "accept_all",
"counterparty_international_account_numbers_allowlist": [
{
"business_identifier_code": "CHASUS33",
"account_identifier": {
"value": "GB29NWBK60161331926819"
}
}
]
}
},
"internal_transfer_controls": {
"incoming": {
"counterparty_filter": "accept_all",
"counterparty_account_number_ids_allowlist": [
"account_number_xyz123"
]
},
"outgoing": {
"counterparty_filter": "accept_all",
"counterparty_account_number_ids_allowlist": [
"account_number_xyz123"
]
}
},
"instant_payment_controls": {
"incoming": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"account_number": 123412341234,
"routing_number": 123412341234
}
]
},
"outgoing": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"account_number": 123412341234,
"routing_number": 123412341234
}
]
}
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "operation_not_allowed",
"title": "This operation cannot be done on this object.",
"detail": "You cannot assign an already assigned client_customer_id, current value: <client_customer_id>.",
"status": "400"
}Assign an Account Number
Assigns an Account Number with either a ClientCustomerID or EntityID. Only one of these should be provided
curl --request POST \
--url https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_customer_id": "<your_customer_id>",
"entity_id": "entity_xyz123"
}
'import requests
url = "https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign"
payload = {
"client_customer_id": "<your_customer_id>",
"entity_id": "entity_xyz123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({client_customer_id: '<your_customer_id>', entity_id: 'entity_xyz123'})
};
fetch('https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign', 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.lead.bank/v1/account_number/{account_number_id}/assign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_customer_id' => '<your_customer_id>',
'entity_id' => 'entity_xyz123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.lead.bank/v1/account_number/{account_number_id}/assign"
payload := strings.NewReader("{\n \"client_customer_id\": \"<your_customer_id>\",\n \"entity_id\": \"entity_xyz123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_customer_id\": \"<your_customer_id>\",\n \"entity_id\": \"entity_xyz123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v1/account_number/{account_number_id}/assign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_customer_id\": \"<your_customer_id>\",\n \"entity_id\": \"entity_xyz123\"\n}"
response = http.request(request)
puts response.read_body{
"id": "account_number_xyz",
"account_number": 123412341234,
"routing_number": 123456789,
"account_id": "account_xyz123",
"client_customer_id": "<your_customer_id>",
"entity_id": "entity_xyz123",
"status": "active",
"ach_controls": {
"originator_id": "originator_xyz123",
"incoming": {
"accept_credit": true,
"accept_debit": true,
"counterparty_filter": "accept_all",
"counterparty_company_ids_allowlist": [
1234567890
]
},
"outgoing": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"type": "us_domestic",
"account_number": 123412341234,
"routing_number": 123412341234
}
]
}
},
"wire_controls": {
"incoming": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"type": "us_domestic",
"account_number": 123412341234,
"routing_number": 123412341234
}
]
},
"outgoing": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"type": "us_domestic",
"account_number": 123412341234,
"routing_number": 123412341234
}
]
},
"outgoing_international": {
"counterparty_filter": "accept_all",
"counterparty_international_account_numbers_allowlist": [
{
"business_identifier_code": "CHASUS33",
"account_identifier": {
"value": "GB29NWBK60161331926819"
}
}
]
}
},
"internal_transfer_controls": {
"incoming": {
"counterparty_filter": "accept_all",
"counterparty_account_number_ids_allowlist": [
"account_number_xyz123"
]
},
"outgoing": {
"counterparty_filter": "accept_all",
"counterparty_account_number_ids_allowlist": [
"account_number_xyz123"
]
}
},
"instant_payment_controls": {
"incoming": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"account_number": 123412341234,
"routing_number": 123412341234
}
]
},
"outgoing": {
"counterparty_filter": "accept_all",
"counterparty_account_numbers_allowlist": [
{
"account_number": 123412341234,
"routing_number": 123412341234
}
]
}
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "operation_not_allowed",
"title": "This operation cannot be done on this object.",
"detail": "You cannot assign an already assigned client_customer_id, current value: <client_customer_id>.",
"status": "400"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Idempotency key
255Path Parameters
The ID of the Account Number to be assigned.
^account_number_\w+$Body
Response
Successful response
The ID of the retrieved Account Number.
^account_number_\w+$"account_number_xyz"
The account number.
123412341234
The routing number.
123456789
The ID of the Account object.
^account_\w+$"account_xyz123"
The ID of your customer.
64"<your_customer_id>"
The ID of your entity.
^entity_[^\s]{1,33}$"entity_xyz123"
Account Number Status
active, inactive, canceled, unassigned "active"
ACH payment controls
Show child attributes
Show child attributes
Wire payment controls
Show child attributes
Show child attributes
Internal Transfer controls
Show child attributes
Show child attributes
Instant Payment controls
Show child attributes
Show child attributes
A set of key-value pairs that can be used to store additional information related to this object.
Show child attributes
Show child attributes
The timestamp of creation in ISO-8601 format.
The timestamp of last update in ISO-8601 format.
Was this page helpful?

