Update an Instrument
curl --request PATCH \
--url https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bankingDetails": {
"account": "123450",
"bankId": "12345",
"branch": "0001",
"closingDate": "2025-12-31",
"countryCode": "US",
"iban": "US12345678901234567890",
"openingDate": "2025-01-01",
"type": "CACC"
},
"metadata": {},
"regulatoryFields": {
"accountType": "DEPOSIT",
"participantDocument": "12345678912345"
},
"relatedParties": [
{
"document": "12345678900",
"name": "John Smith",
"role": "PRIMARY_HOLDER",
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"id": "00000000-0000-0000-0000-000000000000"
}
]
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id}"
payload := strings.NewReader("{\n \"bankingDetails\": {\n \"account\": \"123450\",\n \"bankId\": \"12345\",\n \"branch\": \"0001\",\n \"closingDate\": \"2025-12-31\",\n \"countryCode\": \"US\",\n \"iban\": \"US12345678901234567890\",\n \"openingDate\": \"2025-01-01\",\n \"type\": \"CACC\"\n },\n \"metadata\": {},\n \"regulatoryFields\": {\n \"accountType\": \"DEPOSIT\",\n \"participantDocument\": \"12345678912345\"\n },\n \"relatedParties\": [\n {\n \"document\": \"12345678900\",\n \"name\": \"John Smith\",\n \"role\": \"PRIMARY_HOLDER\",\n \"startDate\": \"2025-01-01\",\n \"endDate\": \"2026-01-01\",\n \"id\": \"00000000-0000-0000-0000-000000000000\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankingDetails: {
account: '123450',
bankId: '12345',
branch: '0001',
closingDate: '2025-12-31',
countryCode: 'US',
iban: 'US12345678901234567890',
openingDate: '2025-01-01',
type: 'CACC'
},
metadata: {},
regulatoryFields: {accountType: 'DEPOSIT', participantDocument: '12345678912345'},
relatedParties: [
{
document: '12345678900',
name: 'John Smith',
role: 'PRIMARY_HOLDER',
startDate: '2025-01-01',
endDate: '2026-01-01',
id: '00000000-0000-0000-0000-000000000000'
}
]
})
};
fetch('https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id}"
payload = {
"bankingDetails": {
"account": "123450",
"bankId": "12345",
"branch": "0001",
"closingDate": "2025-12-31",
"countryCode": "US",
"iban": "US12345678901234567890",
"openingDate": "2025-01-01",
"type": "CACC"
},
"metadata": {},
"regulatoryFields": {
"accountType": "DEPOSIT",
"participantDocument": "12345678912345"
},
"relatedParties": [
{
"document": "12345678900",
"name": "John Smith",
"role": "PRIMARY_HOLDER",
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"id": "00000000-0000-0000-0000-000000000000"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"accountId": "00000000-0000-0000-0000-000000000000",
"createdAt": "2025-01-01T00:00:00Z",
"deletedAt": "2025-01-01T00:00:00Z",
"holderId": "00000000-0000-0000-0000-000000000000",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"updatedAt": "2025-01-01T00:00:00Z",
"bankingDetails": {
"account": "123450",
"bankId": "12345",
"branch": "0001",
"closingDate": "2025-12-31",
"countryCode": "US",
"iban": "US12345678901234567890",
"openingDate": "2025-01-01",
"type": "CACC"
},
"document": "12345678900",
"id": "00000000-0000-0000-0000-000000000000",
"metadata": {},
"regulatoryFields": {
"accountType": "DEPOSIT",
"participantDocument": "12345678912345"
},
"relatedParties": [
{
"document": "12345678900",
"name": "John Smith",
"role": "PRIMARY_HOLDER",
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"id": "00000000-0000-0000-0000-000000000000"
}
],
"type": "NATURAL_PERSON"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Update an Instrument
Updates an instrument as an RFC 7396 merge patch. A change to bankId, branch or account that leaves the instrument holding a bank account already registered to another live instrument of the organization is refused with 409 (CRM-0043).
PATCH
/
v2
/
organizations
/
{organization_id}
/
holders
/
{holder_id}
/
instruments
/
{instrument_id}
Update an Instrument
curl --request PATCH \
--url https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bankingDetails": {
"account": "123450",
"bankId": "12345",
"branch": "0001",
"closingDate": "2025-12-31",
"countryCode": "US",
"iban": "US12345678901234567890",
"openingDate": "2025-01-01",
"type": "CACC"
},
"metadata": {},
"regulatoryFields": {
"accountType": "DEPOSIT",
"participantDocument": "12345678912345"
},
"relatedParties": [
{
"document": "12345678900",
"name": "John Smith",
"role": "PRIMARY_HOLDER",
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"id": "00000000-0000-0000-0000-000000000000"
}
]
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id}"
payload := strings.NewReader("{\n \"bankingDetails\": {\n \"account\": \"123450\",\n \"bankId\": \"12345\",\n \"branch\": \"0001\",\n \"closingDate\": \"2025-12-31\",\n \"countryCode\": \"US\",\n \"iban\": \"US12345678901234567890\",\n \"openingDate\": \"2025-01-01\",\n \"type\": \"CACC\"\n },\n \"metadata\": {},\n \"regulatoryFields\": {\n \"accountType\": \"DEPOSIT\",\n \"participantDocument\": \"12345678912345\"\n },\n \"relatedParties\": [\n {\n \"document\": \"12345678900\",\n \"name\": \"John Smith\",\n \"role\": \"PRIMARY_HOLDER\",\n \"startDate\": \"2025-01-01\",\n \"endDate\": \"2026-01-01\",\n \"id\": \"00000000-0000-0000-0000-000000000000\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankingDetails: {
account: '123450',
bankId: '12345',
branch: '0001',
closingDate: '2025-12-31',
countryCode: 'US',
iban: 'US12345678901234567890',
openingDate: '2025-01-01',
type: 'CACC'
},
metadata: {},
regulatoryFields: {accountType: 'DEPOSIT', participantDocument: '12345678912345'},
relatedParties: [
{
document: '12345678900',
name: 'John Smith',
role: 'PRIMARY_HOLDER',
startDate: '2025-01-01',
endDate: '2026-01-01',
id: '00000000-0000-0000-0000-000000000000'
}
]
})
};
fetch('https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id}"
payload = {
"bankingDetails": {
"account": "123450",
"bankId": "12345",
"branch": "0001",
"closingDate": "2025-12-31",
"countryCode": "US",
"iban": "US12345678901234567890",
"openingDate": "2025-01-01",
"type": "CACC"
},
"metadata": {},
"regulatoryFields": {
"accountType": "DEPOSIT",
"participantDocument": "12345678912345"
},
"relatedParties": [
{
"document": "12345678900",
"name": "John Smith",
"role": "PRIMARY_HOLDER",
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"id": "00000000-0000-0000-0000-000000000000"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"accountId": "00000000-0000-0000-0000-000000000000",
"createdAt": "2025-01-01T00:00:00Z",
"deletedAt": "2025-01-01T00:00:00Z",
"holderId": "00000000-0000-0000-0000-000000000000",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"updatedAt": "2025-01-01T00:00:00Z",
"bankingDetails": {
"account": "123450",
"bankId": "12345",
"branch": "0001",
"closingDate": "2025-12-31",
"countryCode": "US",
"iban": "US12345678901234567890",
"openingDate": "2025-01-01",
"type": "CACC"
},
"document": "12345678900",
"id": "00000000-0000-0000-0000-000000000000",
"metadata": {},
"regulatoryFields": {
"accountType": "DEPOSIT",
"participantDocument": "12345678912345"
},
"relatedParties": [
{
"document": "12345678900",
"name": "John Smith",
"role": "PRIMARY_HOLDER",
"startDate": "2025-01-01",
"endDate": "2026-01-01",
"id": "00000000-0000-0000-0000-000000000000"
}
],
"type": "NATURAL_PERSON"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Authorizations
JWT bearer token issued by the identity provider.
Path Parameters
Organization ID (UUID)
Holder ID (UUID)
Instrument ID (UUID)
Body
application/json
Response
OK
Example:
"00000000-0000-0000-0000-000000000000"
Example:
"2025-01-01T00:00:00Z"
Example:
"2025-01-01T00:00:00Z"
Example:
"00000000-0000-0000-0000-000000000000"
Example:
"00000000-0000-0000-0000-000000000000"
Example:
"2025-01-01T00:00:00Z"
Show child attributes
Show child attributes
Maximum string length:
100Example:
"12345678900"
Example:
"00000000-0000-0000-0000-000000000000"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum string length:
100Example:
"NATURAL_PERSON"
Was this page helpful?

