Add Legal Representative to an Account
'AddLegalRep' API enables to add legal representative to the business customer account
Bank or financial institution can add multiple legal representatives to the business customer account for managing and operating the account. On providing the request with legal representative ID and the specific account number to which to be added, the legal representative is added to the business customer account with the generation of success message.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
method Mandatory | String API method that is being called to add new Legal Representative to an account through account service Constant value: "AccountService.AddLegalRepToAccount" |
id Mandatory | String Unique ID of API request Sample value: "1" |
params Mandatory | Object |
api Mandatory | Object |
signature Mandatory | String Signature for request validation Sample value: "signature" |
keyId Mandatory | String API key used for request authentication Sample value: "ApplicationKeyId" |
credential Mandatory | String API credential provided by NetXD Sample value: "Credential" |
payload Mandatory | Object |
LegalRepID Mandatory | String Unique ID of the Legal Representative who is newly added to the account Sample value: 3499 |
AccountNumber Mandatory | String Account number of the account to which the legal representative is added Sample value: 200779950258238 |
- cURL
- C#
- Go
- NodeJS
curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"method":"AccountService.AddLegalRepToAccount","id":"1","params":{"api":{"signature":"{{signature}}","keyId":"{{ApplicationKeyId}}","credential":"{{Credential}}"},"payload":{"legalRepID":"3499","accountNumber":"200779950258238"}}}'
var options = new RestClientOptions("{{URL}}/jsonrpc")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""method"": ""AccountService.AddLegalRepToAccount"",
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""signature"": ""{{signature}}"",
" + "\n" +
@" ""keyId"": ""{{ApplicationKeyId}}"",
" + "\n" +
@" ""credential"": ""{{Credential}}""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""legalRepID"": ""3499"",
" + "\n" +
@" ""accountNumber"": ""200779950258238""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"method": "AccountService.AddLegalRepToAccount",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"signature": "{{signature}}",`+"
"+`
"keyId": "{{ApplicationKeyId}}",`+"
"+`
"credential": "{{Credential}}"`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"legalRepID": "3499",`+"
"+`
"accountNumber": "200779950258238"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
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 := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/jsonrpc',
'headers': {
'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({
"method": "AccountService.AddLegalRepToAccount",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"legalRepID": "3499",
"accountNumber": "200779950258238"
}
}
});
req.write(postData);
req.end();
Body
{
"method": "AccountService.AddLegalRepToAccount",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"legalRepID": "3499",
"accountNumber": "200779950258238"
}
}
}
Response: 200
Response Parameters
Parameter | Description |
---|---|
id | String Response ID echoed from the request ID Sample value: "1" |
result | Object |
Message | String Response message confirms that the account is updated successfully with the addition of new legal representative Sample value: "Account updated Successfully" |
{
"id": "1",
"result": {
"Message": "Account updated Successfully"
}
}