Employee Identity (EIAM)

Add Organization

API

# Permissions {/examples/}

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

Permission Code Description
org_all Read and write permissions for organization management interfaces
all Read and write permissions for all interfaces

# Request Specification {/examples/}

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

# Request Headers {/examples/}

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 {/examples/}

{ 
	"code": "TestOrg2", 
	"name": "测试机构2", 
	"parent_id": "",
	"category": "department", 
	"sequence": 5,
	"extension": {
		"uid": "123"
	}
}
1
2
3
4
5
6
7
8
9
10

# Request Parameters {/examples/}

Parameter Name Chinese Name Required Type Description
code Organization Code Yes String Organization Code
name Organization Name Yes String Organization Name
parent_id Parent Node ID No String Parent Node ID
category Organization Type No String Organization Type Code
sequence Display Order No int Display Order
extension Extended Attributes No Map Extended attributes, which need to be defined within the enterprise

# Response Example

Success Example:
HTTP/1.1 201 Created
Content-Type: application/json
{
	"org_id": "20220412142914549-1E50-B49C521A4"
}

Error Example:
HTTP/1.1 400 Bad Request
{
	"error_code": "ORG.0008",
	"error_msg": "The parent organization does not exist"
}
1
2
3
4
5
6
7
8
9
10
11
12
13

# Response Parameters

Parameter Name Chinese Name Type Description
org_id Created Organization ID String System-generated

# Error Codes

Status Code Error Code Error Message Handling Action
400 ORG.0008 The parent organization does not exist Please check if the parent organization exists
The parent organization does not exist
400 ORG.0011 Organization type cannot be empty Please check if the organization type in the input parameters is empty
Organization type cannot be empty
400 ORG.0012 Organization code cannot be empty Please check if the organization code in the input parameters is empty
Organization code cannot be empty
400 ORG.0013 Organization name cannot be empty Please check if the organization name in the input parameters is empty
Organization name cannot be empty
400 ORG.0015 Organization code already exists The current organization code already exists, please change it to a non-existing value
Organization code already exists
400 ORG.0016 Organization name already exists The current organization name already exists, please change it to a non-existing value
Organization name already exists
400 ORG.0017 Organization code does not meet verification rules Please check if the organization code field in the input parameters meets the verification rules in 【Enterprise Center - User - Organization Attribute Definition】
Organization code does not meet verification rules
400 ORG.0018 Organization name does not meet verification rules Please check if the organization name field in the input parameters meets the verification rules in 【Enterprise Center - User - Organization Attribute Definition】
Organization name does not meet verification rules
400 ORG.0028 The organization level cannot exceed {0} level Please check if the organization level exceeds {0} levels
The organization level cannot exceed {0} level
400 ORG.0030 The parent organization cannot be empty Please check if the parent organization in the input parameters is empty
The parent organization cannot be empty
400 ORG.0032 Organization sequence number cannot be empty Please check if the organization sequence number in the input parameters is empty
Organization sequence number cannot be empty
400 ORG.0035 Extension attribute [{0}] cannot be empty Please check if the extension attribute [{0}] field in the input parameters is empty
Extension attribute [{0}] cannot be empty
400 ORG.0039 Extension attribute [{0}] already exists The current value of extension attribute [{0}] already exists, please change it to a non-existing value
Extension attribute [{0}] already exists
400 ORG.0040 Organization full name does not meet verification rules Please check if the organization full name field in the input parameters meets the verification rules in 【Enterprise Center - User - Organization Attribute Definition】
Organization full name does not meet verification rules
400 ORG.0041 Organization type does not meet verification rules Please check if the organization type field in the input parameters meets the verification rules in 【Enterprise Center - User - Organization Attribute Definition】
Organization type does not meet verification rules
400 ORG.0042 The parent organization does not meet the verification rules Please check if the parent organization field in the input parameters meets the verification rules in 【Enterprise Center - User - Organization Attribute Definition】
The parent organization does not meet the verification rules
400 ORG.0044 The organization sequence number does not meet the verification rules Please check if the organization sequence number field in the input parameters meets the verification rules in 【Enterprise Center - User - Organization Attribute Definition】
The organization sequence number does not meet the verification rules
400 ORG.0047 Extension property [{0}] does not meet verification rules Please check if the extension property [{0}] field in the input parameters meets the verification rules in 【Enterprise Center - User - Organization Attribute Definition】
Extension property [{0}] does not meet verification rules

Understood. I am ready to receive the Markdown content for translation. Please paste the text.