tencent cloud

Feedback

CreateOrganizationMember

Last updated: 2024-09-23 14:12:55

    1. API Description

    Domain name for API request: organization.tencentcloudapi.com.

    This API is used to create an organization member.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: CreateOrganizationMember.
    Version Yes String Common Params. The value used for this API: 2021-03-31.
    Region No String Common Params. This parameter is not required for this API.
    Name Yes String Member name, which can contain up to 25 letters, digits, and symbols +@&._[]-:,.
    PolicyType Yes String Relationship policy. Valid value: Financial.
    PermissionIds.N Yes Array of Integer List of member financial permission IDs. 7 indicates paying, which is the default value.
    NodeId Yes Integer Node ID of the member's department, which can be obtained through DescribeOrganizationNodes.
    AccountName Yes String Account name, which can contain up to 25 letters, digits, and symbols +@&._[]-:,.
    Remark No String Remarks.
    RecordId No Integer Member creation record ID, which is required during retry upon creation exception.
    PayUin No String Payer UIN, which is required during paying for a member.
    IdentityRoleID.N No Array of Integer List of member access identity IDs, which can be obtained through the ListOrganizationIdentity API. 1 indicates supported, which is the default value.
    AuthRelationId No Integer Verified entity relationship ID, which is required during creating members for different entities.
    Tags.N No Array of Tag Member tag list, with a maximum of 10.

    3. Output Parameters

    Parameter Name Type Description
    Uin Integer Member UIN.
    Note: This field may return null, indicating that no valid values can be obtained.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Creating an Organization Member

    Input Example

    POST / HTTP/1.1
    Host: organization.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateOrganizationMember
    <Common request parameters>
    
    {
        "Remark": "test",
        "Name": "name",
        "NodeId": 1001,
        "AccountName": "test",
        "PermissionIds": [
            1,
            2
        ],
        "PolicyType": "Finical",
        "PayUin": "",
        "IdentityRoleID": [
            1
        ]
    }
    

    Output Example

    {
        "Response": {
            "Uin": 100001919,
            "RequestId": "1a556fac-cd38-4732-86ef-6283d6abddd7"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation.AuthInfoEmpty The user has not completed identity verification.
    FailedOperation.AuthNotEnterprise The user has not completed enterprise identity verification.
    FailedOperation.CreateAccount An exception occurred while creating the member.
    FailedOperation.CreateBillingPermissionErr Failed to create the billing permission
    FailedOperation.CreateMemberAuthOverLimit The number of times of account identity verification exceeds the upper limit.
    FailedOperation.CreateRecordAlreadySuccess Created successfully.
    FailedOperation.CreateRecordNotExist The creation record does not exist.
    FailedOperation.CreateRole An exception occurred while creating the role.
    FailedOperation.GetAuthInfo An error occurred while querying the identity information.
    FailedOperation.MemberNameUsed The name is already in use.
    FailedOperation.OperateBillingPermissionErr An error occurred while manipulating the billing member permission.
    FailedOperation.OrganizationMemberNameUsed The member name already exists.
    FailedOperation.OrganizationNodeNotExist The organization node does not exist.
    FailedOperation.OrganizationPermissionIllegal The organization permission is invalid.
    FailedOperation.OrganizationPolicyIllegal The organization policy is invalid.
    FailedOperation.PartnerManagementErr Distribution system calling error.
    FailedOperation.PayUinIllegal The payer is invalid.
    FailedOperation.TagResourcesError Tagging error.
    InternalError An internal error occurred.
    InvalidParameter The parameter is incorrect.
    InvalidParameter.OrganizationMemberNotExist The organization member does not exist.
    InvalidParameter.TagError Tag value error.
    LimitExceeded.CreateMemberOverLimit The number of members to be created exceeds the upper limit.
    LimitExceeded.OrganizationMemberOverLimit The number of members exceeds the upper limit.
    ResourceNotFound.OrganizationAuthRelationNotExist The authentication subject does not exist.
    ResourceNotFound.OrganizationMemberNotExist The organization member does not exist.
    ResourceNotFound.OrganizationNodeNotExist The organization node does not exist.
    ResourceNotFound.OrganizationNotExist The organization does not exist.
    UnsupportedOperation.AbnormalFinancialStatusOfAdmin The payer has a financial status exception and does not support pay-on-behalf.
    UnsupportedOperation.AddDelegatePayerNotAllow No paying relationships can be added.
    UnsupportedOperation.AddDiscountInheritNotAllow No offer inheritance relationships can be added.
    UnsupportedOperation.ExistedAgent Payment-on-behalf is not supported for this member or payer as it is a reseller.
    UnsupportedOperation.ExistedClient Payment-on-behalf is not supported for this member or payer as it is a reseller’s account.
    UnsupportedOperation.InconsistentUserTypes The user type mismatches.
    UnsupportedOperation.ManagementSystemError An error occurred while calling the operations management system.
    UnsupportedOperation.MemberAccountArrears The member account has an overdue payment.
    UnsupportedOperation.MemberDiscountInheritExisted The member has an inherited offer.
    UnsupportedOperation.MemberExistAccountLevelDiscountInherit The member has an account-level offer.
    UnsupportedOperation.MemberIsAgent The account is an agent or an agent customer.
    UnsupportedOperation.OrderInProgressExisted There is an ongoing order.
    UnsupportedOperation.OwnerDiscountInheritExisted The admin has an inherited offer.
    UnsupportedOperation.PayerArrearsAndNoCreditAccount The payer has an overdue payment and has no credit account.
    UnsupportedOperation.PayerExistAccountLevelDiscountInherit The payer has an account-level offer.
    UnsupportedOperation.SecondaryDistributorSubClientExisted Pay-on-behalf is not supported for second-level reseller customers exist.