Create a new investor entity
You can add a new investor entity to Quantum system using the following API:
Create a new investor
Value | |
---|---|
HTTP Method | POST |
Path | /api/entities/investor/{scopeId} |
Request parameter | Scope ID: A scope ID in which you want to add this new investor entity. All users within this scope will automatically see this investor entity in the investor list |
Reference | [createnewinvestor] |
Request Body | Asset object in JSON, the required fields are - name - typeId : The value can be one of the following: 1 : General partner 2 : Limited partner 3 : Special Limited Partner 4: Third party investor |
Request Body JSON format
{
"placeOfIncorporationId": 0, // acquired from country API
"placeOfIncorporation": "string",
"entityOwnerId": 0,
"entityOwner": "string",
"bankName": "string",
"accountNumber": "string",
"swiftCode": "string",
"notes": "string",
"agreementName": "string",
"agreementDate": "string",
"nameUsedPreviously": "string",
"id": 0, // can leave as zero for create
"internalId": "string", // can leave as blank for create
"sharedId": "string", // can leave as blank for create
"companyId": 0, // can leave as blank for create
"typeId": 0,
"type": "string",
"name": "string",
"investorGroup": "string",
"investorGroupInternalId": "string", // see investor group section to get this ID
"legalName": "string",
"chineseName": "string",
}
Request body example
Below is a basic example of the "Create Investor" body request.
{
"placeOfIncorporationId": 1,
"placeOfIncorporation": "China",
"typeId": 2,
"type": "Limited partner",
"name": "LP #01",
"investorGroup": "LP Group - China",
"investorGroupInternalId": "5f10036be32a946ad4add93c",
"legalName": "LP #01 - Legal name"
}
curl -X POST "https://<Quantium Web API URL>/api/entities/investor/{scopeId}" -H "accept: */*" -H "Authorization: Bearer <Your bearer token>" -H "Content-Type: application/json-patch+json" -d "{ \"name\": \"Investor name\", \"typeId\": 1, \"investorId\": 0,}"
var scopeId = '5e38f5eb78aa254b747b3551'; // acquired from /api/scope/list/currentuser
var investor = {
"placeOfIncorporationId": 1,
"placeOfIncorporation": "China",
"typeId": 2,
"type": "Limited partner",
"name": "LP #01",
"investorGroup": "LP Group - China",
"investorGroupInternalId": "5f10036be32a946ad4add93c",
"legalName": "LP #01 - Legal name"
};
$.ajax({
url: `https://Quantium web api url/api/entities/investor/${scopeId}`,
type: 'post',
dataType: 'json',
contentType: 'application/json',
success: function (data) {
$('#target').html(data.msg);
},
data: JSON.stringify(investor)
});
var scopeId = "5e38f5eb78aa254b747b3551"; // acquired from /api/scope/list/currentuser
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "Your token");
client.BaseAddress = new Uri($"https://Quantium web api url/api/entities/investor/{scopeId}");
var response = await client.PostAsync(urlpart, new StringContent(data, Encoding.UTF8, "application/json"));
var responseResult = await response.Content.ReadAsStringAsync();
return responseResult;
}
Response
Code | Meaning |
---|---|
200(OK) | The successful creation will return the newly added investor information in the response body |
400 (Bad request) | Invalid input, the reason provided, in the response body |
Adding existing investor into a given scope
In order to maintain data integration, the system doesn't allow you to add duplicate investor entity names
If you already have an investor entity created and would like to use it in a certain scope, you can call the Add API and pass the field internalId
into the request body.
The internalId
field is an investor ID which can be acquired by calling Get investor list API
{
"internalId": "5fb3a772d7fdae852a4bd2e2a",
"name": "Investor 123",
"typeId": 1,
}
Updated over 1 year ago