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
Parameter | Description |
---|---|
method Mandatory | String API method that is being called to update customer details through customer service Constant value – "CustomerService.UpdateCustomer" |
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 FinWise Sample value – "Credential" |
apiKey Mandatory | String Unique API key of the customer Sample value – "ApiKey" |
payload Mandatory | Object |
ID Mandatory | String Unique ID of the business customer Sample value – "100000000000001" |
type Optional | String Type of customer Constant value – "BUSINESS" |
businessNameLegal Mandatory | String Legal name of the business customer Sample value – "FinCorp" |
dateEstablished Optional | String Date of the business was established Sample value – "19980312" |
address Optional | Object |
addressLine1 Optional | String First line of business address Sample value – "1000 PEACHTREE ST N.E." |
city Optional | String City of business address Sample value – "ATLANTA" |
state Optional | String State of business address Sample value – "US" |
country Optional | String Country code of business address Sample value – "US" |
zip Optional | String ZIP code of business address Sample value – "12346" |
contact Optional | Object |
phoneNumber Optional | String Contact phone number of the customer Sample value – "9874563210" |
Optional | String Contact email ID of the customer Sample value – "customer@gmail.com" |
generalBusinessDescription Optional | String Showing how the business is described Sample value – "Corporate" |
monthlyProjection Optional | Object |
amount Optional | Number Volume of transaction that can be done for a month Sample value – 1200 |
currency Optional | String Type of currency used for transaction Sample value – "USD" |
institutionName Optional | String Name of the bank or financial institution where the business customer holds account Sample value – "Bank" |
institutionId Optional | String Unique ID or routing number of the bank or financial institution where the business customer holds account Sample value – "1235" |
- 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
Parameter | Description |
---|---|
Id | String Response ID echoed from the request ID Sample value – "1" |
result | Object |
ID | String Unique ID of the customer Sample value – "100000000001001" |
type | String Type of customer Constant value – "BUSINESS" |
businessNameLegal | String Legal name of the business customer Sample value – "FinCorp" |
dateEstablished | String Date of the business was established Sample value – "19980312" |
generalBusinessDescription | String Showing how the business is described Sample value – "Corporate" |
monthlyProjection | Object |
amount | Number Volume of transaction that can be done for a month Sample value – 1200 |
currency | String Type of currency used for transaction Sample value – "USD" |
identification | Array |
type | String Type of identification provided by the business customer Constant value – "TIN" |
value | String Value of respective identification Sample value – "987456227" |
contact | Object |
String Contact email ID of the business customer Sample value – "customer@gmail.com" | |
phoneNumber | String Contact phone number of the business customer Sample value – "9874563210" |
address | Object |
addressLine1 | String First line of business address Sample value – "1000 PEACHTREE ST N.E." |
city | String City of business address Sample value – "ATLANTA" |
state | String State of business address Sample value – "US" |
country | String Country code of business address Sample value – "US" |
zip | String ZIP code of business address Sample value – "12346" |
createdDate | String Date and time when the business customer was created Sample value – "2024-05-08T11:13:29.517Z" |
updatedDate | String Date and time when the business customer was last updated Sample value – "2024-05-22T10:25:15.329Z" |
status | String Status of the business customer Sample value – "ACTIVE" |
jsonrpc | String JSON RPC version Constant value – "2.0" |
{
"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"
}