/unlink_business_member
Unlinks business members from a business for a specified role.
This doc has been updated with Priority specifications.
This endpoint allows for business members to be unlinked from a business, or for one of their roles to be removed if the member holds more than one.
If the business has only one controlling officer, that CO cannot be unlinked until another CO has been linked first.
Request
Authorization / Authentication
Apps using Access Token Authorization
Use a valid access token in an Authorization: Bearer request header.
See Authenticating with an Access Token for more details.
Apps using ECDSA Authentication
Headers authsignature
, usersignature
, and businesssignature
are required for this request. usersignature
should be generated with a keypair registered to the user (either registered from the /register endpoint or the /register_wallet endpoint). businesssignature
should be generated with a keypair registered to the business user (either registered from the /register endpoint or the /register_wallet endpoint).
See the section on ECDSA Authentication for more detail about ECDSA signature generation.
POST /0.2/unlink_business_member HTTP/1.1
sandbox.silamoney.com
Content-Type: application/json
businesssignature: [GENERATED BUSINESSSIGNATURE HEX STRING HERE]
// if using OAuth2
Authorization: Bearer [GENERATED JWT TOKEN HERE]
// if using ECDSA
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
{
"header": {
"created": 1234567890,
"app_handle": "<app_handle>",
"user_handle": "<user_handle>",
"business_handle": "<business_user_handle>",
"reference": "<your unique id>"
},
"role": "administrator"
}
***
HTTP/1.1 200 OK
{
"success": true,
"status": "SUCCESS",
"response_time_ms": "171",
"message": "User <user_handle> has been unlinked as a Administrator for business <business_name>",
"role": "administrator",
"reference": "<your unique id>",
"sila_reference_id": "sila_assigned_id"
}
const res = await sila.unlinkBusinessMember(
user_handle,
user_private_key,
business_handle,
business_private_key,
role
);
//success response object
console.log(res.statusCode); // 200
console.log(res.data.success); // TRUE
console.log(res.data.message); // Response message
console.log(res.data.status);
console.log(res.data.role);
payload = {
"user_handle": "user_handle",
"business_handle": "business_handle",
"role": "administrator",
}
response = BusinessOperations.unlinkBusinessMember(app, payload, user_private_key, business_private_key)
# Success response
{
"status_code": 200,
"status": "SUCCESS",
"success": true,
"message": "User \"another_user_handle\" has been unlinked as a Controlling Officer for business Sila, Inc.",
"role": "controlling_officer"
}
BusinessRole businessRole = ((GetBusinessRolesResponse)api.getBusinessRoles().getData()).get(0);
float ownershipStake = 0.30;
ApiResponse response = api.unlinkBusinessMember("user handle", "user private key", "business handle", "business private key", businessRole);
// Success Object Response
System.out.println(response.getStatusCode()); // 200
System.out.println(((LinkBusinessOperationResponse) response.getData()).getMessage())// user has been unliked
System.out.println(((LinkBusinessOperationResponse) response.getData()).getRole());// business role
System.out.println(((LinkBusinessOperationResponse) response.getData()).isSuccess());// true
System.out.println(((LinkBusinessMemberResponse) response.getData()).getStatus());// SUCCESS
var responseRole = api.GetBusinessRoles();
Console.WriteLine(responseRole.StatusCode); // 200
var ResponseRole = (BusinessRolesResponse)responseRole.Data;
BusinessRole businessRole = new BusinessRole();
businessRole.Name = ResponseRole.BusinessRoles[0].Name; // 0 index for "controlling_officer", 1 index for "beneficial_owner", 2 index for "administrator"
businessRole.Label = ResponseRole.BusinessRoles[0].Label; // 0 index for "Controlling Officer", 1 index for "Beneficial Owner", 2 index for "Administrator"
businessRole.Uuid = ResponseRole.BusinessRoles[0].Uuid; // 0 index for "9a350e54-0ce9-48fc-b437-9c7b7cfdd1ac", 1 index for "0adb5421-3395-4f81-9e26-dd8d5abae590", 2 index for "977bc3be-8f79-4e83-9df1-29525c06f23e"
ApiResponse<object> response = api.UnlinkBusinessMember(userHandle, userPrivateKey, businessHandle, businessPrivateKey, businessRole);
// Success object response
Console.WriteLine(response.StatusCode); // 200
var parsedData = (LinkOperationResponse)response.Data;
Console.WriteLine(parsedData.Message); // Response message
Console.WriteLine(parsedData.Status); // Response status
// For business roles see [Get Business Roles](#get-business-roles)
$businessHandle = 'business_handle';
$businessPrivateKey = 'some private key';
$userHandle = 'user_handle'; // The user handle to apply the role to
$userPrivateKey = 'some other private key';
$businessRole = 'administrator'; // Required if $businessRoleUuid is not set. The business role to set
$businessRoleUuid = null; // Required if $businessRole is not set. The business role uuid to set
$response = $client->unlinkBusinessMember($businessHandle, $businessPrivateKey, $userHandle, $userPrivateKey, $businessRole, $businessRoleUuid);
// Response 200
echo $response->getStatusCode(); // 200
echo $response->getData()->success;
echo $response->getData()->status;
echo $response->getData()->message; // User has been unlinked as a... for business...
echo $response->getData()->role; // The role name unliked
const res = await sila.unlinkBusinessMember(user_handle, user_private_key, business_handle, business_private_key, role);
// Success response object
console.log(res.statusCode); // 200
console.log(res.data.success); // TRUE
console.log(res.data.message); // Response message
Request Attributes
Key | Type | Description |
---|---|---|
header | JSON object | Required. Required keys: created - Unix epoch timestamp in seconds. Must not be future-dated and must not be dated more than 5 minutes in the past.app_handle - your app handleuser_handle - the entity to be unlinkedbusiness_handle - the user_handle for the business the to-be-unlinked entity is a member ofOptional keys: reference : Can be any value for your own reference. If not provided, one will be assigned.version : Cannot be null if key is present. Valid values: 0.2, v0.2, V0.2 |
role | string | Either role OR role_uuid required. The role to unlink for the specified user_handle. Accepted values: administrator controlling_officer beneficial_owner |
role_uuid | string | Either role OR role_uuid required. The role to unlink for the specified user_handle. Can be found calling /get_business_roles |
Responses
Status Code | success | Description |
---|---|---|
200 | true | The business and specified individual have been successfully unlinked. |
400 | false | Bad request format - check validation_details for more information. |
403 | false | authsignature , businesssignature , or usersignature header was absent or incorrect. |
Updated 14 days ago