Create Login for a Legal Representative
'CreateLegalRepLogin' API enables to create legal representative login credentials
Bank or financial institution can create login credentials to access customer portal for the legal representative of business customer account who is responsible for managing and operating the respective account. On providing legalrep ID as request, the login credentials comprising of Username, Password, Google Authenticator code and authenticator QR code sent through email to the legal representative.
Method: POST
{{URL}}/jsonrpcHeaders
| Name | Value |
|---|---|
| Content-Type | application/json |
Example
Request Parameters
| Parameter | Description |
|---|---|
method Mandatory | String API method that is being called to create LegalRep login through customer service Constant value: "CustomerService.CreateLegalRepLogin" |
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 code" |
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 LegalRep Sample value: "62004" |
- cURL
- C#
- Go
- NodeJS
curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"method":"CustomerService.CreateLegalRepLogin","id":"1","params":{"api":{"signature":"{{signature}}","keyId":"{{ApplicationKeyId}}","credential":"{{Credential}}"},"payload":{"legalrepID":"62004"}}}'
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"": ""CustomerService.CreateLegalRepLogin"",
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""signature"": ""{{signature}}"",
" + "\n" +
@" ""keyId"": ""{{ApplicationKeyId}}"",
" + "\n" +
@" ""credential"": ""{{Credential}}""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""legalrepID"": ""62004""
" + "\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": "CustomerService.CreateLegalRepLogin",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"signature": "{{signature}}",`+"
"+`
"keyId": "{{ApplicationKeyId}}",`+"
"+`
"credential": "{{Credential}}"`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"legalrepID": "62004"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
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": "CustomerService.CreateLegalRepLogin",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"legalrepID": "62004"
}
}
});
req.write(postData);
req.end();
Body
{
"method": "CustomerService.CreateLegalRepLogin",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"legalrepID": "62004"
}
}
}
Response: 200
Response Parameters
| Parameter | Description |
|---|---|
id | String Response ID echoed from the request ID Sample value: "1" |
result | Object |
ID | String Unique Id of the LegalRep Sample value: "62004" |
message | String Notification message showing whether the login creation is successful or not Sample value: "Login Created Succesfully" |
{
"id": "1",
"result": {
"ID": "62004",
"message": "Login Created Succesfully"
}
}