Batch create sub organizations
POST/bv/org/v1/sub-orgs:batch
Create multiple sub-organizations once with all necessary details for each sub-organization.
Request
Header Parameters
To invoke this API using api_token
, you need to set the x-bv-org-id
header to specify the organization for which you want to perform the action.
- application/json
Body
required
- Array [
- Array [
- ]
- ]
organizations object[]
Required. The name of sub-organization.
Required. The appended parent organization id of the sub-organization.
Possible values: [ORGANIZATION_TYPE_ROOT
, ORGANIZATION_TYPE_GENERAL_DISTRIBUTOR
, ORGANIZATION_TYPE_RESELLER
, ORGANIZATION_TYPE_BUSINESS
]
Required. The type of the sub-organization.
Input only. The description of the sub-organization.
owner objectrequired
Required. The owner of the sub-organization.
Optional. The password of account. If the account is created by creating sub org api, not need to provide the password. The service will genrate password automatically. Password policy: Contains at least 1 number. Contains at least 1 special character. Contains at least 1 uppercase letter. Contains at least 1 lowercase letter.
Required. The first name of account.
Required. The last name of account.
Optional. Need to send confirm email to account email. Default: false.
accounts object[]
Input only. The member of the sub-organization.
Optional. The password of account. If the account is created by creating sub org api, not need to provide the password. The service will genrate password automatically. Password policy: Contains at least 1 number. Contains at least 1 special character. Contains at least 1 uppercase letter. Contains at least 1 lowercase letter.
Required. The first name of account.
Required. The last name of account.
Optional. Need to send confirm email to account email. Default: false.
Input only. The assigned plan ids of the sub-organization.
Input only. The billing cycle of the reseller sub-organization.
It's required and valid when the type is ORGANIZATION_TYPE_RESELLER
.
Input only. The contract start day of the business sub-organization.
It's required and valid when the type is ORGANIZATION_TYPE_BUSINESS
.
Input only. The contract months of the business sub-organization.
It's required and valid when the type is ORGANIZATION_TYPE_BUSINESS
.
This field is mutually exclusive to contract_days
field, it'll get the higher priority if both are provided.
e.g. It'll use contract_months
instead if both contract_months
and contract_days
are provided.
Input only. The contract days of the business sub-organization.
It's required and valid when the type is ORGANIZATION_TYPE_BUSINESS
.
This field is mutually exclusive to contract_months
field, it'll get the lower priority if both are provided.
e.g. It'll use contract_months
instead if both contract_months
and contract_days
are provided.
Input only. The time zone to the sub-organization.
Responses
- 200
- 400
- 401
- 403
- 500
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
organizations object[]
organization object
Output only. The resource identifier of the organization.
Required. The name of the sub-organization.
Required. The appended parent organization id of the sub-organization.
Possible values: [ORGANIZATION_TYPE_ROOT
, ORGANIZATION_TYPE_GENERAL_DISTRIBUTOR
, ORGANIZATION_TYPE_RESELLER
, ORGANIZATION_TYPE_BUSINESS
]
Output only. Indicates the type of the organization.
Possible values: [ORGANIZATION_STATUS_ACTIVATED
, ORGANIZATION_STATUS_VERIFYING
, ORGANIZATION_STATUS_FAIL_TO_VERIFY
, ORGANIZATION_STATUS_DEACTIVATED
, ORGANIZATION_STATUS_DELETING
, ORGANIZATION_STATUS_DELETED
, ORGANIZATION_STATUS_ACTIVATION_SCHEDULED
]
Output only. Indicates the status of the organization.
Input only. The description of the sub-organization.
owner objectrequired
Required. The owner of the sub-organization. The service will genrate account password automatically.
Output only. The resource identifier of account.
Optional. The password of account. If the account is created by creating sub org api, not need to provide the password. The service will genrate password automatically. Password policy: Contains at least 1 number. Contains at least 1 special character. Contains at least 1 uppercase letter. Contains at least 1 lowercase letter.
Required. The first name of account.
Required. The last name of account.
Possible values: [ROLE_TYPE_OWNER
, ROLE_TYPE_ADMIN
, ROLE_TYPE_STAFF
, ROLE_TYPE_DEVELOPER
, ROLE_TYPE_CONTENT_CONTRIBUTOR
, ROLE_TYPE_CUSTOM
]
Output only. The role of account.
Possible values: [ACCOUNT_STATUS_ACTIVATED
, ACCOUNT_STATUS_DEACTIVATED
]
Output only. The status of account.
Possible values: [CREATED_ACCOUNT_STATUS_SUCCEED
, CREATED_ACCOUNT_STATUS_EXIST
, CREATED_ACCOUNT_STATUS_FAILED
, CREATED_ACCOUNT_STATUS_JOIN_ORG_FAILED
]
Outpu only. The created status of account.
attrs object
Optional. Need to send confirm email to account email. Default: false.
accounts object[]
Optional. The member of the sub-organization. The service will genrate account password automatically.
Output only. The resource identifier of account.
Optional. The password of account. If the account is created by creating sub org api, not need to provide the password. The service will genrate password automatically. Password policy: Contains at least 1 number. Contains at least 1 special character. Contains at least 1 uppercase letter. Contains at least 1 lowercase letter.
Required. The first name of account.
Required. The last name of account.
Possible values: [ROLE_TYPE_OWNER
, ROLE_TYPE_ADMIN
, ROLE_TYPE_STAFF
, ROLE_TYPE_DEVELOPER
, ROLE_TYPE_CONTENT_CONTRIBUTOR
, ROLE_TYPE_CUSTOM
]
Output only. The role of account.
Possible values: [ACCOUNT_STATUS_ACTIVATED
, ACCOUNT_STATUS_DEACTIVATED
]
Output only. The status of account.
Possible values: [CREATED_ACCOUNT_STATUS_SUCCEED
, CREATED_ACCOUNT_STATUS_EXIST
, CREATED_ACCOUNT_STATUS_FAILED
, CREATED_ACCOUNT_STATUS_JOIN_ORG_FAILED
]
Outpu only. The created status of account.
attrs object
Optional. Need to send confirm email to account email. Default: false.
Optional. The time zone to the sub-organization. Default: Aisa/Taipei.
Input only. The billing cycle of the reseller sub-organization.
It's required and valid when the type is ORGANIZATION_TYPE_RESELLER
.
Input only. The contract start day of the business sub-organization.
It's required and valid when the type is ORGANIZATION_TYPE_BUSINESS
.
Input only. The contract months of the business sub-organization.
It's required and valid when the type is ORGANIZATION_TYPE_BUSINESS
.
This field is mutually exclusive to contract_days
field, it'll get the higher priority if both are provided.
e.g. It'll use contract_months
instead if both contract_months
and contract_days
are provided.
Input only. The contract days of the business sub-organization.
It's required and valid when the type is ORGANIZATION_TYPE_BUSINESS
.
This field is mutually exclusive to contract_months
field, it'll get the lower priority if both are provided.
e.g. It'll use contract_months
instead if both contract_months
and contract_days
are provided.
Output only. The contract valid end day won't be valid after the day.
Output only. Indicates there are sub-organizations appended to the organization.
Output only. The name of appended parent organization.
Output only.
Possible values: [CREATED_ORG_STATUS_SUCCEED
, CREATED_ORG_STATUS_FAILED
]
{
"organizations": [
{
"organization": {
"id": "string",
"name": "string",
"parent_id": "string",
"type": "ORGANIZATION_TYPE_ROOT",
"status": "ORGANIZATION_STATUS_ACTIVATED",
"description": "string",
"owner": {
"id": "string",
"email": "string",
"password": "string",
"first_name": "string",
"last_name": "string",
"role_type": "ROLE_TYPE_OWNER",
"status": "ACCOUNT_STATUS_ACTIVATED",
"created_status": "CREATED_ACCOUNT_STATUS_SUCCEED",
"attrs": {},
"need_confirm": true,
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
},
"accounts": [
{
"id": "string",
"email": "string",
"password": "string",
"first_name": "string",
"last_name": "string",
"role_type": "ROLE_TYPE_OWNER",
"status": "ACCOUNT_STATUS_ACTIVATED",
"created_status": "CREATED_ACCOUNT_STATUS_SUCCEED",
"attrs": {},
"need_confirm": true,
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
}
],
"time_zone": "string",
"billing_cycle": 0,
"contract_valid_start_time": "2024-07-29T15:51:28.071Z",
"contract_months": 0,
"contract_days": 0,
"contract_valid_end_time": "2024-07-29T15:51:28.071Z",
"has_sub_orgs": true,
"parent_name": "string",
"license_key": "string",
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
},
"created_status": "CREATED_ORG_STATUS_SUCCEED"
}
]
}
A bad request response.
The code
is 3
means got an invalid argument. There are more HTTP status code mappings listed on here and gRPC code on here.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
A unauthenticated response.
The header authorization
was missing or unidentified.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
A forbidden response.
It means that the provided authorization
did not have enough permission to access the resource or the API.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
A server error response. There are more HTTP status code mappings listed on here.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}