Employee Identity (EIAM)

Add Application Organization

Interface

# Permissions

The Identity Management API is authorized at the application level. Before calling the interface, you need to set interface permissions for different applications. For details, please refer to API Permissions.

Permission Code Description
app_org_all Read and write permissions for the application organization management interface
all Read and write permissions for all interfaces

# Request Description

POST https://{your_domain}/api/v2/tenant/applications/{app_id}/organizations

# Request Headers

Parameter Name Chinese Name Required Type Description
Authorization Authorization Yes String Format: Bearer {access_token}
Content-Type Content Type Yes String Fixed value: application/json; charset=utf-8

# Request Example

{
    "org_code": "xnjg",
    "name": "Virtual Organization 1",
    "parent_id": ""
}
1
2
3
4
5

# Request Parameters

Parameter Name Chinese Name Required Type Description
app_id Application ID Yes String Target Application ID
org_code Application Organization CODE Yes String
name Application Organization Name Yes String
parent_id Parent Node ID No String

# Response Example

Correct Example:
HTTP/1.1 201 Created
{
    "org_id": "20220414151855146-A153-62C1A994C"
}


Error Example:
HTTP/1.1 400 Bad Request
{
    "error_code": " APP.ORG.0040",
    "error_msg": "父机构不存在"
}
1
2
3
4
5
6
7
8
9
10
11
12
13

# Response Parameters

Parameter Name Chinese Name Type Description
org_id Application Organization ID String

# Error Codes

Status Code Error Code Error Message Handling Measures
400 APP.ORG.0040 父机构不存在 请检查父机构是否已被删除
The parent application organization does not exist
400 APP.0001 应用不存在 请检查应用是否已被删除
App does not exist
400 APP.OBJECTMODEL.0005 未开启应用机构模型 请检查应用是否启用应用机构
The application organization model is not opened
400 APP.0009 应用编码已存在 请检查应用编码是否重复
App code already exists

I understand. Please provide the Markdown content you need translated. I will follow all the specified rules.