Query Organization by Organization Code
Permissions
The Identity Management API is authorized at the application level. Before calling the API, you need to set API permissions for different applications. For details, see API Permissions.
| Permission Code | Description |
|---|---|
| org_read | Read permission for organization management APIs |
| all | Read/Write permission for all APIs |
| read | Permission for all read APIs |
Request Description
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
None
Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| org_code | Organization code | Yes | String | Organization code |
Response Example
Success Example
HTTP/1.1 200 OK
json
{
"org_id": "20220412142914549-1E50-B49C521A4",
"parent_id": "20220412105608948-3B83-D566C6D94",
"name": "Test Organization 333",
"category": "department",
"org_code": "TestOrg2",
"sequence": 5,
"disabled": false,
"created_at": "2022-08-01 10:00:00.111",
"updated_at": "2024-08-30 14:37:24.610",
"extension": {
"uid": "123"
}
}Error Example
HTTP/1.1 400 Bad Request
json
{
"error_code": "ORG.0001",
"error_msg": "Organization does not exist"
}Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| org_id | Organization ID | String | Organization ID |
| org_code | Organization code | String | Organization code |
| name | Organization name | String | Organization name |
| parent_id | Parent node ID | String | Parent node ID |
| category | Organization type | String | Organization type |
| sequence | Display sequence | int | Display sequence |
| disabled | Whether disabled | Boolean | Whether disabled |
| created_at | Organization creation time | String | Organization creation time |
| updated_at | Organization modification time | String | Organization modification time |
| extension | Extension attributes | Map | Extension attributes; extended attributes need to be defined in the enterprise |
Error Codes
| Status Code | Error Code | Chinese Error Message | English Error Message | Resolution |
|---|---|---|---|---|
| 400 | ORG.0001 | 组织不存在 | Organization does not exist | Please check whether the corresponding organization exists |