Create Organization
Request Description
| Parameter | Reference |
|---|---|
| Request URL | https://{app_domain}/callback |
| Request Method | POST |
| Request Header | Authorization: Bearer |
Request Parameters
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| code | No | String(100) | Organization code, globally unique. The event callback first checks eventType (event type), then id (id is empty for create events), and finally the code attribute. |
| name | Yes | String(40) | Organization name; must be unique within the same hierarchy level. |
| parentId | No | String(50) | Parent organization ID |
| disabled | Yes | Boolean | Whether disabled; true means disabled, false means enabled (not disabled). |
| leader | No | String | Organization leader |
| extAttr (Custom extended attribute) | No | - Integer - Boolean - String - Array | ① Extended attribute: the parameter name is defined by the IDaaS Enterprise Center at Application -> Object Model -> Application Organization Model -> Attribute Definition; enterprises can customize extended attribute names and types. ② Extended attribute types: currently supports Number, Text, Switch, and Multi-value Text. |
Response Parameters
| Parameter Name | Type | Description |
|---|---|---|
| id | String(50) | Organization ID of the enterprise application |
Request Example
- Request example with message signing and encryption enabled
json
{
"nonce": "AmgjjEAJbrMzWmUw",
"timestamp": 15093849585,
"eventType": "CREATE_ ORGANIZATION",
"data": "6lu6gxrHydJIXEWxQhUa3UqsWsDZ5LTAo/xU3zhjq9H3syCuFYDYKg==",
"signature": "K08yDiTEc094KoccOY+VYLQFxxQ="
}- JSON string format after decrypting the request body data
json
{
"code": "1000003",
"name": "武汉分公司",
"parentId": "5b183439-36a8-4d08-94ba-61b3c8d40b66",
"disabled":false,
"number":123456,
"switch":false,
"text":"扩展属性单值文本的值",
"multivaluedText":["扩展属性多值文本的值1","扩展属性多值文本的值2"]
}- Additional note on extended attributes: IDaaS must configure mapping in the Enterprise Center at Resources -> Application -> Object Model -> Application Organization Model -> Mapping Definition before the downstream application can receive the defined extended attribute values and information. For how to configure extended attributes and mapping definitions, please refer to Preparation.
Response Example
Status Code: 200
Request succeeded
- Response example with message signing and encryption enabled
json
{
"code": "200",
"message": "success",
"data": "j3rRBbc1Q1z1lZM0DDcUGFyaazO3NgnMbgK6UeWT35Druf5zyXg="
}- JSON string format after decrypting the response body data
json
{
"id": "6c5bb468-14b2-4183-baf2-06d523e03bd3"
}