Update Customer - Business
'UpdateCustomer - Business' API enables to update the required details of a business customer
Bank or financial institution can update required details of business customer that are allowed to be changed with fresh inputs. On providing the required details to be changed in respective fields as request, the business customer information is updated with created and updated date details.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
- cURL
- C#
- Go
- NodeJS
curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data-raw '{"method":"CustomerService.UpdateCustomer","id":"1","params":{"api":{"signature":"{{signature}}","keyId":"{{ApplicationKeyId}}","credential":"{{Credential}}","apiKey":"{{ApiKey}}"},"payload":{"ID":"100000000000001","type":"BUSINESS","businessNameLegal":"FinCorp","dateEstablished":"19980312","address":{"addressLine1":"1000 PEACHTREE ST N.E.","city":"ATLANTA","state":"US","country":"US","zip":"12346"},"contact":{"phoneNumber":"9874563210","email":"customer@gmail.com"},"generalBusinessDescription":"Corporate","monthlyProjection":{"amount":1200,"currency":"USD"},"institutionName":"Bank","institutionId":"1235"}}}'
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.UpdateCustomer"",
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""signature"": ""{{signature}}"",
" + "\n" +
@" ""keyId"": ""{{ApplicationKeyId}}"",
" + "\n" +
@" ""credential"": ""{{Credential}}"",
" + "\n" +
@" ""apiKey"": ""{{ApiKey}}""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""ID"": ""100000000000001"",
" + "\n" +
@" ""type"": ""BUSINESS"",
" + "\n" +
@" ""businessNameLegal"": ""FinCorp"",
" + "\n" +
@" ""dateEstablished"": ""19980312"",
" + "\n" +
@" ""address"": {
" + "\n" +
@" ""addressLine1"": ""1000 PEACHTREE ST N.E."",
" + "\n" +
@" ""city"": ""ATLANTA"",
" + "\n" +
@" ""state"": ""US"",
" + "\n" +
@" ""country"": ""US"",
" + "\n" +
@" ""zip"": ""12346""
" + "\n" +
@" },
" + "\n" +
@" ""contact"": {
" + "\n" +
@" ""phoneNumber"": ""9874563210"",
" + "\n" +
@" ""email"": ""customer@gmail.com""
" + "\n" +
@" },
" + "\n" +
@" ""generalBusinessDescription"": ""Corporate"",
" + "\n" +
@" ""monthlyProjection"": {
" + "\n" +
@" ""amount"": 1200,
" + "\n" +
@" ""currency"": ""USD""
" + "\n" +
@" },
" + "\n" +
@" ""institutionName"": ""Bank"",
" + "\n" +
@" ""institutionId"": ""1235""
" + "\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.UpdateCustomer",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"signature": "{{signature}}",`+"
"+`
"keyId": "{{ApplicationKeyId}}",`+"
"+`
"credential": "{{Credential}}",`+"
"+`
"apiKey": "{{ApiKey}}"`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"ID": "100000000000001",`+"
"+`
"type": "BUSINESS",`+"
"+`
"businessNameLegal": "FinCorp",`+"
"+`
"dateEstablished": "19980312",`+"
"+`
"address": {`+"
"+`
"addressLine1": "1000 PEACHTREE ST N.E.",`+"
"+`
"city": "ATLANTA",`+"
"+`
"state": "US",`+"
"+`
"country": "US",`+"
"+`
"zip": "12346"`+"
"+`
},`+"
"+`
"contact": {`+"
"+`
"phoneNumber": "9874563210",`+"
"+`
"email": "customer@gmail.com"`+"
"+`
},`+"
"+`
"generalBusinessDescription": "Corporate",`+"
"+`
"monthlyProjection": {`+"
"+`
"amount": 1200,`+"
"+`
"currency": "USD"`+"
"+`
},`+"
"+`
"institutionName": "Bank",`+"
"+`
"institutionId": "1235"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
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.UpdateCustomer",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}",
"apiKey": "{{ApiKey}}"
},
"payload": {
"ID": "100000000000001",
"type": "BUSINESS",
"businessNameLegal": "FinCorp",
"dateEstablished": "19980312",
"address": {
"addressLine1": "1000 PEACHTREE ST N.E.",
"city": "ATLANTA",
"state": "US",
"country": "US",
"zip": "12346"
},
"contact": {
"phoneNumber": "9874563210",
"email": "customer@gmail.com"
},
"generalBusinessDescription": "Corporate",
"monthlyProjection": {
"amount": 1200,
"currency": "USD"
},
"institutionName": "Bank",
"institutionId": "1235"
}
}
});
req.write(postData);
req.end();
Body
{
"method": "CustomerService.UpdateCustomer",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}",
"apiKey": "{{ApiKey}}"
},
"payload": {
"ID": "100000000000001",
"type": "BUSINESS",
"businessNameLegal": "FinCorp",
"dateEstablished": "19980312",
"address": {
"addressLine1": "1000 PEACHTREE ST N.E.",
"city": "ATLANTA",
"state": "US",
"country": "US",
"zip": "12346"
},
"contact": {
"phoneNumber": "9874563210",
"email": "customer@gmail.com"
},
"generalBusinessDescription": "Corporate",
"monthlyProjection": {
"amount": 1200,
"currency": "USD"
},
"institutionName": "Bank",
"institutionId": "1235"
}
}
}
Response: 200
Response Parameters
{
"id": "1",
"result": {
"ID": "100000000000001",
"type": "BUSINESS",
"businessNameLegal": "FinCorp",
"dateEstablished": "19980312",
"generalBusinessDescription": "Corporate",
"monthlyProjection": {
"amount": 1200,
"currency": "USD"
},
"identification": [
{
"type": "TIN",
"value": "987456227"
}
],
"contact": {
"email": "customer@gmail.com",
"phoneNumber": "9874563210"
},
"address": {
"addressLine1": "1000 PEACHTREE ST N.E.",
"city": "ATLANTA",
"state": "US",
"country": "US",
"zip": "12346"
},
"createdDate": "2024-05-08T11:13:29.517Z",
"updatedDate": "2024-05-22T10:25:15.329Z",
"status": "ACTIVE"
},
"jsonrpc": "2.0"
}