All Products
Search
Document Center

BSS OpenAPI:AddAccountRelation

Last Updated:Sep 27, 2024

Creates a financial relationship.

Operation description

For more information about a financial relationship, see Usage notes on the trusteeship.

If enterprise names used by the management account and a member for real-name verification are the same, you do not need to call an API operation for confirmation. Otherwise, you must call the ConfirmRelation operation for confirmation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RelationTypestringYes

The type of the financial relationship. Set the value to enterprise_group.

enterprise_group
ParentUserIdlongYes

The ID of the Alibaba Cloud account that is used as the management account.

1738376485192612
ChildNickstringYes

The display name of the member. This helps clarify the scenario in which the account is used.

xxx project
ChildUserIdlongYes

The ID of the Alibaba Cloud account that is used as the member.

1512996702208737
RequestIdstringYes

The unique ID of the request. The ID is used to mark a request and troubleshoot a problem.

32324242444
PermissionCodesarrayNo

The permissions that can be granted to the member. Valid values:

  • SYNCHRONIZE_FINANCE_IDENTITY: allows the credit control identity to be shared with the member.
  • SYNCHRONIZE_FINANCE_DISCOUNT_POLICY_TO_TARGET: allows the discount policy to be shared with the member.
  • FORBID_WITHDRAW_CASH: does not allow the member to withdraw the balance.
  • FORBID_MANAGE_INVOICE: does not allow the member to manage invoices.
  • CHECK_FINANCE_INFO: requests to view information about the financial relationship.
  • MANAGE_TARGET_INVOICE: allows the member to manage invoices.
  • CHECK_TARGET_CONSUMPTION: allows the member to view the bills.

The params[PermissionCodes, RoleCodes] can not be null at the same time.

stringNo

The permission that is granted.

SYNCHRONIZE_FINANCE_IDENTITY
RoleCodesarrayNo

The roles that can be assigned to the member. Set the value to trusteeship.

stringNo

The role that is assigned to the member in a trusteeship. The params[PermissionCodes, RoleCodes] can not be null at the same time.

trusteeship

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The status code returned.

200
Messagestring

The message returned.

Message returned
RequestIdstring

The ID of the request.

Request ID
Successboolean

Indicates whether the request is successful.

true
Dataobject

The data returned.

HostIdstring

The IP address of the request

HostId
RelationIdlong

The ID of the financial relationship.

RelationId

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "Message returned\n",
  "RequestId": "Request ID\n",
  "Success": true,
  "Data": {
    "HostId": "HostId",
    "RelationId": 0
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2021-12-14The response structure of the API has changedView Change Details