postCaptableStakeholdersWithHttpInfo method
Add stakeholders to the cap table
Records the people and institutions that can hold equity — the rows every share, option, SAFE, note and investment is issued to. The body is ONE stakeholder object or an ARRAY of them, and the array is the point: a whole roster loads in a single call. Email is the identity within the company, so a stakeholder whose email is already on the table is SKIPPED rather than duplicated or rejected — the 201 reports how many rows were actually inserted, which is what makes re-running an import safe. Validation is all-or-nothing across the batch: one bad entry refuses the whole array. Writes the caller's OWN cap table: the org resolved from the validated principal selects the tenant's store and scopes every row, so there is no field by which a caller can write into another company's table; a request with no validated org is refused. The whole write runs in one transaction, so a refusal leaves nothing behind. Validation is the cap-table bundle's and so is its refusal: a bad body comes back as {success:false, message, errors:…} with the failing fields listed, and numeric fields accept a number OR a numeric string. Bodies are capped at 1 MiB.
Note: This method returns the HTTP Response.
Implementation
Future<Response> postCaptableStakeholdersWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/v1/captable/stakeholders';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}